Browse Source

更新时验证是否关闭订单

guq 7 years ago
parent
commit
b4ffe81e9b

+ 5 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -156,6 +156,11 @@ public class SaleServiceImpl implements SaleService{
             messageLogService.save(baseDTO);
             return baseDTO;
         }
+        //验证是否关闭
+        String code = saleMapper.validateCloseStatus(sa_id);
+        if (null != code) {
+            throw new BizException(BizExceptionCode.SALE_CLOSE.getCode(),String.format(BizExceptionCode.SALE_CLOSE.getMessage(),"修改"));
+        }
         //更新操作
         saleMapper.updateByPrimaryKeySelective(sale);
         //添加从表传输对象