Browse Source

Merge branch 'milestone-20250711-金币重构二期' into sunjiabei/feature-20250710132313-二期模块

huangqizheng/feature-20250717200321-优化导出
sunjiabei 1 month ago
parent
commit
fe97a393aa
  1. 7
      src/main/java/com/example/demo/Mysql/MysqlServiceImpl.java
  2. 4
      src/main/resources/mapper/GoldDetailMapper.xml

7
src/main/java/com/example/demo/Mysql/MysqlServiceImpl.java

@ -77,7 +77,7 @@ public class MysqlServiceImpl implements MysqlService {
//退款类型 61ERP退款退金币
String insertSql = "INSERT INTO user_gold_record (order_code,jwcode,sum_gold,permanent_gold,free_june,free_december," +
"task_gold,pay_platform,goods_name,refund_type,refund_model,remark,type,admin_id," +
"audit_status,create_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ";
"audit_status,create_time,flag) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ";
try (PreparedStatement mysqlStmt = mysqlConn.prepareStatement(insertSql)) {
while (resultSet.next()) {
int gtype = resultSet.getInt("gtype");
@ -159,6 +159,11 @@ public class MysqlServiceImpl implements MysqlService {
mysqlStmt.setString(12, remark);
mysqlStmt.setInt(15, 3);
mysqlStmt.setTimestamp(16, created_at);
if(remark.contains("测试")){
mysqlStmt.setInt(17, 0);
}else {
mysqlStmt.setInt(17, 1);
}
// 更新时的值
mysqlStmt.addBatch();

4
src/main/resources/mapper/GoldDetailMapper.xml

@ -13,6 +13,7 @@
left join `user` on `user`.jwcode = `ugr`.jwcode
left join `admin` on `admin`.id = `ugr`.admin_id
<where>
ugr.flag = 1 and
ugr.audit_status IN (1,3)
<if test="jwcode != null">
and ugr.jwcode = #{jwcode}
@ -44,6 +45,8 @@
select sum(sum_gold) as Goldtotal, sum(permanent_gold) as permanentGold, sum(free_june+free_december) as freeGold, sum(task_gold) as taskGold
from user_gold_record
<where>
ugr.flag = 1 and
ugr.audit_status IN (1,3)
<if test="jwcode != null">
and `ugr`.jwcode = #{jwcode}
</if>
@ -103,6 +106,7 @@
left join `user` on `user`.jwcode = `ugr`.jwcode
left join `admin` on `admin`.id = `ugr`.admin_id
<where>
ugr.flag = 1
<if test="jwcode != null">
and `ugr`.jwcode = #{jwcode}
</if>

Loading…
Cancel
Save