pull/6/head
perry 2023-05-31 00:10:36 +08:00
parent 3a9deab4a5
commit 3292a07845
6 changed files with 26 additions and 39 deletions

View File

@ -37,8 +37,10 @@ public class RechargeOrderExcelVO {
private LocalDateTime payCompleteTime; private LocalDateTime payCompleteTime;
@ExcelProperty("订单类型") @ExcelProperty("订单类型")
private String type="普通订单"; private String type="普通订单";
@ExcelProperty("订单状态")
private String status="已经完成"; @ExcelProperty(value = "订单状态",converter = DictConvert.class)
@DictFormat(DictTypeConstants.PYT_STATUS)
private Integer paid;
@ExcelProperty("配送方式") @ExcelProperty("配送方式")
private String deliveryType="快递(系统快递)(系统快递)"; private String deliveryType="快递(系统快递)(系统快递)";
@ -86,6 +88,6 @@ public class RechargeOrderExcelVO {
private String promoter; private String promoter;
@ExcelProperty("组织名称") @ExcelProperty("组织名称")
private String depName; private String parentOrganizationName;
} }

View File

@ -20,6 +20,8 @@ public class RechargeOrderExportReqVO {
@Schema(description = "租户id") @Schema(description = "租户id")
private Long tenantId; private Long tenantId;
@Schema(description = "商户名称")
private String tenantName;
@Schema(description = "用户id", example = "28969") @Schema(description = "用户id", example = "28969")
private Long uid; private Long uid;
@ -125,4 +127,7 @@ public class RechargeOrderExportReqVO {
@Schema(description = "第三方支付流水号") @Schema(description = "第三方支付流水号")
private String paySerialNumber; private String paySerialNumber;
private Long promoterId;
} }

View File

@ -25,7 +25,7 @@ public class RechargeOrderInfoExcelVO {
private String orderNo; private String orderNo;
@ExcelProperty("商户名称") @ExcelProperty("商户名称")
private String shopName; private String tenantName;
@ExcelProperty("产品名称") @ExcelProperty("产品名称")
private String productName; private String productName;

View File

@ -144,7 +144,7 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
if(promoterDrawVO.getMemberCommission()==null){ if(promoterDrawVO.getMemberCommission()==null){
promoterDrawVO.setMemberCommission(0); promoterDrawVO.setMemberCommission(0);
} }
promoterDrawVO.setDrawAmount(NumberUtil.mul(promoterDrawNew.getDealAmount(),NumberUtil.div(promoterDrawVO.getMemberCommission().toString(),"100"),2)); promoterDrawVO.setDrawAmount(NumberUtil.mul(promoterDrawNew.getDealAmount(),NumberUtil.div(promoterDrawVO.getMemberCommission().toString(),"100",2)));
}else { }else {
promoterDrawVO.setDealAmount(new BigDecimal(0)); promoterDrawVO.setDealAmount(new BigDecimal(0));
promoterDrawVO.setTotalAmount(new BigDecimal(0)); promoterDrawVO.setTotalAmount(new BigDecimal(0));

View File

@ -11,7 +11,7 @@
<select id="getRechargeOrderInfoListExcel" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderInfoExcelVO"> <select id="getRechargeOrderInfoListExcel" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderInfoExcelVO">
select select
a.id as 'orderNo', a.order_id as 'orderNo',
e.name as tenantName, e.name as tenantName,
f.product_name as 'productName', f.product_name as 'productName',
f.price, f.price,

View File

@ -31,14 +31,14 @@
<if test="data.tenantId!=null"> <if test="data.tenantId!=null">
and a.tenant_id=#{data.tenantId} and a.tenant_id=#{data.tenantId}
</if> </if>
<if test="data.tenantId!=null"> <if test="data.parentOrganizationName!=null and data.parentOrganizationName!=''">
and c.parent_Organization_name=#{data.parentOrganizationName} and c.parent_Organization_name like CONCAT('%',#{data.parentOrganizationName},'%')
</if> </if>
<if test="data.mobile!=null and data.mobile!=''"> <if test="data.mobile!=null and data.mobile!=''">
and d.mobile=#{data.mobile} and d.mobile like CONCAT('%',#{data.mobile},'%')
</if> </if>
<if test="data.nickname!=null and data.nickname!=''"> <if test="data.nickname!=null and data.nickname!=''">
and d.nickname=#{data.nickname} and d.nickname like CONCAT('%',#{data.nickname},'%')
</if> </if>
<if test="data.createTime !=null and data.createTime.length>=1"> <if test="data.createTime !=null and data.createTime.length>=1">
and a.create_time &gt;=#{data.createTime[0]} and a.create_time &gt;=#{data.createTime[0]}
@ -49,10 +49,13 @@
</where> </where>
</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 b.promoter_id as user_id,count(case b.paid=1 when 1 then 0 end) as order_count, SELECT
sum(case b.paid =1 when 1 then 0 end) as deal_amount, b.promoter_id AS user_id,
sum(case b.paid in (1,2) when 1 then 0 end) as total_amount count( CASE b.paid = 1 WHEN 1 THEN 0 END) AS order_count,
from cy_recharge_order b sum( CASE WHEN b.paid = 1 THEN b.pay_price ELSE 0 END ) AS deal_amount,
sum( CASE WHEN b.paid IN ( 1, 2 ) THEN b.pay_price ELSE 0 END ) AS total_amount
FROM
cy_recharge_order b
<where> <where>
<if test="promoterIds!=null and promoterIds.size()>0"> <if test="promoterIds!=null and promoterIds.size()>0">
and b.promoter_id in and b.promoter_id in
@ -65,31 +68,7 @@
</select> </select>
<select id="findListPage" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO">
select
a.id,
a.order_id,
a.pay_serial_number,
a.out_trade_no,
a.pay_time,
b.nickname,
a.real_name,
a.uid,
a.user_phone,
a.confirm_phone,
a.pay_type,
a.total_price,
a.pay_price,
a.paid,
a.refund_status,
d.parent_organization_name
from cy_recharge_order a
left join member_user b on a.promoter_id = b.id
left join system_dept d on d.id = a.dept_id
<include refid="baseWhere">
</include>
order by a.pay_time desc
</select>
<select id="findListPage" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO"> <select id="findListPage" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO">
select select
a.order_id, a.order_id,
@ -139,6 +118,7 @@
a.pay_time, a.pay_time,
a.pay_time as payCompleteTime, a.pay_time as payCompleteTime,
a.real_name, a.real_name,
a.paid,
a.user_phone, a.user_phone,
a.confirm_phone, a.confirm_phone,
a.pay_type, a.pay_type,