11
This commit is contained in:
1 parent
f23aefde74
commit
58bee4bbe1
4 files changed
+18
-6
No files matched your search
+2
@@ -19,6 +19,8 @@ public class HardOrderDto extends HardOrderEntity implements BaseIsIncludeTreeIn
|
||||
|
||||
private List<Long> userDeptIds;
|
||||
|
||||
private List<Long> merchantDeptIds;
|
||||
|
||||
private List<Long> orderIds;
|
||||
|
||||
private List<Long> hardIds;
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ public interface HardOrderMapper extends PjcloudBaseMapper<HardOrderEntity> {
|
||||
|
||||
List<HardOrderCsVo> listCsByDay(@Param("dto") HardOrderDto totalDto);
|
||||
|
||||
List<HardOrderPayTypeVo> listOrerPayType(@Param("dto") HardOrderDto dto, DataScope dataScope);
|
||||
List<HardOrderPayTypeVo> listOrerPayType(@Param("dto") HardOrderDto dto);
|
||||
|
||||
List<HardOrderSumAndCountVo> sumAndCount(@Param("dto") HardOrderSumAndCountDto dto);
|
||||
|
||||
|
||||
+9
-5
@@ -422,26 +422,30 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
|
||||
public List<HardOrderPayTypeVo> listPayType(HardOrderDto dto) {
|
||||
// 获取所有支付方式
|
||||
List<String> payTypeList = HardPayTypeEnum.payTypeTotalDisplayList.stream().map(HardPayTypeEnum::getType).toList();
|
||||
DataScope dataScope = DataScope.of();
|
||||
dataScope.setScopeDeptName("merchant_dept_id");
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
CurrentUserHardTypeInfoDto hardTypeInfo = hardManagerService.getCurrentUserHardTypeInfo(user);
|
||||
dto.setMchTypeCodes(hardTypeInfo.getHardTypeList());
|
||||
// 查询子部门
|
||||
List<SysDept> deptList = remoteDeptService.getDescendantList(user.getDeptId()).getData();
|
||||
if (ObjectUtil.isNotEmpty(deptList)) {
|
||||
List<Long> deptIds = deptList.stream().map(SysDept::getDeptId).filter(ObjectUtil::isNotEmpty).distinct().toList();
|
||||
dto.setMerchantDeptIds(deptIds);
|
||||
}
|
||||
// 查询总流水
|
||||
HardOrderDto totalDto = BeanUtil.toBean(dto, HardOrderDto.class);
|
||||
totalDto.setOrderStatusCodes(HardOrderStatusEnum.getPayPrice());
|
||||
totalDto.setOrderPayTypeCodes(payTypeList);
|
||||
List<HardOrderPayTypeVo> totalList = hardOrderMapper.listOrerPayType(totalDto, dataScope);
|
||||
List<HardOrderPayTypeVo> totalList = hardOrderMapper.listOrerPayType(totalDto);
|
||||
// 扣款总流水
|
||||
HardOrderDto refundDto = BeanUtil.toBean(dto, HardOrderDto.class);
|
||||
refundDto.setOrderStatusCodes(HardOrderStatusEnum.getPayErrorCodes());
|
||||
refundDto.setOrderPayTypeCodes(payTypeList);
|
||||
List<HardOrderPayTypeVo> refundList = hardOrderMapper.listOrerPayType(refundDto, dataScope);
|
||||
List<HardOrderPayTypeVo> refundList = hardOrderMapper.listOrerPayType(refundDto);
|
||||
// 盈利
|
||||
HardOrderDto profitDto = BeanUtil.toBean(dto, HardOrderDto.class);
|
||||
profitDto.setOrderStatusCodes(HardOrderStatusEnum.getPaySuccessCodes());
|
||||
profitDto.setOrderPayTypeCodes(payTypeList);
|
||||
List<HardOrderPayTypeVo> profitList = hardOrderMapper.listOrerPayType(profitDto, dataScope);
|
||||
List<HardOrderPayTypeVo> profitList = hardOrderMapper.listOrerPayType(profitDto);
|
||||
for (HardOrderPayTypeVo v : totalList) {
|
||||
// 退款
|
||||
if (ObjectUtil.isNotEmpty(refundList)) {
|
||||
|
||||
+6
@@ -129,6 +129,12 @@
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.merchantDeptIds != null and dto.merchantDeptIds.size() != 0">
|
||||
and a.merchant_dept_id in
|
||||
<foreach collection="dto.merchantDeptIds" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.userIds != null and dto.userIds.size() != 0">
|
||||
and a.user_id in
|
||||
<foreach collection="dto.userIds" item="v" open="(" close=")" separator=",">
|
||||
|
||||
Reference in new issue
Block a user