Browse Source

4.17 充值的时间条件查询修改

Huang
huangqizhen 1 month ago
parent
commit
d89e348e68
  1. 30
      src/main/java/com/example/demo/domain/dou/Spend.java
  2. 1
      src/main/java/com/example/demo/mapperLink/DouMapper.java
  3. 1
      src/main/java/com/example/demo/mapperPay/PayMapper.java
  4. 34
      src/main/resources/mapperLink/DouMapper.xml
  5. 2
      src/main/resources/mapperPay/PayMapper.xml

30
src/main/java/com/example/demo/domain/dou/Spend.java

@ -0,0 +1,30 @@
package com.example.demo.domain.dou;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Spend implements Serializable {
private static final long serialVersionUID = 1L;
private String jwcode;
private String nickname;
private String ipAddress;
private Integer jinbi;
private Integer jinbiFree;
private Integer jinbiBuy;
private Integer jinbiCostTotal;
private String token;
private String sortField;
private String sortOrder;
private String sourceName;
private String content;
private Integer payType;
private Integer sourceType;
private Integer time;
}

1
src/main/java/com/example/demo/mapperLink/DouMapper.java

@ -14,5 +14,6 @@ public interface DouMapper {
List<Yve> getYve(Yve yve);
YveTotal getYveTotal(YveTotal yveTotal);
List<String> getIp();
List<Spend> getSpend(Spend spend);
}

1
src/main/java/com/example/demo/mapperPay/PayMapper.java

@ -10,4 +10,5 @@ public interface PayMapper {
List<Pay> getPay(Pay pay);
List<String> getPayIp();
List<String> getStyle();
}

34
src/main/resources/mapperLink/DouMapper.xml

@ -74,5 +74,39 @@
<select id="getIp" resultType="java.lang.String">
SELECT DISTINCT ip_address FROM fx_member WHERE ip_address is not null
</select>
<select id="getSpend" resultType="com.example.demo.domain.dou.Spend">
SELECT
fm.nickname,
fy.content,
fy.pay_type,
fm.jwcode,
fm.ip_address ,
fy.money_free ,
fy.money_buy ,
fy.money ,
fy.source_name,
fy.`time`
FROM fx_member fm
LEFT JOIN fx_yaoqing_records fy ON fm.id = fy.uid
<where>
<if test="jwcode != null and jwcode.length > 0">
AND fm.jwcode = #{jwcode}
</if>
<if test="ipAddress != null and ipAddress.length > 0">
AND fm.ip_address = #{ipAddress}
</if>
<if test="sourceName != null and sourceName.length > 0">
AND fy.source_name = #{sourceName}
</if>
<if test="payType != null and payType.length > 0">
AND fy.pay_type = #{payType}
</if>
<if test="sourceType != null and sourceType.length > 0">
AND fy.source_type = #{sourceType}
</if>
</where>
</select>
</mapper>

2
src/main/resources/mapperPay/PayMapper.xml

@ -24,7 +24,7 @@ LEFT JOIN member_info as mi on go.jwcode = mi.jwcode
mi.deptName = #{deptName}
</if>
<if test="startTime != null and endTime != null">
and go.success_time BETWEEN #{startTime} AND #{endTime}
and FROM_UNIXTIME(go.success_time) BETWEEN #{startTime} AND #{endTime}
</if>
</where>
</select>

Loading…
Cancel
Save