Просмотр исходного кода

修改多企业查询重置时参数没有强校验为空的情况

zhangxin 2 недель назад
Родитель
Сommit
aa742f4eb4

+ 3 - 0
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/OrderController.java

@@ -97,6 +97,9 @@ public class OrderController {
     @GetMapping("/deliverListStatusNum")
     @ApiOperation("后管端-快递订单列表-订单状态数量")
     public R<Map<String, Integer>> deliverListStatusNum(BackendOrderParam orderParam) {
+        if (orderParam.getChannelIdList()==null||orderParam.getChannelIdList().isEmpty()){
+            return R.FAIL("请求参数-所属企业不允许为空");
+        }
         if (orderParam.getChannelIdList().contains(0L)){
             Long userId = SecurityUtils.getSysUser().getUserId();
             List<Long> channelIdList =  sysUserService.findByUserIdListId(userId);

+ 3 - 0
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/OrderRefundController.java

@@ -145,6 +145,9 @@ public class OrderRefundController {
     @ApiOperation("统计退款订单数量")
     @GetMapping("/orderRefundCount")
     public R<OrderRefundCountParam> orderRefundCount(OrderRefundStaisticsParam orderRefund) {
+        if (orderRefund.getChannelIdList()==null||orderRefund.getChannelIdList().isEmpty()){
+            return R.FAIL("请求参数-所属企业不允许为空");
+        }
         if (orderRefund.getChannelIdList().contains(0L)){
             Long userId = SecurityUtils.getSysUser().getUserId();
             List<Long> channelIdList =  sysUserService.findByUserIdListId(userId);