Commit f5377f7c authored by wzp's avatar wzp

修改bug

parent 4ae472f5
...@@ -81,7 +81,7 @@ public class MvcConfiguration extends WebMvcConfigurationSupport { ...@@ -81,7 +81,7 @@ public class MvcConfiguration extends WebMvcConfigurationSupport {
// serializeConfig.put(Long.class, ToStringSerializer.instance); // serializeConfig.put(Long.class, ToStringSerializer.instance);
// serializeConfig.put(Long.TYPE, ToStringSerializer.instance); // serializeConfig.put(Long.TYPE, ToStringSerializer.instance);
serializeConfig.setPropertyNamingStrategy(PropertyNamingStrategy.CamelCase); serializeConfig.setPropertyNamingStrategy(PropertyNamingStrategy.CamelCase);
serializeConfig.put(LocalDateTime.class, new MyLocalDateTimeSerializer("yyyy-MM-dd hh:mm:ss")); serializeConfig.put(LocalDateTime.class, new MyLocalDateTimeSerializer("yyyy-MM-dd HH:mm:ss"));
serializeConfig.put(LocalDate.class, new MyLocalDateSerializer("yyyy-MM-dd")); serializeConfig.put(LocalDate.class, new MyLocalDateSerializer("yyyy-MM-dd"));
fastJsonConfig.setSerializeConfig(serializeConfig); fastJsonConfig.setSerializeConfig(serializeConfig);
......
...@@ -195,17 +195,22 @@ public class AuditController extends BaseController { ...@@ -195,17 +195,22 @@ public class AuditController extends BaseController {
@ApiOperation(value = "获取禁用审核详情", notes = "获取禁用审核详情") @ApiOperation(value = "获取禁用审核详情", notes = "获取禁用审核详情")
@GetMapping("/getById") @GetMapping("/getById")
@RequiresPermissions("/audit/getById") @RequiresPermissions("/audit/getById")
public Map<String, Object> getById(String id) { public Map<String, Object> getById(String id, String type) {
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();
try { try {
Audit audit = new Audit(); Audit audit = null;
UpdateWrapper<Audit> wrapper = new UpdateWrapper<>(); UpdateWrapper<Audit> wrapper = new UpdateWrapper<>();
if (StringUtils.isNotBlank(id)) {
wrapper.eq("ref_item_id", id); wrapper.eq("ref_item_id", id);
}
if (StringUtils.isNotBlank(type)) {
wrapper.eq("type", type);
}
wrapper.orderByDesc("create_time"); wrapper.orderByDesc("create_time");
//只获取最新的一条审核数据 //只获取最新的一条审核数据
List<Audit> list = auditService.list(wrapper); List<Audit> list = auditService.list(wrapper);
if (list.size()>0){ if (list.size() > 0) {
audit=list.get(0); audit = list.get(0);
} }
resultMap.put("resultCode", "200"); resultMap.put("resultCode", "200");
resultMap.put("message", "操作成功"); resultMap.put("message", "操作成功");
......
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