diff --git a/pjcloud-hardware/pjcloud-hardware-biz/src/main/java/com/bsd/pjcloud/hard/service/impl/order/HardOrderTotalServiceImpl.java b/pjcloud-hardware/pjcloud-hardware-biz/src/main/java/com/bsd/pjcloud/hard/service/impl/order/HardOrderTotalServiceImpl.java index 6dbe62058..31690e018 100644 --- a/pjcloud-hardware/pjcloud-hardware-biz/src/main/java/com/bsd/pjcloud/hard/service/impl/order/HardOrderTotalServiceImpl.java +++ b/pjcloud-hardware/pjcloud-hardware-biz/src/main/java/com/bsd/pjcloud/hard/service/impl/order/HardOrderTotalServiceImpl.java @@ -66,24 +66,27 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService { */ @Override public List listSb(HardOrderDto dto) { - DataScope dataScope = DataScope.of().func(DataScopeFuncEnum.ALL); - dataScope.setScopeDeptName("merchant_dept_id"); - PjcloudUser user = SecurityUtils.getUser(); CurrentUserHardTypeInfoDto hardTypeInfo = hardManagerService.getCurrentUserHardTypeInfo(user); dto.setMchTypeCodes(hardTypeInfo.getHardTypeList()); // 查询总流水 HardOrderDto totalDto = BeanUtil.toBean(dto, HardOrderDto.class); totalDto.setOrderStatusCodes(HardOrderStatusEnum.getPayPrice()); - List totalList = hardOrderMapper.listSb(totalDto, dataScope); + DataScope totalDataScope = DataScope.of().func(DataScopeFuncEnum.ALL); + totalDataScope.setScopeDeptName("merchant_dept_id"); + List totalList = hardOrderMapper.listSb(totalDto, totalDataScope); // 扣款总流水 HardOrderDto refundDto = BeanUtil.toBean(dto, HardOrderDto.class); refundDto.setOrderStatusCodes(HardOrderStatusEnum.getPayErrorCodes()); - List refundList = hardOrderMapper.listSb(refundDto, dataScope); + DataScope refundDataScope = DataScope.of().func(DataScopeFuncEnum.ALL); + refundDataScope.setScopeDeptName("merchant_dept_id"); + List refundList = hardOrderMapper.listSb(refundDto, refundDataScope); // 盈利 HardOrderDto profitDto = BeanUtil.toBean(dto, HardOrderDto.class); profitDto.setOrderStatusCodes(HardOrderStatusEnum.getPaySuccessCodes()); - List profitList = hardOrderMapper.listSb(profitDto, dataScope); + DataScope profitDataScope = DataScope.of().func(DataScopeFuncEnum.ALL); + profitDataScope.setScopeDeptName("merchant_dept_id"); + List profitList = hardOrderMapper.listSb(profitDto, profitDataScope); // 聚合一下数据 for (HardOrderSbVo v : totalList) { // 退款 @@ -129,23 +132,27 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService { */ @Override public List listCs(HardOrderDto dto) { - DataScope dataScope = DataScope.of(); - dataScope.setScopeDeptName("merchant_dept_id"); PjcloudUser user = SecurityUtils.getUser(); CurrentUserHardTypeInfoDto hardTypeInfo = hardManagerService.getCurrentUserHardTypeInfo(user); dto.setMchTypeCodes(hardTypeInfo.getHardTypeList()); // 查询总流水 HardOrderDto totalDto = BeanUtil.toBean(dto, HardOrderDto.class); totalDto.setOrderStatusCodes(HardOrderStatusEnum.getPayPrice()); - List totalList = hardOrderMapper.listCs(totalDto, dataScope); + DataScope totalDataScope = DataScope.of(); + totalDataScope.setScopeDeptName("merchant_dept_id"); + List totalList = hardOrderMapper.listCs(totalDto, totalDataScope); // 扣款总流水 HardOrderDto refundDto = BeanUtil.toBean(dto, HardOrderDto.class); refundDto.setOrderStatusCodes(HardOrderStatusEnum.getPayErrorCodes()); - List refundList = hardOrderMapper.listCs(refundDto, dataScope); + DataScope refundDataScope = DataScope.of(); + refundDataScope.setScopeDeptName("merchant_dept_id"); + List refundList = hardOrderMapper.listCs(refundDto, refundDataScope); // 盈利 HardOrderDto profitDto = BeanUtil.toBean(dto, HardOrderDto.class); profitDto.setOrderStatusCodes(HardOrderStatusEnum.getPaySuccessCodes()); - List profitList = hardOrderMapper.listCs(profitDto, dataScope); + DataScope profitDataScope = DataScope.of(); + profitDataScope.setScopeDeptName("merchant_dept_id"); + List profitList = hardOrderMapper.listCs(profitDto, profitDataScope); for (HardOrderCsVo v : totalList) { // 退款 if (ObjectUtil.isNotEmpty(refundList)) {