Browse Source

6.26 查询接口修复

huangqizheng/feature-20250626103451-权限页面
huangqizhen 6 days ago
parent
commit
208079fd1d
  1. 2
      src/main/java/com/example/demo/domain/vo/GoldDetail.java
  2. 12
      src/main/resources/mapper/GoldDetailMapper.xml

2
src/main/java/com/example/demo/domain/vo/GoldDetail.java

@ -36,6 +36,8 @@ public class GoldDetail {
private Date startTime; // 开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date endTime; // 结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date auditTime; // 更新时间
private String sortField; //排序字段
private String sortOrder; //排序顺序

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

@ -8,13 +8,13 @@
left join `user` on `user`.jwcode = `ugr`.jwcode
left join `admin` on `admin`.id = `ugr`.admin_id
<where>
<if test="jwcode != null and jwcode.length > 0">
<if test="jwcode != null">
and `ugr`.jwcode = #{jwcode}
</if>
<if test="payPlatform != null and payPlatform.length > 0">
and `ugr`.pay_platform = #{payPlatform}
</if>
<if test="type != null and type.length > 0">
<if test="type != null">
and `ugr`.type = #{type}
</if>
<if test="market != null and market.length > 0">
@ -38,13 +38,13 @@
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>
<if test="jwcode != null and jwcode.length > 0">
<if test="jwcode != null">
and `ugr`.jwcode = #{jwcode}
</if>
<if test="payPlatform != null and payPlatform.length > 0">
and `ugr`.pay_platform = #{payPlatform}
</if>
<if test="type != null and type.length > 0">
<if test="type != null">
and `ugr`.type = #{type}
</if>
<if test="market != null and market.length > 0">
@ -59,7 +59,7 @@
<select id="getGold" resultType="com.example.demo.domain.entity.User">
select * from user
<where>
<if test="jwcode != null and jwcode.length > 0">
<if test="jwcode != null">
and jwcode = #{jwcode}
</if>
<if test="market != null and market.length > 0">
@ -83,7 +83,7 @@
sum(current_permanent_gold) + sum(current_free_june + current_free_december) + sum(current_task_gold) as Goldtotal
from `user`
<where>
<if test="jwcode != null and jwcode.length > 0">
<if test="jwcode != null">
and jwcode = #{jwcode}
</if>
<if test="market != null and market.length > 0">

Loading…
Cancel
Save