11
This commit is contained in:
1 parent
1d3ad2d3f4
commit
7719222299
3 files changed
+40
-1
No files matched your search
+3
@@ -122,7 +122,10 @@ public interface HardOrderMapper extends PjcloudBaseMapper<HardOrderEntity> {
|
||||
|
||||
List<HardOrderSumAndCountVo> sumAndCount(@Param("dto") HardOrderSumAndCountDto dto);
|
||||
|
||||
List<HardOrderSumAndCountVo> refundSumAndCount(@Param("dto") HardOrderSumAndCountDto refundDto);
|
||||
|
||||
List<HardOrderSumAndCountVo> sumAndCountTotalByHourType(@Param("dto") HardOrderSumAndCountDto dto);
|
||||
|
||||
HardZyCardSyncVo totalYearMonthDay(@Param("dto") HardOrderDto hardOrderDto);
|
||||
|
||||
}
|
||||
+1
-1
@@ -402,7 +402,7 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
|
||||
if (ObjectUtil.isNotEmpty(dto.getWalletTypeId())) {
|
||||
refundDto.setWalletTypeId(dto.getWalletTypeId());
|
||||
}
|
||||
return hardOrderMapper.sumAndCount(refundDto);
|
||||
return hardOrderMapper.refundSumAndCount(refundDto);
|
||||
});
|
||||
// 消费净次数
|
||||
CompletableFuture<List<HardOrderSumAndCountVo>> profitFuture = CompletableFuture.supplyAsync(() -> {
|
||||
|
||||
+36
@@ -341,6 +341,42 @@
|
||||
group by a.user_dept_id
|
||||
</select>
|
||||
|
||||
<select id="refundSumAndCount" resultType="com.bsd.pjcloud.hard.api.vo.order.HardOrderSumAndCountVo">
|
||||
select
|
||||
a.user_dept_id as deptId,
|
||||
sum(a.pay_price) as sum,
|
||||
count(0) as count
|
||||
from hard_order a
|
||||
inner join hard_after_sale r on r.order_id = a.id and r.del_flag = '0' and r.status = '50'
|
||||
<where>
|
||||
a.del_flag = 0
|
||||
<if test="dto.walletTypeId != null">
|
||||
</if>
|
||||
<if test="dto.orderStatusCodes != null and dto.orderStatusCodes.size() != 0">
|
||||
and a.order_status in
|
||||
<foreach collection="dto.orderStatusCodes" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.getUserDeptIds != null and dto.getUserDeptIds.size() != 0">
|
||||
and a.user_dept_id in
|
||||
<foreach collection="dto.getUserDeptIds" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.createTimeList != null and dto.createTimeList.length == 2">
|
||||
and a.create_time between #{dto.createTimeList[0]} and #{dto.createTimeList[1]}
|
||||
</if>
|
||||
<if test="dto.mchIds != null and dto.mchIds.size() != 0">
|
||||
and a.merchant_id in
|
||||
<foreach collection="dto.mchIds" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by a.user_dept_id
|
||||
</select>
|
||||
|
||||
<select id="sumAndCountTotalByHourType" resultType="com.bsd.pjcloud.hard.api.vo.order.HardOrderSumAndCountVo">
|
||||
select
|
||||
a.hour_type as hourType,
|
||||
|
||||
Reference in new issue
Block a user