fix: 推广员提成信息查询和导出. 商城提成
parent
160f9d306f
commit
2741f1cefe
|
@ -29,7 +29,7 @@ public class PromoterDrawReqVO extends PageParam {
|
||||||
@Schema(description = "成为推广员时间")
|
@Schema(description = "成为推广员时间")
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
@Schema(description = "排序1升序2降序")
|
||||||
|
private String sort;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<select id="findPromoterDrawPage" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.PromoterDrawVO">
|
<select id="findPromoterDrawPage"
|
||||||
|
resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.PromoterDrawVO">
|
||||||
SELECT
|
SELECT
|
||||||
x1.*,
|
x1.*,
|
||||||
x2.order_count,
|
x2.order_count,
|
||||||
|
@ -65,9 +66,16 @@
|
||||||
cy_recharge_order b
|
cy_recharge_order b
|
||||||
GROUP BY
|
GROUP BY
|
||||||
b.promoter_id
|
b.promoter_id
|
||||||
) x2 ON x1.user_id = x2.user_id ORDER BY x2.total_amount DESC
|
) x2 ON x1.user_id = x2.user_id
|
||||||
|
<if test="data.sort !=null and data.sort=1">
|
||||||
|
ORDER BY x2.total_amount ASC
|
||||||
|
</if>
|
||||||
|
<if test="data.sort !=null and data.sort=2">
|
||||||
|
ORDER BY x2.total_amount DESC
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="findPromoterDrawCount" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.PromoterDrawVO">
|
<select id="findPromoterDrawCount"
|
||||||
|
resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.PromoterDrawVO">
|
||||||
SELECT
|
SELECT
|
||||||
b.promoter_id AS user_id,
|
b.promoter_id AS user_id,
|
||||||
count( CASE b.paid = 1 WHEN 1 THEN 0 END) AS order_count,
|
count( CASE b.paid = 1 WHEN 1 THEN 0 END) AS order_count,
|
||||||
|
@ -87,8 +95,8 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="findListPage"
|
||||||
<select id="findListPage" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO">
|
resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO">
|
||||||
select
|
select
|
||||||
a.order_id,
|
a.order_id,
|
||||||
a.pay_serial_number,
|
a.pay_serial_number,
|
||||||
|
@ -127,7 +135,8 @@
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findListExcel" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderExcelVO">
|
<select id="findListExcel"
|
||||||
|
resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderExcelVO">
|
||||||
select
|
select
|
||||||
a.id,
|
a.id,
|
||||||
a.order_id,
|
a.order_id,
|
||||||
|
|
Loading…
Reference in New Issue