Просмотр исходного кода

各接口操作数据同步到客户统计表

anderx лет назад: 3
Родитель
Сommit
42fc5c517e

+ 2 - 3
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -545,10 +545,10 @@
     from  admin a
     left join user_role ur on ur.uid =a.id left join `role` r on r.id=ur.rid
     left join ( select b.aid,count(*)counts,sum(a.total_amount) totalAmount ,
-    sum(if(a.sales_type < 3 || (a.sales_type > 3 && a.sales_type < 6),1,0 ))newSignNumber,
+    sum(if(a.sales_type < 3 || (a.sales_type > 3 && a.sales_type < 6),1,0 ))newSignNumber,
     sum(if(a.sales_type=3,1,0 ))repeatSignNumber,sum(if(a.sales_type > 5,1,0 ))channelSignNumber
     from t_order_new a left join user b on b.id=a.buyer_id
-    where a.process_status>4 and b.share_type =2
+    where a.process_status <4 and b.share_type =2
   <if test="amountType != null">
     <if test="amountType = 1">
       and  a.total_amount &lt; 10
@@ -568,7 +568,6 @@
   </if>
     group by b.aid)x on x.aid=a.id
     where r.role_type in (96,996)
-
   <if test="aid != null">
     and a.id= #{aid}
   </if>

+ 70 - 0
src/main/java/com/goafanti/order/bo/OutSignStatistics.java

@@ -1,5 +1,75 @@
 package com.goafanti.order.bo;
 
+import java.math.BigDecimal;
+
 public class OutSignStatistics {
 
+    private String id;
+    private String name;
+    private Integer counts;
+    private BigDecimal totalAmount;
+    private Integer newSignNumber;
+    private Integer repeatSignNumber;
+    private Integer channelSignNumber;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getCounts() {
+        if (counts == null) return 0;
+        return counts;
+    }
+
+    public void setCounts(Integer counts) {
+        this.counts = counts;
+    }
+
+    public BigDecimal getTotalAmount() {
+        if (totalAmount == null) return new BigDecimal(0);
+        return totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public Integer getNewSignNumber() {
+        if (newSignNumber == null) return 0;
+        return newSignNumber;
+    }
+
+    public void setNewSignNumber(Integer newSignNumber) {
+        this.newSignNumber = newSignNumber;
+    }
+
+    public Integer getRepeatSignNumber() {
+        if (repeatSignNumber == null) return 0;
+        return repeatSignNumber;
+    }
+
+    public void setRepeatSignNumber(Integer repeatSignNumber) {
+        this.repeatSignNumber = repeatSignNumber;
+    }
+
+    public Integer getChannelSignNumber() {
+        if (channelSignNumber == null) return 0;
+        return channelSignNumber;
+    }
+
+    public void setChannelSignNumber(Integer channelSignNumber) {
+        this.channelSignNumber = channelSignNumber;
+    }
 }