buzhanyi 2 роки тому
батько
коміт
2176108623

+ 3 - 4
purchase-admin/src/main/java/com/ozs/web/controller/home/HomeNotificationMessageController.java

@@ -61,14 +61,13 @@ public class HomeNotificationMessageController extends BaseController {
 //    @PreAuthorize("@ss.hasPermi('home:homeNotificationMessage:saveReasonsForLag')")
     @Log(title = ModularConstans.notice, businessType = BusinessType.UPDATE)
     public AjaxResult saveReasonsForLag(@RequestBody ReasonsForLagVo reasonsForLagVo) {
-        HomeNotificationMessage homeNotificationMessage = homeNotificationMessageService.getById(reasonsForLagVo.getHomeNotificationMessageId());
-        homeNotificationMessage.setState(0);
+
         QueryWrapper<PmDemand> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("demand_id", homeNotificationMessage.getDemandId());
+        queryWrapper.eq("demand_id", reasonsForLagVo.getHomeNotificationMessageId());
         PmDemand pmDemand = pmDemandMapper.selectOne(queryWrapper);
         pmDemand.setDelayReason(reasonsForLagVo.getDelayReason());
         pmDemand.setAdjustAdvice(reasonsForLagVo.getAdjustAdvice());
-        if (pmDemandMapper.updateById(pmDemand) > 0 && homeNotificationMessageService.updateById(homeNotificationMessage)) {
+        if (pmDemandMapper.updateById(pmDemand) > 0) {
             return success();
         } else {
             return error();