From 26e1d655d6d8832dd62b8010e2a4f35cff356ef5 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Wed, 22 May 2024 15:20:19 +0800 Subject: [PATCH] Changes --- .../controller/audit/AuditController.java | 2 +- .../controller/goods/GoodsController.java | 27 ++++++++++++++++--- .../audit/impl/AuditMsgServiceImpl.java | 2 ++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/bweb/src/main/java/com/bweb/controller/audit/AuditController.java b/bweb/src/main/java/com/bweb/controller/audit/AuditController.java index 4c0a3a0..af5d389 100644 --- a/bweb/src/main/java/com/bweb/controller/audit/AuditController.java +++ b/bweb/src/main/java/com/bweb/controller/audit/AuditController.java @@ -110,7 +110,7 @@ public class AuditController { GoodsMsg goodsMsg = goodsMsgService.queryDetail(auditMsg.getSubmitObjectId()); - goodsMsg.setStatus(1); + goodsMsg.setStatus(body.getStatus() == 0 ? 2 : 1); goodsMsg.setUpdateTime(new Date()); goodsMsgService.update(goodsMsg); diff --git a/bweb/src/main/java/com/bweb/controller/goods/GoodsController.java b/bweb/src/main/java/com/bweb/controller/goods/GoodsController.java index 0985407..b68e637 100644 --- a/bweb/src/main/java/com/bweb/controller/goods/GoodsController.java +++ b/bweb/src/main/java/com/bweb/controller/goods/GoodsController.java @@ -157,7 +157,7 @@ public class GoodsController { || body.getGoodsId() == null || body.getOriginalPrice() == null || body.getSalePrice() == null - || body.getPurLimit() == null +// || body.getPurLimit() == null || body.getStock() == null || body.getSalesEndTime() == null || StringUtils.isBlank(body.getShowImg()) @@ -263,9 +263,23 @@ public class GoodsController { Map map = new HashMap<>(); map.put("title", title); - map.put("goodsType", goodsType); + + if (goodsType != null) { + GoodsType goodsType1 = goodsTypeService.queryDetail(goodsType); + + if (goodsType1.getParentId() == null) { + map.put("goodsTypeParent", goodsType); + } else { + map.put("goodsType", goodsType); + } + } + map.put("goodsBrand", goodsBrand); - map.put("merId", userModel.getAccount().getId()); + + if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { + map.put("merId", userModel.getAccount().getId()); + } + map.put("type", type); map.put("status", status); @@ -278,7 +292,6 @@ public class GoodsController { } } - @RequestMapping(value="/getGoodsSpecsList",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询商品规格列表") @@ -366,6 +379,7 @@ public class GoodsController { public ResponseData deleteGoodsSpecs(@RequestParam(value = "id" , required = false) Long id) { try { + goodsSpecsService.delete(id , false); return ResponseMsgUtil.success("删除成功"); @@ -385,6 +399,11 @@ public class GoodsController { SessionObject sessionObject = userCenter.getSessionObject(request); SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject(); + if (userModel.getAccount().getObjectType() != SecUserObjectTypeEnum.type2.getCode()) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + + } + GoodsMsg goodsMsg = goodsMsgService.queryDetail(id); if (goodsMsg.getStatus() == 1) { diff --git a/service/src/main/java/com/hfkj/service/audit/impl/AuditMsgServiceImpl.java b/service/src/main/java/com/hfkj/service/audit/impl/AuditMsgServiceImpl.java index 7e3135f..9d553da 100644 --- a/service/src/main/java/com/hfkj/service/audit/impl/AuditMsgServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/audit/impl/AuditMsgServiceImpl.java @@ -53,6 +53,8 @@ public class AuditMsgServiceImpl implements AuditMsgService { if (MapUtils.getInteger(map, "status") != null) { criteria.andStatusEqualTo(MapUtils.getInteger(map, "status")); } + + example.setOrderByClause("create_time desc"); return auditMsgMapper.selectByExample(example) ; } }