Skip to content

Commit

Permalink
优化user列表中的岗位DTO,修改@author信息,新增验证码登录
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Jun 10, 2019
1 parent c01435a commit 83dc7f8
Show file tree
Hide file tree
Showing 172 changed files with 378 additions and 200 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ eladmin基于 Spring Boot 2.1.0 、 Jpa、 Spring Security、redis、Vue的前
- 操作日志:记录用户操作的日志
- 异常日志:记录异常日志,方便开发人员定位错误
- 系统缓存:使用jedis将缓存操作可视化,并提供对redis的基本操作,可根据需求自行扩展
- 实时控制台:实时打印logback日志
- SQL监控:采用druid 监控数据库访问性能,默认用户名admin,密码123456
- 定时任务:整合Quartz做定时任务,加入任务日志,任务运行情况一目了然
- 代码生成:高灵活度一键生成前后端代码,减少百分之80左右的工作任务
Expand Down Expand Up @@ -71,10 +70,9 @@ eladmin基于 Spring Boot 2.1.0 、 Jpa、 Spring Security、redis、Vue的前
</tr>
<tr>
<td><img src="https://i.loli.net/2019/05/18/5cdf77632b4b090165.png"/></td>
<td><img src="https://i.loli.net/2019/05/18/5cdf77639b1be47210.png"/></td>
</tr>
<tr>
<td><img src="https://i.loli.net/2019/05/18/5cdf77639929277783.png"/></td>
</tr>
<tr>
<td><img src="https://i.loli.net/2019/05/18/5cdf78969adc389599.png"/></td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.lang.annotation.Target;

/**
* @author jie
* @author Zheng Jie
* @date 2019-6-4 13:52:30
*/
@Target(ElementType.FIELD)
Expand Down Expand Up @@ -49,7 +49,7 @@ enum Type {
}

/**
* @author jie
* @author Zheng Jie
* 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询
*/
enum Join {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
Method signatureMethod = signature.getMethod();
Limit limit = signatureMethod.getAnnotation(Limit.class);
LimitType limitType = limit.limitType();
String name = limit.name();
String key = limit.key();
if (StringUtils.isEmpty(key)) {
switch (limitType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import static org.springframework.http.HttpStatus.BAD_REQUEST;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-23
* 统一异常处理
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.stream.IntStream;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/
public class EntityExistException extends RuntimeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.stream.IntStream;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/
public class EntityNotFoundException extends RuntimeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.time.LocalDateTime;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.springframework.http.HttpStatus.*;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/
@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.List;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/
public interface EntityMapper<D, E> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.time.Duration;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/**
* api页面 /swagger-ui.html
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* 常用静态常量
* @author jie
* @author Zheng Jie
* @date 2018-12-26
*/
public class ElAdminConstant {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* 加密
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/
public class EncryptUtils {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* File工具类,扩展 hutool 工具包
* @author jie
* @author Zheng Jie
* @date 2018-12-27
*/
public class FileUtil extends cn.hutool.core.io.FileUtil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* 分页工具
* @author jie
* @author Zheng Jie
* @date 2018-12-10
*/
public class PageUtil extends cn.hutool.core.util.PageUtil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.*;

/**
* @author jie
* @author Zheng Jie
* @date 2019-6-4 14:59:48
*/
@Slf4j
Expand Down Expand Up @@ -97,12 +97,14 @@ public static <R, Q> Predicate getPredicate(Root<R> root, Q query, CriteriaBuild
return cb.and(list.toArray(new Predicate[list.size()]));
}

@SuppressWarnings("unchecked")
private static <T, R> Expression<T> getExpression(String attributeName, Join join, Root<R> root) {
if (ObjectUtil.isNotEmpty(join)) {
return join.get(attributeName);
} else return root.get(attributeName);
}

@SuppressWarnings("unchecked")
public static boolean isBlank(final CharSequence cs) {
int strLen;
if (cs == null || (strLen = cs.length()) == 0) {
Expand All @@ -116,6 +118,7 @@ public static boolean isBlank(final CharSequence cs) {
return true;
}

@SuppressWarnings("unchecked")
private static List<Field> getAllFields(Class clazz, List<Field> fields) {
if (clazz != null) {
fields.addAll(Arrays.asList(clazz.getDeclaredFields()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* 获取 HttpServletRequest
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
public class RequestHolder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* 获取当前登录的用户
* @author jie
* @author Zheng Jie
* @date 2019-01-17
*/
public class SecurityUtils {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* 异常工具
* @author jie
* @author Zheng Jie
* @date 2019-01-06
*/
public class ThrowableUtil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* 验证工具
* @author jie
* @author Zheng Jie
* @date 2018-11-23
*/
public class ValidationUtil{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* 代码生成配置
* @author jie
* @author Zheng Jie
* @date 2019-01-03
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* 列的数据信息
* @author jie
* @author Zheng Jie
* @date 2019-01-02
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* 表的数据信息
* @author jie
* @author Zheng Jie
* @date 2019-01-02
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.data.jpa.repository.JpaRepository;

/**
* @author jie
* @author Zheng Jie
* @date 2019-01-14
*/
public interface GenConfigRepository extends JpaRepository<GenConfig,Long> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.springframework.web.bind.annotation.*;

/**
* @author jie
* @author Zheng Jie
* @date 2019-01-14
*/
@RestController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.List;

/**
* @author jie
* @author Zheng Jie
* @date 2019-01-02
*/
@RestController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.springframework.cache.annotation.Cacheable;

/**
* @author jie
* @author Zheng Jie
* @date 2019-01-14
*/
@CacheConfig(cacheNames = "genConfig")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.List;

/**
* @author jie
* @author Zheng Jie
* @date 2019-01-02
*/
public interface GeneratorService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Optional;

/**
* @author jie
* @author Zheng Jie
* @date 2019-01-14
*/
@Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.List;

/**
* @author jie
* @author Zheng Jie
* @date 2019-01-02
*/
@Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* sql字段转java
*
* @author jie
* @author Zheng Jie
* @date 2019-01-03
*/
public class ColUtil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/**
* 代码生成
* @author jie
* @author Zheng Jie
* @date 2019-01-02
*/
@Slf4j
Expand Down
2 changes: 1 addition & 1 deletion eladmin-logging/src/main/java/me/zhengjie/aop/log/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.lang.annotation.Target;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
@Target(ElementType.METHOD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import javax.servlet.http.HttpServletRequest;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
@Component
Expand Down Expand Up @@ -65,7 +65,7 @@ public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
@AfterThrowing(pointcut = "logPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
Log log = new Log("ERROR",System.currentTimeMillis() - currentTime);
log.setExceptionDetail(ThrowableUtil.getStackTrace(e));
log.setExceptionDetail(ThrowableUtil.getStackTrace(e).getBytes());
logService.save(getUsername(), StringUtils.getIP(RequestHolder.getHttpServletRequest()), (ProceedingJoinPoint)joinPoint, log);
}

Expand Down
4 changes: 2 additions & 2 deletions eladmin-logging/src/main/java/me/zhengjie/domain/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.sql.Timestamp;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
@Entity
Expand Down Expand Up @@ -63,7 +63,7 @@ public class Log implements Serializable {
* 异常详细
*/
@Column(name = "exception_detail", columnDefinition = "text")
private String exceptionDetail;
private byte[] exceptionDetail;

/**
* 创建日期
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.springframework.stereotype.Repository;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
@Repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.springframework.web.bind.annotation.RestController;

/**
* @author jie
* @author Zheng Jie
* @date 2018-11-24
*/
@RestController
Expand Down
Loading

0 comments on commit 83dc7f8

Please sign in to comment.