mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 19:06:39 +08:00
!3 【轻量更新修复】修改单词错误;修改PageUtil工具类等等
Merge pull request !3 from Turbolisten/master
This commit is contained in:
commit
291674d3a9
31
smart-admin-service/.gitignore
vendored
Normal file
31
smart-admin-service/.gitignore
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**
|
||||
!**/src/test/**
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
@ -26,6 +26,18 @@ public @interface ApiModelPropertyEnum {
|
||||
|
||||
String example() default "";
|
||||
|
||||
/**
|
||||
* 是否隐藏
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean hidden() default false;
|
||||
|
||||
/**
|
||||
* 是否必须
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean required() default true;
|
||||
|
||||
String dataType() default "";
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -45,22 +45,23 @@ public class SmartSwaggerApiModelEnumPlugin implements ModelPropertyBuilderPlugi
|
||||
|
||||
@Override
|
||||
public void apply(ModelPropertyContext context) {
|
||||
Optional<ApiModelPropertyEnum> annotation = Optional.absent();
|
||||
Optional<ApiModelPropertyEnum> enumOptional = Optional.absent();
|
||||
|
||||
if (context.getAnnotatedElement().isPresent()) {
|
||||
annotation = annotation.or(findApiModePropertyAnnotation(context.getAnnotatedElement().get()));
|
||||
enumOptional = enumOptional.or(findApiModePropertyAnnotation(context.getAnnotatedElement().get()));
|
||||
}
|
||||
if (context.getBeanPropertyDefinition().isPresent()) {
|
||||
annotation = annotation.or(findPropertyAnnotation(context.getBeanPropertyDefinition().get(), ApiModelPropertyEnum.class));
|
||||
enumOptional = enumOptional.or(findPropertyAnnotation(context.getBeanPropertyDefinition().get(), ApiModelPropertyEnum.class));
|
||||
}
|
||||
|
||||
if (annotation.isPresent()) {
|
||||
Class<? extends BaseEnum> aClass = annotation.get().value();
|
||||
String enumInfo = BaseEnum.getInfo(aClass);
|
||||
String enumDesc = annotation.get().enumDesc();
|
||||
context.getBuilder().required(annotation.transform(toIsRequired()).or(false))
|
||||
.description(enumDesc +":"+enumInfo)
|
||||
.example(annotation.transform(toExample()).orNull());
|
||||
if (enumOptional.isPresent()) {
|
||||
ApiModelPropertyEnum anEnum = enumOptional.get();
|
||||
String enumInfo = BaseEnum.getInfo(anEnum.value());
|
||||
context.getBuilder()
|
||||
.required(enumOptional.transform(toIsRequired()).or(false))
|
||||
.description(anEnum.enumDesc() + ":" + enumInfo)
|
||||
.example(enumOptional.transform(toExample()).orNull())
|
||||
.isHidden(anEnum.hidden());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class SmartDruidDataSourceConfig {
|
||||
@Value("${spring.datasource.time-between-eviction-runs-millis}")
|
||||
long timeBetweenEvictionRunsMillis;
|
||||
|
||||
@Value("${spring.datasource.min-evictable-edle-time-millis}")
|
||||
@Value("${spring.datasource.min-evictable-idle-time-millis}")
|
||||
long minEvictableIdleTimeMillis;
|
||||
|
||||
@Value("${spring.datasource.filters}")
|
||||
|
@ -9,6 +9,7 @@ import net.lab1024.smartadmin.util.SmartStringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -42,6 +42,4 @@ public class IdGeneratorEntity extends BaseEntity implements Serializable {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
private Date updateTime;
|
||||
private Date createTime;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -82,7 +83,7 @@ public class QuartzTaskService {
|
||||
@Transactional(rollbackFor = Throwable.class)
|
||||
public ResponseDTO<String> saveOrUpdateTask(QuartzTaskDTO quartzTaskDTO) throws Exception {
|
||||
ResponseDTO baseValid = this.baseValid(quartzTaskDTO);
|
||||
if (! baseValid.isSuccess()) {
|
||||
if (!baseValid.isSuccess()) {
|
||||
return baseValid;
|
||||
}
|
||||
Long taskId = quartzTaskDTO.getId();
|
||||
@ -103,7 +104,7 @@ public class QuartzTaskService {
|
||||
if (taskBean == null) {
|
||||
return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "taskBean 不存在");
|
||||
}
|
||||
if (! CronExpression.isValidExpression(quartzTaskDTO.getTaskCron())) {
|
||||
if (!CronExpression.isValidExpression(quartzTaskDTO.getTaskCron())) {
|
||||
return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "请传入正确的正则表达式");
|
||||
}
|
||||
return ResponseDTO.succ();
|
||||
|
@ -32,6 +32,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -22,7 +22,7 @@ public class SmartPageUtil {
|
||||
PageResultDTO<T> result = new PageResultDTO<>();
|
||||
result.setPageNum(page.getCurrent());
|
||||
result.setPageSize(page.getSize());
|
||||
result.setTotal(Long.valueOf(page.getTotal()));
|
||||
result.setTotal(page.getTotal());
|
||||
result.setPages(page.getPages());
|
||||
result.setList(page.getRecords());
|
||||
return result;
|
||||
@ -33,7 +33,7 @@ public class SmartPageUtil {
|
||||
|
||||
List<OrderItemDTO> orders = baseDTO.getOrders();
|
||||
if (orders != null && !orders.isEmpty()) {
|
||||
List<com.baomidou.mybatisplus.core.metadata.OrderItem> orderItemList = orders.stream().map(e -> convertOrderItem(e)).collect(Collectors.toList());
|
||||
List<com.baomidou.mybatisplus.core.metadata.OrderItem> orderItemList = orders.stream().map(SmartPageUtil::convertOrderItem).collect(Collectors.toList());
|
||||
page.setOrders(orderItemList);
|
||||
}
|
||||
page.setCurrent(baseDTO.getPageNum());
|
||||
@ -90,7 +90,7 @@ public class SmartPageUtil {
|
||||
PageResultDTO pageResultDTO = new PageResultDTO();
|
||||
pageResultDTO.setPageNum(page.getCurrent());
|
||||
pageResultDTO.setPageSize(page.getSize());
|
||||
pageResultDTO.setTotal(Long.valueOf(page.getTotal()));
|
||||
pageResultDTO.setTotal(page.getTotal());
|
||||
pageResultDTO.setPages(page.getPages());
|
||||
return pageResultDTO;
|
||||
}
|
||||
|
@ -4,5 +4,5 @@
|
||||
____) | | | | | | (_| | | | |_ / ____ \ (_| | | | | | | | | | |
|
||||
|_____/|_| |_| |_|\__,_|_| \__/_/ \_\__,_|_| |_| |_|_|_| |_|
|
||||
|
||||
SmartAdmin v1.1.0
|
||||
SmartAdmin v1.2.0
|
||||
|
||||
|
@ -31,7 +31,7 @@ spring.datasource.min-idle=1
|
||||
spring.datasource.max-active=10
|
||||
spring.datasource.max-wait=60000
|
||||
spring.datasource.time-between-eviction-runs-millis=60000
|
||||
spring.datasource.min-evictable-edle-time-millis=300000
|
||||
spring.datasource.min-evictable-idle-time-millis=300000
|
||||
spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver
|
||||
spring.datasource.filters=stat
|
||||
spring.datasource.druid.username=druid
|
||||
@ -44,16 +44,16 @@ spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.timeout=10000ms
|
||||
spring.redis.password=
|
||||
spring.redis.lettuce..pool.max-active=100
|
||||
spring.redis.lettuce..pool.max-active=10
|
||||
spring.redis.lettuce.pool.min-idle=5
|
||||
spring.redis.lettuce.pool.max-idle=10
|
||||
spring.redis.lettuce.pool.max-wait=30000ms
|
||||
|
||||
########################## rest http pool #########################
|
||||
#\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.max-total=100
|
||||
http.pool.max-total=10
|
||||
#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.default-max-per-route=25
|
||||
http.pool.default-max-per-route=5
|
||||
#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4
|
||||
http.pool.socket-timeout=8000
|
||||
#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4
|
||||
|
@ -31,7 +31,7 @@ spring.datasource.min-idle=1
|
||||
spring.datasource.max-active=10
|
||||
spring.datasource.max-wait=60000
|
||||
spring.datasource.time-between-eviction-runs-millis=60000
|
||||
spring.datasource.min-evictable-edle-time-millis=300000
|
||||
spring.datasource.min-evictable-idle-time-millis=300000
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.filters=stat
|
||||
spring.datasource.druid.username=druid
|
||||
@ -44,16 +44,16 @@ spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.timeout=10000ms
|
||||
spring.redis.password=
|
||||
spring.redis.lettuce..pool.max-active=100
|
||||
spring.redis.lettuce..pool.max-active=10
|
||||
spring.redis.lettuce.pool.min-idle=5
|
||||
spring.redis.lettuce.pool.max-idle=10
|
||||
spring.redis.lettuce.pool.max-wait=30000ms
|
||||
|
||||
########################## rest http pool #########################
|
||||
#\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.max-total=100
|
||||
http.pool.max-total=10
|
||||
#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.default-max-per-route=25
|
||||
http.pool.default-max-per-route=5
|
||||
#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4
|
||||
http.pool.socket-timeout=8000
|
||||
#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4
|
||||
|
@ -31,7 +31,7 @@ spring.datasource.min-idle=1
|
||||
spring.datasource.max-active=10
|
||||
spring.datasource.max-wait=60000
|
||||
spring.datasource.time-between-eviction-runs-millis=60000
|
||||
spring.datasource.min-evictable-edle-time-millis=300000
|
||||
spring.datasource.min-evictable-idle-time-millis=300000
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.filters=stat
|
||||
spring.datasource.druid.username=druid
|
||||
@ -44,16 +44,16 @@ spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.timeout=10000ms
|
||||
spring.redis.password=Gq123456@
|
||||
spring.redis.lettuce..pool.max-active=100
|
||||
spring.redis.lettuce..pool.max-active=10
|
||||
spring.redis.lettuce.pool.min-idle=5
|
||||
spring.redis.lettuce.pool.max-idle=10
|
||||
spring.redis.lettuce.pool.max-wait=30000ms
|
||||
|
||||
########################## rest http pool #########################
|
||||
#\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.max-total=100
|
||||
http.pool.max-total=10
|
||||
#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.default-max-per-route=25
|
||||
http.pool.default-max-per-route=5
|
||||
#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4
|
||||
http.pool.socket-timeout=8000
|
||||
#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4
|
||||
|
@ -31,7 +31,7 @@ spring.datasource.min-idle=1
|
||||
spring.datasource.max-active=10
|
||||
spring.datasource.max-wait=60000
|
||||
spring.datasource.time-between-eviction-runs-millis=60000
|
||||
spring.datasource.min-evictable-edle-time-millis=300000
|
||||
spring.datasource.min-evictable-idle-time-millis=300000
|
||||
spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver
|
||||
spring.datasource.filters=stat
|
||||
spring.datasource.druid.username=druid
|
||||
@ -44,16 +44,16 @@ spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.timeout=10000ms
|
||||
spring.redis.password=
|
||||
spring.redis.lettuce..pool.max-active=100
|
||||
spring.redis.lettuce..pool.max-active=10
|
||||
spring.redis.lettuce.pool.min-idle=5
|
||||
spring.redis.lettuce.pool.max-idle=10
|
||||
spring.redis.lettuce.pool.max-wait=30000ms
|
||||
|
||||
########################## rest http pool #########################
|
||||
#\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.max-total=100
|
||||
http.pool.max-total=10
|
||||
#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570
|
||||
http.pool.default-max-per-route=25
|
||||
http.pool.default-max-per-route=5
|
||||
#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4
|
||||
http.pool.socket-timeout=8000
|
||||
#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4
|
||||
|
Loading…
Reference in New Issue
Block a user