Commit 83dc7f8a authored by zhengjie's avatar zhengjie
Browse files

优化user列表中的岗位DTO,修改@author信息,新增验证码登录

parent c01435a0
......@@ -6,7 +6,7 @@ import java.io.Serializable;
import java.sql.Timestamp;
/**
* @author jie
* @author Zheng Jie
* @date 2019-5-22
*/
@Data
......
......@@ -21,7 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.lang.reflect.Method;
/**
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
@Service
......
......@@ -7,7 +7,7 @@ import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @author jie
* @author Zheng Jie
* @date 2019-5-22
*/
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
......
......@@ -7,7 +7,7 @@ import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @author jie
* @author Zheng Jie
* @date 2019-5-22
*/
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
......
......@@ -15,8 +15,22 @@
<jjwt.version>0.9.1</jjwt.version>
</properties>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- 验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>EasyCaptcha</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>me.zhengjie</groupId>
<artifactId>eladmin-generator</artifactId>
......
......@@ -8,7 +8,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @author jie
* @author Zheng Jie
* @date 2018/11/15 9:20:19
*/
@EnableAsync
......
......@@ -18,7 +18,7 @@ import java.util.List;
/**
* WebMvcConfigurer
*
* @author jie
* @author Zheng Jie
* @date 2018-11-30
*/
@Configuration
......
......@@ -17,7 +17,7 @@ import java.util.Set;
/**
* 数据权限配置
* @author jie
* @author Zheng Jie
* @date 2019-4-1
*/
@Component
......
......@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
/**
* 初始化站点统计
* @author jie
* @author Zheng Jie
*/
@Component
public class VisitsInitialization implements ApplicationRunner {
......
......@@ -9,7 +9,7 @@ import java.sql.Timestamp;
/**
* pv 与 ip 统计
*
* @author jie
* @author Zheng Jie
* @date 2018-12-13
*/
@Entity
......
......@@ -8,7 +8,7 @@ import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author jie
* @author Zheng Jie
* @date 2018-12-10
*/
@Data
......
......@@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author jie
* @author Zheng Jie
* @date 2018-12-13
*/
@Repository
......
......@@ -12,7 +12,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author jie
* @author Zheng Jie
* @date 2018-12-10
*/
@RestController
......
......@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author jie
* @author Zheng Jie
* @date 2018-12-13
*/
@RestController
......
......@@ -6,7 +6,7 @@ import org.springframework.data.domain.Pageable;
/**
* 可自行扩展
* @author jie
* @author Zheng Jie
* @date 2018-12-10
*/
public interface RedisService {
......@@ -16,16 +16,30 @@ public interface RedisService {
* @param key
* @return
*/
public Page findByKey(String key, Pageable pageable);
Page findByKey(String key, Pageable pageable);
/**
* 查询验证码的值
* @param key
* @return
*/
String getCodeVal(String key);
/**
* 保存验证码
* @param key
* @param val
*/
void saveCode(String key, Object val);
/**
* delete
* @param key
*/
public void delete(String key);
void delete(String key);
/**
* 清空所有缓存
*/
public void flushdb();
void flushdb();
}
......@@ -5,7 +5,7 @@ import org.springframework.scheduling.annotation.Async;
import javax.servlet.http.HttpServletRequest;
/**
* @author jie
* @author Zheng Jie
* @date 2018-12-13
*/
public interface VisitsService {
......
......@@ -13,7 +13,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* @author jie
* @author Zheng Jie
* @date 2018-12-10
*/
@Service
......@@ -23,7 +23,7 @@ public class RedisServiceImpl implements RedisService {
RedisTemplate redisTemplate;
@Override
public Page findByKey(String key, Pageable pageable){
public Page<RedisVo> findByKey(String key, Pageable pageable){
List<RedisVo> redisVos = new ArrayList<>();
if(!key.equals("*")){
key = "*" + key + "*";
......@@ -43,6 +43,8 @@ public class RedisServiceImpl implements RedisService {
return page;
}
@Override
public void delete(String key) {
redisTemplate.delete(key);
......@@ -51,6 +53,20 @@ public class RedisServiceImpl implements RedisService {
@Override
public void flushdb() {
redisTemplate.getConnectionFactory().getConnection().flushDb();
}
@Override
public String getCodeVal(String key) {
try {
String value = redisTemplate.opsForValue().get(key).toString();
return value;
}catch (Exception e){
return "";
}
}
@Override
public void saveCode(String key, Object val) {
redisTemplate.opsForValue().set(key,val,2000);
}
}
......@@ -18,7 +18,7 @@ import java.util.Map;
import java.util.stream.Collectors;
/**
* @author jie
* @author Zheng Jie
* @date 2018-12-13
*/
@Slf4j
......
......@@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author jie
* @author Zheng Jie
* @date 2019-01-07
*/
@Component
......
......@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.sql.Timestamp;
/**
* @author jie
* @author Zheng Jie
* @date 2019-01-07
*/
@Data
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment