3 Commits

  1. 8
      pom.xml
  2. 2
      src/main/java/com/example/demo/domain/dou/Pay.java
  3. 2
      src/main/java/com/example/demo/domain/dou/RechargeTotal.java
  4. 1
      src/main/java/com/example/demo/domain/dou/Spend.java
  5. 2
      src/main/java/com/example/demo/mapper/ConsumeMapper.java
  6. 10
      src/main/resources/mapperLink/DouMapper.xml
  7. 7
      src/main/resources/mapperPay/PayMapper.xml

8
pom.xml

@ -16,7 +16,7 @@
<description>demo</description> <description>demo</description>
<properties> <properties>
<java.version>1.8</java.version>
<java.version>21</java.version>
</properties> </properties>
<dependencies> <dependencies>
<!-- Maven --> <!-- Maven -->
@ -126,9 +126,9 @@
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.46</version>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>

2
src/main/java/com/example/demo/domain/dou/Pay.java

@ -20,7 +20,7 @@ public class Pay {
private String nickname; private String nickname;
private BigDecimal price; private BigDecimal price;
private Integer count; private Integer count;
private Integer payStyle;
private String payStyle;
private Integer state; private Integer state;
private Integer platfrom; private Integer platfrom;
private Integer successTime; private Integer successTime;

2
src/main/java/com/example/demo/domain/dou/RechargeTotal.java

@ -19,7 +19,7 @@ public class RechargeTotal {
private String type; private String type;
private BigDecimal priceTotal; private BigDecimal priceTotal;
private Integer countTotal; private Integer countTotal;
private Integer payStyle;
private String payStyle;
private String deptName; private String deptName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")

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

@ -37,4 +37,5 @@ public class Spend implements Serializable {
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endTime; private Date endTime;
private String room; private String room;
private Integer sourceType;
} }

2
src/main/java/com/example/demo/mapper/ConsumeMapper.java

@ -35,7 +35,7 @@ public interface ConsumeMapper {
"(jwcode,order_code,activity_id,recharge_way,product_id,consume_platform,consume_type,refund_type,refund_goods," + "(jwcode,order_code,activity_id,recharge_way,product_id,consume_platform,consume_type,refund_type,refund_goods," +
"contact_id,remark,recharge_coin,free_coin,task_coin,admin_id,update_type,detail_flag,refund_flag,create_time,first_recharge,`name`,username,area,product_name)", "contact_id,remark,recharge_coin,free_coin,task_coin,admin_id,update_type,detail_flag,refund_flag,create_time,first_recharge,`name`,username,area,product_name)",
"values ", "values ",
"(#{jwcode},#{orderCode},#{activityId},#{rechargeWay},#{productId},'金币系统','购买商品',#{refundType}" +
"(#{jwcode},#{orderCode},#{activityId},#{rechargeWay},#{productId},'4','购买商品',#{refundType}" +
",#{refundGoods},#{contactId},#{remark},#{rechargeCoin}" + ",#{refundGoods},#{contactId},#{remark},#{rechargeCoin}" +
",#{freeCoin},#{taskCoin},#{adminId},#{updateType},1,1,now(),#{firstRecharge},#{name},#{username},#{area},#{productName})" ",#{freeCoin},#{taskCoin},#{adminId},#{updateType},1,1,now(),#{firstRecharge},#{name},#{username},#{area},#{productName})"
}) })

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

@ -83,7 +83,7 @@
fm.nickname, fm.nickname,
fy.content, fy.content,
fy.pay_type, fy.pay_type,
fy.source_type AS good,
fy.source_type,
fm.jwcode, fm.jwcode,
fm.ip_address, fm.ip_address,
fy.money_free, fy.money_free,
@ -109,10 +109,10 @@
<if test="sourceName != null and sourceName.length > 0"> <if test="sourceName != null and sourceName.length > 0">
AND fy.source_name = #{sourceName} AND fy.source_name = #{sourceName}
</if> </if>
<if test="payType != null and payType.length > 0">
<if test="payType != null">
AND fy.pay_type = #{payType} AND fy.pay_type = #{payType}
</if> </if>
<if test="good != null and good.length > 0">
<if test="sourceType != null">
AND fy.source_type = #{good} AND fy.source_type = #{good}
</if> </if>
<if test="startTime != null and endTime != null"> <if test="startTime != null and endTime != null">
@ -144,10 +144,10 @@
<if test="sourceName != null and sourceName.length > 0"> <if test="sourceName != null and sourceName.length > 0">
AND fy.source_name = #{sourceName} AND fy.source_name = #{sourceName}
</if> </if>
<if test="payType != null and payType.length > 0">
<if test="payType != null">
AND fy.pay_type = #{payType} AND fy.pay_type = #{payType}
</if> </if>
<if test="sourceType != null and sourceType.length > 0">
<if test="sourceType != null ">
AND fy.source_type = #{sourceType} AND fy.source_type = #{sourceType}
</if> </if>
<if test="startTime != null and endTime != null"> <if test="startTime != null and endTime != null">

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

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.demo.mapperPay.PayMapper"> <mapper namespace="com.example.demo.mapperPay.PayMapper">
<select id="getPay" resultType="com.example.demo.domain.dou.Pay"> <select id="getPay" resultType="com.example.demo.domain.dou.Pay">
SELECT go.jwcode,mi.name,mi.deptName,mi.shopName,go.type,go.order_no,go.price,go.count,gps.`name`,go.success_time from g_order as go
SELECT gps.`name` as payStyle,go.jwcode,mi.name,mi.deptName,mi.shopName,go.type,go.order_no,go.price,go.count,gps.`name`,go.success_time from g_order as go
LEFT JOIN member_info as mi on go.jwcode = mi.jwcode LEFT JOIN member_info as mi on go.jwcode = mi.jwcode
LEFT JOIN g_pay_style gps on go.pay_style=gps.id LEFT JOIN g_pay_style gps on go.pay_style=gps.id
<where> <where>
@ -18,7 +18,7 @@ LEFT JOIN member_info as mi on go.jwcode = mi.jwcode
and go.type = #{type} and go.type = #{type}
</if> </if>
<if test="payStyle != null and payStyle.length > 0"> <if test="payStyle != null and payStyle.length > 0">
and go.pay_style = #{payStyle}
and gps.`name` = #{payStyle}
</if> </if>
<if test="deptName !=null and deptName.length > 0"> <if test="deptName !=null and deptName.length > 0">
and mi.deptName = #{deptName} and mi.deptName = #{deptName}
@ -44,6 +44,7 @@ LEFT JOIN member_info as mi on go.jwcode = mi.jwcode
sum(price) as priceTotal, sum(price) as priceTotal,
sum(count) as countTotal sum(count) as countTotal
FROM g_order as go FROM g_order as go
LEFT JOIN g_pay_style gps on go.pay_style=gps.id
<where> <where>
<if test="jwcode != null"> <if test="jwcode != null">
and go.jwcode = #{jwcode} and go.jwcode = #{jwcode}
@ -55,7 +56,7 @@ LEFT JOIN member_info as mi on go.jwcode = mi.jwcode
and go.type = #{type} and go.type = #{type}
</if> </if>
<if test="payStyle != null and payStyle.length > 0"> <if test="payStyle != null and payStyle.length > 0">
and go.pay_style = #{payStyle}
and gps.`name` = #{payStyle}
</if> </if>
<if test="deptName !=null and deptName.length > 0"> <if test="deptName !=null and deptName.length > 0">
and mi.deptName = #{deptName} and mi.deptName = #{deptName}

Loading…
Cancel
Save