Browse Source

4.25 修复bug

Huang
huangqizhen 3 weeks ago
parent
commit
e0d2073597
  1. 4
      src/main/java/com/example/demo/controller/DouController.java
  2. 28
      src/main/java/com/example/demo/domain/dou/Total.java
  3. 2
      src/main/java/com/example/demo/mapperLink/DouMapper.java
  4. 2
      src/main/java/com/example/demo/serviceImpl/AuditServiceImpl.java
  5. 5
      src/main/java/com/example/demo/serviceImpl/DouServiceImpl.java
  6. 2
      src/main/java/com/example/demo/sevice/DouService.java
  7. 23
      src/main/resources/mapperLink/DouMapper.xml
  8. 1
      src/main/resources/mapperPay/PayMapper.xml

4
src/main/java/com/example/demo/controller/DouController.java

@ -110,4 +110,8 @@ public class DouController {
public Result SearchPayIp(){
return Result.success(douService.SearchPayIp());
}
@RequestMapping("/getTotal")
public Result getTotal(@RequestBody Total total){
return Result.success(douService.getTotal(total));
}
}

28
src/main/java/com/example/demo/domain/dou/Total.java

@ -0,0 +1,28 @@
package com.example.demo.domain.dou;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Total {
private String token;
private String jwcode;
private String orderNo;
private String type;
private String ipAddress;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endTime;
private Integer count;
private Integer price;
}

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

@ -18,6 +18,6 @@ public interface DouMapper {
Integer getSpendTotal(SpendTotal spendTotal);
List<Pay> getPay(Pay pay);
List<String> getPayIp();
RechargeTotal getRechargeTotal(RechargeTotal rechargeTotal);
Total getTotal(Total total);
}

2
src/main/java/com/example/demo/serviceImpl/AuditServiceImpl.java

@ -149,7 +149,7 @@ public class AuditServiceImpl implements AuditService {
GoldTistV2.addCoinNew(jwcode, 64, paidGold.doubleValue()/100, remark, 0, name, "金币充值");
}
if(freeGold != null && freeGold.compareTo(BigDecimal.ZERO) != 0) {
GoldTistV2.addCoinNew(jwcode, 63, freeGold.doubleValue()/100, remark, 0, name, "金币充值 ");
GoldTistV2.addCoinNew(jwcode, 63, freeGold.doubleValue()/100, remark, 0, name, "金币充值");
}
}
return auditMapper.update(audit);

5
src/main/java/com/example/demo/serviceImpl/DouServiceImpl.java

@ -185,4 +185,9 @@ public class DouServiceImpl implements DouService {
List<Pay> list= payMapper.getPay(pay);
return new PageInfo<>(list);
}
@Override
public Total getTotal(Total total) {
return douMapper.getTotal(total);
}
}

2
src/main/java/com/example/demo/sevice/DouService.java

@ -27,5 +27,7 @@ public interface DouService {
List<String> SearchStyle();
List<String> SearchPayIp();
Object SearchPay(Integer pageNum, Integer pageSize, Pay pay);
Total getTotal(Total total);
}

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

@ -106,22 +106,19 @@
<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 fy.pay_type = #{payType}
</if>
<if test="sourceType != null">
AND fy.source_type = #{good}
AND fy.source_type = #{sourceType}
</if>
<if test="startTime != null and endTime != null">
AND FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
</if>
) AS subquery
WHERE 1=1
<if test="room != null and room.length > 0">
AND room LIKE CONCAT('%', #{room}, '%')
<if test="sourceName != null and sourceName.length > 0">
AND room LIKE CONCAT('%', #{sourceName}, '%')
</if>
<choose>
<when test="sortField != null and sortField.length > 0 or sortOrder != null and sortOrder.length > 0">
@ -177,10 +174,10 @@
and fy.order_no = #{orderNo}
</if>
<if test="type != null and type.length > 0">
and type LIKE CONCAT('%', #{type}, '%')
and content LIKE CONCAT('%', #{type}, '%')
</if>
<if test="ipAddress != null and ipAddress.length > 0">
and fm.ip_address = #{ipAddress}
<if test="deptName != null and deptName.length > 0">
and fm.ip_address = #{deptName}
</if>
<if test="startTime != null and endTime != null">
and FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}
@ -195,15 +192,15 @@
<select id="getPayIp" resultType="java.lang.String">
select DISTINCT ip_address from fx_member WHERE ip_address is not null
</select>
<select id="getRechargeTotal" resultType="com.example.demo.domain.dou.RechargeTotal">
<select id="getTotal" resultType="com.example.demo.domain.dou.Total">
SELECT
sum(money)/50 as priceTotal,
sum(money) as countTotal
sum(money)/50 as price,
sum(money) as count
from fx_yaoqing_records as fy
LEFT JOIN fx_member as fm on fy.uid = fm.id
<where>
`data`=0
<if test="jwcode != null">
<if test="jwcode != null and jwcode.length > 0">
and fm.jwcode = #{jwcode}
</if>
<if test="orderNo != null and orderNo.length > 0">

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

@ -45,6 +45,7 @@ LEFT JOIN member_info as mi on go.jwcode = mi.jwcode
sum(count) as countTotal
FROM g_order as go
LEFT JOIN g_pay_style gps on go.pay_style=gps.id
LEFT JOIN member_info as mi on go.jwcode = mi.jwcode
<where>
<if test="jwcode != null">
and go.jwcode = #{jwcode}

Loading…
Cancel
Save