‘linchangsheng’ il y a 2 semaines
Parent
commit
ef7d3a6191

+ 2 - 1
src/main/java/com/gree/mall/manager/controller/goods/GoodsApplyController.java

@@ -100,10 +100,11 @@ public class GoodsApplyController {
     @ApiOperation(value = "审批")
     public ResponseHelper<GoodsApplyDetail> approve(
             @ApiParam(value = "申请id") @RequestParam(required = false) String goodsApplyId,
+            @ApiParam(value = "审批备注") @RequestParam(required = false) String approveRemark,
             @ApiParam(value = "WAIT 待审核 OK 通过  FAIL 驳回") @RequestParam(required = false) String status,
             HttpServletRequest request
     ) throws RemoteServiceException {
-        goodsApplyLogic.approve(goodsApplyId,status);
+        goodsApplyLogic.approve(goodsApplyId,status,approveRemark);
         return ResponseHelper.success();
     }
 }

+ 6 - 1
src/main/java/com/gree/mall/manager/logic/goods/GoodsApplyLogic.java

@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -212,10 +213,14 @@ public class GoodsApplyLogic {
         goodsApplyItemService.saveBatch(goodsApplyItemList);
     }
 
-    public void approve(String goodsApplyId, String status) {
+    public void approve(String goodsApplyId, String status,String approveRemark) {
+        AdminUserCom adminUser = commonLogic.getAdminUser();
         GoodsApply goodsApply = new GoodsApply();
         goodsApply.setGoodsApplyId(goodsApplyId);
         goodsApply.setStatus(status);
+        goodsApply.setApproveRemark(approveRemark);
+        goodsApply.setApproveName(adminUser.getNickName());
+        goodsApply.setApproveTime(new Date());
         goodsApply.updateById();
     }