Commit 5ce9da30 authored by liqin's avatar liqin 💬

bug fixed

parent eb93b272
......@@ -5,7 +5,6 @@ import cn.wisenergy.chnmuseum.party.common.util.MyLocalDateTimeSerializer;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.context.annotation.Configuration;
......@@ -18,7 +17,6 @@ import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.LocalDateTime;
......@@ -79,9 +77,9 @@ public class MvcConfiguration extends WebMvcConfigurationSupport {
// 设置数字转化问题
SerializeConfig serializeConfig = SerializeConfig.globalInstance;
serializeConfig.put(BigInteger.class, ToStringSerializer.instance);
serializeConfig.put(Long.class, ToStringSerializer.instance);
serializeConfig.put(Long.TYPE, ToStringSerializer.instance);
// serializeConfig.put(BigInteger.class, ToStringSerializer.instance);
// serializeConfig.put(Long.class, ToStringSerializer.instance);
// serializeConfig.put(Long.TYPE, ToStringSerializer.instance);
serializeConfig.setPropertyNamingStrategy(PropertyNamingStrategy.CamelCase);
serializeConfig.put(LocalDateTime.class, new MyLocalDateTimeSerializer("yyyy-MM-dd"));
serializeConfig.put(LocalDate.class, new MyLocalDateSerializer("yyyy-MM-dd"));
......
......@@ -65,7 +65,7 @@ public class ${table.controllerName} {
@RequiresPermissions("$!{cfg.colonTableName}:batch:save")
#end
@ApiOperation(value = "批量添加$!{table.comment}", notes = "批量添加$!{table.comment}")
public Map<String, Object> batchSave${entity}(#if(${cfg.paramValidation})@Validated(value = {Add.class})#end List<${entity}> ${table.entityPath}List) {
public Map<String, Object> batchSave${entity}(@RequestBody #if(${cfg.paramValidation})@Validated(value = {Add.class})#end List<${entity}> ${table.entityPath}List) {
// 保存业务节点信息
boolean result = ${table.entityPath}Service.saveBatch(${table.entityPath}List);
// 返回操作结果
......@@ -82,7 +82,7 @@ public class ${table.controllerName} {
@RequiresPermissions("$!{cfg.colonTableName}:save")
#end
@ApiOperation(value = "添加$!{table.comment}", notes = "添加$!{table.comment}")
public Map<String, Object> save${entity}(#if(${cfg.paramValidation})@Validated(value = {Add.class})#end ${entity} ${table.entityPath}) {
public Map<String, Object> save${entity}(@RequestBody #if(${cfg.paramValidation})@Validated(value = {Add.class})#end ${entity} ${table.entityPath}) {
// 保存业务节点信息
boolean result = ${table.entityPath}Service.save(${table.entityPath});
// 返回操作结果
......@@ -99,7 +99,7 @@ public class ${table.controllerName} {
@RequiresPermissions("$!{cfg.colonTableName}:update")
#end
@ApiOperation(value = "修改$!{table.comment}信息", notes = "修改$!{table.comment}信息")
public Map<String, Object> update${entity}(#if(${cfg.paramValidation})@Validated(value = {Update.class})#end ${entity} ${cfg.entityObjectName}) {
public Map<String, Object> update${entity}(@RequestBody #if(${cfg.paramValidation})@Validated(value = {Update.class})#end ${entity} ${cfg.entityObjectName}) {
#if(${cfg.generatorStrategy} == 'ALL')
boolean flag = ${table.entityPath}Service.update${entity}(${cfg.entityObjectName});
#else
......@@ -153,7 +153,7 @@ public class ${table.controllerName} {
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "auditStatus", value = "审核状态", paramType = "query", dataType = "String")
})
public Map<String, Object> get${entity}List(@RequestParam(value = "auditStatus", defaultValue = "APPROVED", required = false) AuditStatusEnum auditStatus) {
public Map<String, Object> get${entity}List(@RequestParam(value = "auditStatus", defaultValue = "APPROVED_FINAL", required = false) AuditStatusEnum auditStatus) {
List<${entity}> ${table.entityPath}List = ${table.entityPath}Service.list(Wrappers.<${entity}>lambdaQuery().eq(${entity}::getAuditStatus, auditStatus.name()));
return getResult(${table.entityPath}List);
}
......@@ -162,7 +162,6 @@ public class ${table.controllerName} {
@ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "nameOrCode", value = "名称或编码", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "copyrightOwner", value = "版权方", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startDate", value = "创建时间-开始", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "创建时间-结束", paramType = "query", dataType = "String")
})
......@@ -177,10 +176,6 @@ public class ${table.controllerName} {
if (StringUtils.isNotBlank(genericPageParam.getNameOrCode())) {
queryWrapper.like(${entity}::getName, genericPageParam.getNameOrCode());
}
// 对版权方模糊查询
if (StringUtils.isNotBlank(genericPageParam.getCopyrightOwnerId())) {
queryWrapper.like(${entity}::getAssetCopyrightOwnerId, genericPageParam.getCopyrightOwnerId());
}
// 根据创建时间区间检索
if (genericPageParam.getStartDate() != null && genericPageParam.getEndDate() != null) {
queryWrapper.ge(${entity}::getCreateTime, genericPageParam.getStartDate().atTime(0, 0, 0))
......
Markdown is supported
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