From b07d43a339543cba8173306eef587615d29005ba Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 3 Apr 2025 17:31:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=95=86=E6=88=B7=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E3=80=81=E8=AE=BE=E5=A4=87=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/order/HardOrderTotalServiceImpl.java | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) 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)) {