Browse Source

Merge remote-tracking branch 'refs/remotes/origin/lijianlin/feature-20260113-现金管理0109' into milestone-20260113-现金管理0109

lijianlin/feature-20260113-现金管理0109
lijianlin 3 days ago
parent
commit
4a37350bf5
  1. 9
      src/main/java/com/example/demo/domain/vo/coin/ConsumeUser.java
  2. 2
      src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java
  3. 16
      src/main/resources/mapper/ConsumeMapper.xml

9
src/main/java/com/example/demo/domain/vo/coin/ConsumeUser.java

@ -41,6 +41,12 @@ public class ConsumeUser implements Serializable {
private BigDecimal freeGold; // 免费金币 private BigDecimal freeGold; // 免费金币
private BigDecimal taskGold; // 任务金币 private BigDecimal taskGold; // 任务金币
private String remark; // 备注 private String remark; // 备注
// 退款订单相关字段
private BigDecimal refundSumGold;// 退款金币总数
private BigDecimal refundPermanentGold;// 退款永久金币
private BigDecimal refundFreeGold;// 退款免费金币
private BigDecimal refundTaskGold;// 退款任务金币
private String refundModel;// 退款类型 0全部退款 1部分退款
@ExcelIgnore @ExcelIgnore
private Integer adminId; //提交人Id private Integer adminId; //提交人Id
private String adminName; //提交人姓名 private String adminName; //提交人姓名
@ -56,8 +62,7 @@ public class ConsumeUser implements Serializable {
private Date endTime; // 结束时间 private Date endTime; // 结束时间
@ExcelIgnore @ExcelIgnore
private String refundType; // 退款类型 private String refundType; // 退款类型
@ExcelIgnore
private String refundModel; // 退款模型
@ExcelIgnore @ExcelIgnore
private String sortField; //排序字段 private String sortField; //排序字段
@ExcelIgnore @ExcelIgnore

2
src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java

@ -382,7 +382,7 @@ public class RedServiceImpl implements RedService {
userGoldRecord.setTaskGold(-consumeUser.getTaskGold().intValue()); userGoldRecord.setTaskGold(-consumeUser.getTaskGold().intValue());
userGoldRecord.setRemark(consumeUser.getRemark()); userGoldRecord.setRemark(consumeUser.getRemark());
userGoldRecord.setType((byte) 1); userGoldRecord.setType((byte) 1);
userGoldRecord.setIsRefund((byte) 1);
userGoldRecord.setIsRefund((byte) 0);
userGoldRecord.setPayPlatform("金币系统"); userGoldRecord.setPayPlatform("金币系统");
userGoldRecord.setAdminId(consumeUser.getAdminId()); userGoldRecord.setAdminId(consumeUser.getAdminId());
userGoldRecord.setAuditStatus(1); userGoldRecord.setAuditStatus(1);

16
src/main/resources/mapper/ConsumeMapper.xml

@ -87,13 +87,24 @@
ugr.remark AS remark, ugr.remark AS remark,
a.admin_name AS adminName, a.admin_name AS adminName,
ugr.create_time AS createTime, ugr.create_time AS createTime,
ugr.is_refund AS isRefund
ugr.is_refund AS isRefund,
-- 关联退款订单信息
ugr1.sum_gold/100 AS refundSumGold,
ugr1.permanent_gold/100 AS refundPermanentGold,
(COALESCE(ugr1.free_june, 0) + COALESCE(ugr1.free_december, 0))/100 AS refundFreeGold,
ugr1.task_gold/100 AS refundTaskGold,
ugr1.refund_model AS refundModel
FROM user_gold_record ugr FROM user_gold_record ugr
left JOIN left JOIN
user u ON u.jwcode = ugr.jwcode user u ON u.jwcode = ugr.jwcode
left JOIN left JOIN
admin a ON ugr.admin_id = a.id admin a ON ugr.admin_id = a.id
left join market m ON u.market = m.id left join market m ON u.market = m.id
-- 关联退款订单
left JOIN user_gold_record ugr1 ON (
ugr.is_refund = 1
AND ugr1.order_code = CONCAT('TK_', ugr.order_code)
)
<where> <where>
ugr.type = 1 AND ugr.flag = 1 ugr.type = 1 AND ugr.flag = 1
@ -109,6 +120,9 @@
<if test="jwcode != null and jwcode != ''"> <if test="jwcode != null and jwcode != ''">
AND ugr.jwcode = #{jwcode} AND ugr.jwcode = #{jwcode}
</if> </if>
<if test="isRefund != null ">
AND ugr.is_refund = #{isRefund}
</if>
<if test="goodsName != null and goodsName != ''"> <if test="goodsName != null and goodsName != ''">
AND ugr.goods_name = #{goodsName} AND ugr.goods_name = #{goodsName}
</if> </if>

Loading…
Cancel
Save