Ver Fonte

新增用户统计接口,还未接入消耗的接口

tianyunperfect há 3 anos atrás
pai
commit
2feb7d2705

+ 107 - 38
book-dao/src/main/java/com/book/dao/polardb/entity/SunStaticUserDay.java

@@ -13,7 +13,7 @@ public class SunStaticUserDay implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day.id
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer id;
 
@@ -22,7 +22,7 @@ public class SunStaticUserDay implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day.static_date
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private String staticDate;
 
@@ -31,7 +31,7 @@ public class SunStaticUserDay implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day.new_all_user
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer newAllUser;
 
@@ -40,7 +40,7 @@ public class SunStaticUserDay implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day.new_recharge_user
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer newRechargeUser;
 
@@ -49,7 +49,7 @@ public class SunStaticUserDay implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day.new_recharge_sum
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private String newRechargeSum;
 
@@ -58,16 +58,43 @@ public class SunStaticUserDay implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day.new_recharge_count
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer newRechargeCount;
 
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_static_user_day.recharge_avg
+     *
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+     */
+    private String rechargeAvg;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_static_user_day.recharge_rate
+     *
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+     */
+    private String rechargeRate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_static_user_day.price
+     *
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+     */
+    private String price;
+
     /**
      *
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day.insert_time
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Date insertTime;
 
@@ -75,7 +102,7 @@ public class SunStaticUserDay implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private static final long serialVersionUID = 1L;
 
@@ -83,7 +110,7 @@ public class SunStaticUserDay implements Serializable {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static SunStaticUserDay.Builder builder() {
         return new SunStaticUserDay.Builder();
@@ -93,14 +120,14 @@ public class SunStaticUserDay implements Serializable {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static class Builder {
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private SunStaticUserDay obj;
 
@@ -108,7 +135,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder() {
             this.obj = new SunStaticUserDay();
@@ -120,7 +147,7 @@ public class SunStaticUserDay implements Serializable {
          *
          * @param id the value for sun_static_user_day.id
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder id(Integer id) {
             obj.setId(id);
@@ -133,7 +160,7 @@ public class SunStaticUserDay implements Serializable {
          *
          * @param staticDate the value for sun_static_user_day.static_date
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder staticDate(String staticDate) {
             obj.setStaticDate(staticDate);
@@ -146,7 +173,7 @@ public class SunStaticUserDay implements Serializable {
          *
          * @param newAllUser the value for sun_static_user_day.new_all_user
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newAllUser(Integer newAllUser) {
             obj.setNewAllUser(newAllUser);
@@ -159,7 +186,7 @@ public class SunStaticUserDay implements Serializable {
          *
          * @param newRechargeUser the value for sun_static_user_day.new_recharge_user
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newRechargeUser(Integer newRechargeUser) {
             obj.setNewRechargeUser(newRechargeUser);
@@ -172,7 +199,7 @@ public class SunStaticUserDay implements Serializable {
          *
          * @param newRechargeSum the value for sun_static_user_day.new_recharge_sum
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newRechargeSum(String newRechargeSum) {
             obj.setNewRechargeSum(newRechargeSum);
@@ -185,20 +212,59 @@ public class SunStaticUserDay implements Serializable {
          *
          * @param newRechargeCount the value for sun_static_user_day.new_recharge_count
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newRechargeCount(Integer newRechargeCount) {
             obj.setNewRechargeCount(newRechargeCount);
             return this;
         }
 
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_static_user_day.recharge_avg
+         *
+         * @param rechargeAvg the value for sun_static_user_day.recharge_avg
+         *
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+         */
+        public Builder rechargeAvg(String rechargeAvg) {
+            obj.setRechargeAvg(rechargeAvg);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_static_user_day.recharge_rate
+         *
+         * @param rechargeRate the value for sun_static_user_day.recharge_rate
+         *
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+         */
+        public Builder rechargeRate(String rechargeRate) {
+            obj.setRechargeRate(rechargeRate);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_static_user_day.price
+         *
+         * @param price the value for sun_static_user_day.price
+         *
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+         */
+        public Builder price(String price) {
+            obj.setPrice(price);
+            return this;
+        }
+
         /**
          * This method was generated by MyBatis Generator.
          * This method sets the value of the database column sun_static_user_day.insert_time
          *
          * @param insertTime the value for sun_static_user_day.insert_time
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder insertTime(Date insertTime) {
             obj.setInsertTime(insertTime);
@@ -209,7 +275,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public SunStaticUserDay build() {
             return this.obj;
@@ -220,7 +286,7 @@ public class SunStaticUserDay implements Serializable {
      * This enum was generated by MyBatis Generator.
      * This enum corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public enum Column {
         id("id", "id", "INTEGER", false),
@@ -229,13 +295,16 @@ public class SunStaticUserDay implements Serializable {
         newRechargeUser("new_recharge_user", "newRechargeUser", "INTEGER", false),
         newRechargeSum("new_recharge_sum", "newRechargeSum", "VARCHAR", false),
         newRechargeCount("new_recharge_count", "newRechargeCount", "INTEGER", false),
+        rechargeAvg("recharge_avg", "rechargeAvg", "VARCHAR", false),
+        rechargeRate("recharge_rate", "rechargeRate", "VARCHAR", false),
+        price("price", "price", "VARCHAR", false),
         insertTime("insert_time", "insertTime", "TIMESTAMP", false);
 
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private static final String BEGINNING_DELIMITER = "\"";
 
@@ -243,7 +312,7 @@ public class SunStaticUserDay implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private static final String ENDING_DELIMITER = "\"";
 
@@ -251,7 +320,7 @@ public class SunStaticUserDay implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final String column;
 
@@ -259,7 +328,7 @@ public class SunStaticUserDay implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final boolean isColumnNameDelimited;
 
@@ -267,7 +336,7 @@ public class SunStaticUserDay implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final String javaProperty;
 
@@ -275,7 +344,7 @@ public class SunStaticUserDay implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final String jdbcType;
 
@@ -283,7 +352,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String value() {
             return this.column;
@@ -293,7 +362,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getValue() {
             return this.column;
@@ -303,7 +372,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getJavaProperty() {
             return this.javaProperty;
@@ -313,7 +382,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getJdbcType() {
             return this.jdbcType;
@@ -323,7 +392,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
             this.column = column;
@@ -336,7 +405,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String desc() {
             return this.getEscapedColumnName() + " DESC";
@@ -346,7 +415,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String asc() {
             return this.getEscapedColumnName() + " ASC";
@@ -356,7 +425,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public static Column[] excludes(Column ... excludes) {
             ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
@@ -370,7 +439,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public static Column[] all() {
             return Column.values();
@@ -380,7 +449,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getEscapedColumnName() {
             if (this.isColumnNameDelimited) {
@@ -394,7 +463,7 @@ public class SunStaticUserDay implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getAliasedEscapedColumnName() {
             return this.getEscapedColumnName();

+ 111 - 42
book-dao/src/main/java/com/book/dao/polardb/entity/SunStaticUserDayChannel.java

@@ -13,7 +13,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.id
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer id;
 
@@ -22,7 +22,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.static_date
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private String staticDate;
 
@@ -31,7 +31,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.channel_id
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private String channelId;
 
@@ -40,7 +40,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.channel_name
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private String channelName;
 
@@ -49,7 +49,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.new_all_user
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer newAllUser;
 
@@ -58,7 +58,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.new_recharge_user
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer newRechargeUser;
 
@@ -67,7 +67,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.new_recharge_sum
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private String newRechargeSum;
 
@@ -76,16 +76,43 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.new_recharge_count
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Integer newRechargeCount;
 
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_static_user_day_channel.recharge_avg
+     *
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+     */
+    private String rechargeAvg;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_static_user_day_channel.recharge_rate
+     *
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+     */
+    private String rechargeRate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_static_user_day_channel.price
+     *
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+     */
+    private String price;
+
     /**
      *
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column sun_static_user_day_channel.insert_time
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private Date insertTime;
 
@@ -93,7 +120,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     private static final long serialVersionUID = 1L;
 
@@ -101,7 +128,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static SunStaticUserDayChannel.Builder builder() {
         return new SunStaticUserDayChannel.Builder();
@@ -111,14 +138,14 @@ public class SunStaticUserDayChannel implements Serializable {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static class Builder {
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private SunStaticUserDayChannel obj;
 
@@ -126,7 +153,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder() {
             this.obj = new SunStaticUserDayChannel();
@@ -138,7 +165,7 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param id the value for sun_static_user_day_channel.id
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder id(Integer id) {
             obj.setId(id);
@@ -151,7 +178,7 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param staticDate the value for sun_static_user_day_channel.static_date
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder staticDate(String staticDate) {
             obj.setStaticDate(staticDate);
@@ -164,7 +191,7 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param channelId the value for sun_static_user_day_channel.channel_id
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder channelId(String channelId) {
             obj.setChannelId(channelId);
@@ -177,7 +204,7 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param channelName the value for sun_static_user_day_channel.channel_name
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder channelName(String channelName) {
             obj.setChannelName(channelName);
@@ -190,7 +217,7 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param newAllUser the value for sun_static_user_day_channel.new_all_user
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newAllUser(Integer newAllUser) {
             obj.setNewAllUser(newAllUser);
@@ -203,7 +230,7 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param newRechargeUser the value for sun_static_user_day_channel.new_recharge_user
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newRechargeUser(Integer newRechargeUser) {
             obj.setNewRechargeUser(newRechargeUser);
@@ -216,7 +243,7 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param newRechargeSum the value for sun_static_user_day_channel.new_recharge_sum
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newRechargeSum(String newRechargeSum) {
             obj.setNewRechargeSum(newRechargeSum);
@@ -229,20 +256,59 @@ public class SunStaticUserDayChannel implements Serializable {
          *
          * @param newRechargeCount the value for sun_static_user_day_channel.new_recharge_count
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder newRechargeCount(Integer newRechargeCount) {
             obj.setNewRechargeCount(newRechargeCount);
             return this;
         }
 
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_static_user_day_channel.recharge_avg
+         *
+         * @param rechargeAvg the value for sun_static_user_day_channel.recharge_avg
+         *
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+         */
+        public Builder rechargeAvg(String rechargeAvg) {
+            obj.setRechargeAvg(rechargeAvg);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_static_user_day_channel.recharge_rate
+         *
+         * @param rechargeRate the value for sun_static_user_day_channel.recharge_rate
+         *
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+         */
+        public Builder rechargeRate(String rechargeRate) {
+            obj.setRechargeRate(rechargeRate);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_static_user_day_channel.price
+         *
+         * @param price the value for sun_static_user_day_channel.price
+         *
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
+         */
+        public Builder price(String price) {
+            obj.setPrice(price);
+            return this;
+        }
+
         /**
          * This method was generated by MyBatis Generator.
          * This method sets the value of the database column sun_static_user_day_channel.insert_time
          *
          * @param insertTime the value for sun_static_user_day_channel.insert_time
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Builder insertTime(Date insertTime) {
             obj.setInsertTime(insertTime);
@@ -253,7 +319,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public SunStaticUserDayChannel build() {
             return this.obj;
@@ -264,7 +330,7 @@ public class SunStaticUserDayChannel implements Serializable {
      * This enum was generated by MyBatis Generator.
      * This enum corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public enum Column {
         id("id", "id", "INTEGER", false),
@@ -275,13 +341,16 @@ public class SunStaticUserDayChannel implements Serializable {
         newRechargeUser("new_recharge_user", "newRechargeUser", "INTEGER", false),
         newRechargeSum("new_recharge_sum", "newRechargeSum", "VARCHAR", false),
         newRechargeCount("new_recharge_count", "newRechargeCount", "INTEGER", false),
+        rechargeAvg("recharge_avg", "rechargeAvg", "VARCHAR", false),
+        rechargeRate("recharge_rate", "rechargeRate", "VARCHAR", false),
+        price("price", "price", "VARCHAR", false),
         insertTime("insert_time", "insertTime", "TIMESTAMP", false);
 
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private static final String BEGINNING_DELIMITER = "\"";
 
@@ -289,7 +358,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private static final String ENDING_DELIMITER = "\"";
 
@@ -297,7 +366,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final String column;
 
@@ -305,7 +374,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final boolean isColumnNameDelimited;
 
@@ -313,7 +382,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final String javaProperty;
 
@@ -321,7 +390,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private final String jdbcType;
 
@@ -329,7 +398,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String value() {
             return this.column;
@@ -339,7 +408,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getValue() {
             return this.column;
@@ -349,7 +418,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getJavaProperty() {
             return this.javaProperty;
@@ -359,7 +428,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getJdbcType() {
             return this.jdbcType;
@@ -369,7 +438,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
             this.column = column;
@@ -382,7 +451,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String desc() {
             return this.getEscapedColumnName() + " DESC";
@@ -392,7 +461,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String asc() {
             return this.getEscapedColumnName() + " ASC";
@@ -402,7 +471,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public static Column[] excludes(Column ... excludes) {
             ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
@@ -416,7 +485,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public static Column[] all() {
             return Column.values();
@@ -426,7 +495,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getEscapedColumnName() {
             if (this.isColumnNameDelimited) {
@@ -440,7 +509,7 @@ public class SunStaticUserDayChannel implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public String getAliasedEscapedColumnName() {
             return this.getEscapedColumnName();

+ 1 - 0
book-dao/src/main/java/com/book/dao/polardb/mapper/SunStaticOrderDay2Mapper.java

@@ -13,5 +13,6 @@ import java.util.List;
 @Repository
 public interface SunStaticOrderDay2Mapper {
     HashMap selectHistory();
+    HashMap selectUserHistory();
 
 }

+ 19 - 19
book-dao/src/main/java/com/book/dao/polardb/mapper/SunStaticUserDayChannelMapper.java

@@ -14,7 +14,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     long countByExample(SunStaticUserDayChannelExample example);
 
@@ -22,7 +22,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int deleteByExample(SunStaticUserDayChannelExample example);
 
@@ -30,7 +30,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int deleteByPrimaryKey(Integer id);
 
@@ -38,7 +38,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int insert(SunStaticUserDayChannel record);
 
@@ -46,7 +46,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int insertSelective(@Param("record") SunStaticUserDayChannel record, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 
@@ -54,7 +54,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDayChannel selectOneByExample(SunStaticUserDayChannelExample example);
 
@@ -62,7 +62,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDayChannel selectOneByExampleSelective(@Param("example") SunStaticUserDayChannelExample example, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 
@@ -70,7 +70,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     List<SunStaticUserDayChannel> selectByExampleSelective(@Param("example") SunStaticUserDayChannelExample example, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 
@@ -78,7 +78,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     List<SunStaticUserDayChannel> selectByExample(SunStaticUserDayChannelExample example);
 
@@ -86,7 +86,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDayChannel selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 
@@ -94,7 +94,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDayChannel selectByPrimaryKey(Integer id);
 
@@ -102,7 +102,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByExampleSelective(@Param("record") SunStaticUserDayChannel record, @Param("example") SunStaticUserDayChannelExample example, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 
@@ -110,7 +110,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByExample(@Param("record") SunStaticUserDayChannel record, @Param("example") SunStaticUserDayChannelExample example);
 
@@ -118,7 +118,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByPrimaryKeySelective(@Param("record") SunStaticUserDayChannel record, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 
@@ -126,7 +126,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByPrimaryKey(SunStaticUserDayChannel record);
 
@@ -134,7 +134,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int batchInsert(@Param("list") List<SunStaticUserDayChannel> list);
 
@@ -142,7 +142,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int batchInsertSelective(@Param("list") List<SunStaticUserDayChannel> list, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 
@@ -150,7 +150,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int upsert(SunStaticUserDayChannel record);
 
@@ -158,7 +158,7 @@ public interface SunStaticUserDayChannelMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int upsertSelective(@Param("record") SunStaticUserDayChannel record, @Param("selective") SunStaticUserDayChannel.Column ... selective);
 }

+ 19 - 19
book-dao/src/main/java/com/book/dao/polardb/mapper/SunStaticUserDayMapper.java

@@ -14,7 +14,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     long countByExample(SunStaticUserDayExample example);
 
@@ -22,7 +22,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int deleteByExample(SunStaticUserDayExample example);
 
@@ -30,7 +30,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int deleteByPrimaryKey(Integer id);
 
@@ -38,7 +38,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int insert(SunStaticUserDay record);
 
@@ -46,7 +46,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int insertSelective(@Param("record") SunStaticUserDay record, @Param("selective") SunStaticUserDay.Column ... selective);
 
@@ -54,7 +54,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDay selectOneByExample(SunStaticUserDayExample example);
 
@@ -62,7 +62,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDay selectOneByExampleSelective(@Param("example") SunStaticUserDayExample example, @Param("selective") SunStaticUserDay.Column ... selective);
 
@@ -70,7 +70,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     List<SunStaticUserDay> selectByExampleSelective(@Param("example") SunStaticUserDayExample example, @Param("selective") SunStaticUserDay.Column ... selective);
 
@@ -78,7 +78,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     List<SunStaticUserDay> selectByExample(SunStaticUserDayExample example);
 
@@ -86,7 +86,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDay selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") SunStaticUserDay.Column ... selective);
 
@@ -94,7 +94,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     SunStaticUserDay selectByPrimaryKey(Integer id);
 
@@ -102,7 +102,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByExampleSelective(@Param("record") SunStaticUserDay record, @Param("example") SunStaticUserDayExample example, @Param("selective") SunStaticUserDay.Column ... selective);
 
@@ -110,7 +110,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByExample(@Param("record") SunStaticUserDay record, @Param("example") SunStaticUserDayExample example);
 
@@ -118,7 +118,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByPrimaryKeySelective(@Param("record") SunStaticUserDay record, @Param("selective") SunStaticUserDay.Column ... selective);
 
@@ -126,7 +126,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int updateByPrimaryKey(SunStaticUserDay record);
 
@@ -134,7 +134,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int batchInsert(@Param("list") List<SunStaticUserDay> list);
 
@@ -142,7 +142,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int batchInsertSelective(@Param("list") List<SunStaticUserDay> list, @Param("selective") SunStaticUserDay.Column ... selective);
 
@@ -150,7 +150,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int upsert(SunStaticUserDay record);
 
@@ -158,7 +158,7 @@ public interface SunStaticUserDayMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     int upsertSelective(@Param("record") SunStaticUserDay record, @Param("selective") SunStaticUserDay.Column ... selective);
 }

+ 19 - 0
book-dao/src/main/java/com/book/dao/polardb/mapper/SunUser2Mapper.java

@@ -0,0 +1,19 @@
+package com.book.dao.polardb.mapper;
+
+import com.book.dao.polardb.entity.SunUser;
+import com.book.dao.polardb.pojo.example.SunUserExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.HashMap;
+import java.util.List;
+
+@Mapper
+@Repository
+public interface SunUser2Mapper {
+    int selectCountUserByDay(@Param("startDate") String startDate, @Param("endDate") String endDate);
+    HashMap<String, String> selectByDay(@Param("startDate") String startDate, @Param("endDate") String endDate);
+    List<HashMap<String, String>> selectByDayChannel(@Param("startDate") String startDate, @Param("endDate") String endDate);
+    List<HashMap<String, String>> selectCountByDayChannel(@Param("startDate") String startDate, @Param("endDate") String endDate);
+}

+ 340 - 40
book-dao/src/main/java/com/book/dao/polardb/pojo/example/SunStaticUserDayChannelExample.java

@@ -10,7 +10,7 @@ public class SunStaticUserDayChannelExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected String orderByClause;
 
@@ -18,7 +18,7 @@ public class SunStaticUserDayChannelExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected boolean distinct;
 
@@ -26,7 +26,7 @@ public class SunStaticUserDayChannelExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected List<Criteria> oredCriteria;
 
@@ -34,7 +34,7 @@ public class SunStaticUserDayChannelExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected Integer offset;
 
@@ -42,7 +42,7 @@ public class SunStaticUserDayChannelExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected Integer rows;
 
@@ -50,7 +50,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample() {
         oredCriteria = new ArrayList<Criteria>();
@@ -60,7 +60,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setOrderByClause(String orderByClause) {
         this.orderByClause = orderByClause;
@@ -70,7 +70,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public String getOrderByClause() {
         return orderByClause;
@@ -80,7 +80,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setDistinct(boolean distinct) {
         this.distinct = distinct;
@@ -90,7 +90,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public boolean isDistinct() {
         return distinct;
@@ -100,7 +100,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public List<Criteria> getOredCriteria() {
         return oredCriteria;
@@ -110,7 +110,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void or(Criteria criteria) {
         oredCriteria.add(criteria);
@@ -120,7 +120,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Criteria or() {
         Criteria criteria = createCriteriaInternal();
@@ -132,7 +132,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample orderBy(String orderByClause) {
         this.setOrderByClause(orderByClause);
@@ -143,7 +143,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample orderBy(String ... orderByClauses) {
         StringBuffer sb = new StringBuffer();
@@ -161,7 +161,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Criteria createCriteria() {
         Criteria criteria = createCriteriaInternal();
@@ -175,7 +175,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected Criteria createCriteriaInternal() {
         Criteria criteria = new Criteria(this);
@@ -186,7 +186,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void clear() {
         oredCriteria.clear();
@@ -200,7 +200,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setOffset(Integer offset) {
         this.offset = offset;
@@ -210,7 +210,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Integer getOffset() {
         return this.offset;
@@ -220,7 +220,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setRows(Integer rows) {
         this.rows = rows;
@@ -230,7 +230,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Integer getRows() {
         return this.rows;
@@ -240,7 +240,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample limit(Integer rows) {
         this.rows = rows;
@@ -251,7 +251,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample limit(Integer offset, Integer rows) {
         this.offset = offset;
@@ -263,7 +263,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample page(Integer page, Integer pageSize) {
         this.offset = page * pageSize;
@@ -275,7 +275,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static Criteria newAndCreateCriteria() {
         SunStaticUserDayChannelExample example = new SunStaticUserDayChannelExample();
@@ -286,7 +286,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample when(boolean condition, IExampleWhen then) {
         if (condition) {
@@ -299,7 +299,7 @@ public class SunStaticUserDayChannelExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayChannelExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
         if (condition) {
@@ -314,7 +314,7 @@ public class SunStaticUserDayChannelExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -1117,6 +1117,306 @@ public class SunStaticUserDayChannelExample {
             return (Criteria) this;
         }
 
+        public Criteria andRechargeAvgIsNull() {
+            addCriterion("recharge_avg is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgIsNotNull() {
+            addCriterion("recharge_avg is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgEqualTo(String value) {
+            addCriterion("recharge_avg =", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_avg = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotEqualTo(String value) {
+            addCriterion("recharge_avg <>", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_avg <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThan(String value) {
+            addCriterion("recharge_avg >", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThanColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_avg > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThanOrEqualTo(String value) {
+            addCriterion("recharge_avg >=", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThanOrEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_avg >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThan(String value) {
+            addCriterion("recharge_avg <", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThanColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_avg < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThanOrEqualTo(String value) {
+            addCriterion("recharge_avg <=", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThanOrEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_avg <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLike(String value) {
+            addCriterion("recharge_avg like", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotLike(String value) {
+            addCriterion("recharge_avg not like", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgIn(List<String> values) {
+            addCriterion("recharge_avg in", values, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotIn(List<String> values) {
+            addCriterion("recharge_avg not in", values, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgBetween(String value1, String value2) {
+            addCriterion("recharge_avg between", value1, value2, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotBetween(String value1, String value2) {
+            addCriterion("recharge_avg not between", value1, value2, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateIsNull() {
+            addCriterion("recharge_rate is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateIsNotNull() {
+            addCriterion("recharge_rate is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateEqualTo(String value) {
+            addCriterion("recharge_rate =", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_rate = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotEqualTo(String value) {
+            addCriterion("recharge_rate <>", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_rate <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThan(String value) {
+            addCriterion("recharge_rate >", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThanColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_rate > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThanOrEqualTo(String value) {
+            addCriterion("recharge_rate >=", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThanOrEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_rate >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThan(String value) {
+            addCriterion("recharge_rate <", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThanColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_rate < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThanOrEqualTo(String value) {
+            addCriterion("recharge_rate <=", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThanOrEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("recharge_rate <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLike(String value) {
+            addCriterion("recharge_rate like", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotLike(String value) {
+            addCriterion("recharge_rate not like", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateIn(List<String> values) {
+            addCriterion("recharge_rate in", values, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotIn(List<String> values) {
+            addCriterion("recharge_rate not in", values, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateBetween(String value1, String value2) {
+            addCriterion("recharge_rate between", value1, value2, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotBetween(String value1, String value2) {
+            addCriterion("recharge_rate not between", value1, value2, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceIsNull() {
+            addCriterion("price is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceIsNotNull() {
+            addCriterion("price is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceEqualTo(String value) {
+            addCriterion("price =", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("price = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotEqualTo(String value) {
+            addCriterion("price <>", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("price <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThan(String value) {
+            addCriterion("price >", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThanColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("price > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThanOrEqualTo(String value) {
+            addCriterion("price >=", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThanOrEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("price >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThan(String value) {
+            addCriterion("price <", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThanColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("price < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThanOrEqualTo(String value) {
+            addCriterion("price <=", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThanOrEqualToColumn(SunStaticUserDayChannel.Column column) {
+            addCriterion(new StringBuilder("price <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLike(String value) {
+            addCriterion("price like", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotLike(String value) {
+            addCriterion("price not like", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceIn(List<String> values) {
+            addCriterion("price in", values, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotIn(List<String> values) {
+            addCriterion("price not in", values, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceBetween(String value1, String value2) {
+            addCriterion("price between", value1, value2, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotBetween(String value1, String value2) {
+            addCriterion("price not between", value1, value2, "price");
+            return (Criteria) this;
+        }
+
         public Criteria andInsertTimeIsNull() {
             addCriterion("insert_time is null");
             return (Criteria) this;
@@ -1212,14 +1512,14 @@ public class SunStaticUserDayChannelExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated do_not_delete_during_merge Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated do_not_delete_during_merge Mon Oct 11 22:33:20 CST 2021
      */
     public static class Criteria extends GeneratedCriteria {
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private SunStaticUserDayChannelExample example;
 
@@ -1227,7 +1527,7 @@ public class SunStaticUserDayChannelExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         protected Criteria(SunStaticUserDayChannelExample example) {
             super();
@@ -1238,7 +1538,7 @@ public class SunStaticUserDayChannelExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public SunStaticUserDayChannelExample example() {
             return this.example;
@@ -1248,7 +1548,7 @@ public class SunStaticUserDayChannelExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         @Deprecated
         public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
@@ -1262,7 +1562,7 @@ public class SunStaticUserDayChannelExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then) {
             if (condition) {
@@ -1275,7 +1575,7 @@ public class SunStaticUserDayChannelExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
             if (condition) {
@@ -1292,7 +1592,7 @@ public class SunStaticUserDayChannelExample {
              * This method was generated by MyBatis Generator.
              * This method corresponds to the database table sun_static_user_day_channel
              *
-             * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+             * @mbg.generated Mon Oct 11 22:33:20 CST 2021
              */
             Criteria add(Criteria add);
         }
@@ -1302,7 +1602,7 @@ public class SunStaticUserDayChannelExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day_channel
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static class Criterion {
         private String condition;
@@ -1395,7 +1695,7 @@ public class SunStaticUserDayChannelExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         void criteria(Criteria criteria);
     }
@@ -1405,7 +1705,7 @@ public class SunStaticUserDayChannelExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day_channel
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         void example(com.book.dao.polardb.pojo.example.SunStaticUserDayChannelExample example);
     }

+ 340 - 40
book-dao/src/main/java/com/book/dao/polardb/pojo/example/SunStaticUserDayExample.java

@@ -10,7 +10,7 @@ public class SunStaticUserDayExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected String orderByClause;
 
@@ -18,7 +18,7 @@ public class SunStaticUserDayExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected boolean distinct;
 
@@ -26,7 +26,7 @@ public class SunStaticUserDayExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected List<Criteria> oredCriteria;
 
@@ -34,7 +34,7 @@ public class SunStaticUserDayExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected Integer offset;
 
@@ -42,7 +42,7 @@ public class SunStaticUserDayExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected Integer rows;
 
@@ -50,7 +50,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample() {
         oredCriteria = new ArrayList<Criteria>();
@@ -60,7 +60,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setOrderByClause(String orderByClause) {
         this.orderByClause = orderByClause;
@@ -70,7 +70,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public String getOrderByClause() {
         return orderByClause;
@@ -80,7 +80,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setDistinct(boolean distinct) {
         this.distinct = distinct;
@@ -90,7 +90,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public boolean isDistinct() {
         return distinct;
@@ -100,7 +100,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public List<Criteria> getOredCriteria() {
         return oredCriteria;
@@ -110,7 +110,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void or(Criteria criteria) {
         oredCriteria.add(criteria);
@@ -120,7 +120,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Criteria or() {
         Criteria criteria = createCriteriaInternal();
@@ -132,7 +132,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample orderBy(String orderByClause) {
         this.setOrderByClause(orderByClause);
@@ -143,7 +143,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample orderBy(String ... orderByClauses) {
         StringBuffer sb = new StringBuffer();
@@ -161,7 +161,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Criteria createCriteria() {
         Criteria criteria = createCriteriaInternal();
@@ -175,7 +175,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected Criteria createCriteriaInternal() {
         Criteria criteria = new Criteria(this);
@@ -186,7 +186,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void clear() {
         oredCriteria.clear();
@@ -200,7 +200,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setOffset(Integer offset) {
         this.offset = offset;
@@ -210,7 +210,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Integer getOffset() {
         return this.offset;
@@ -220,7 +220,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public void setRows(Integer rows) {
         this.rows = rows;
@@ -230,7 +230,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public Integer getRows() {
         return this.rows;
@@ -240,7 +240,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample limit(Integer rows) {
         this.rows = rows;
@@ -251,7 +251,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample limit(Integer offset, Integer rows) {
         this.offset = offset;
@@ -263,7 +263,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample page(Integer page, Integer pageSize) {
         this.offset = page * pageSize;
@@ -275,7 +275,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static Criteria newAndCreateCriteria() {
         SunStaticUserDayExample example = new SunStaticUserDayExample();
@@ -286,7 +286,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample when(boolean condition, IExampleWhen then) {
         if (condition) {
@@ -299,7 +299,7 @@ public class SunStaticUserDayExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public SunStaticUserDayExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
         if (condition) {
@@ -314,7 +314,7 @@ public class SunStaticUserDayExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -917,6 +917,306 @@ public class SunStaticUserDayExample {
             return (Criteria) this;
         }
 
+        public Criteria andRechargeAvgIsNull() {
+            addCriterion("recharge_avg is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgIsNotNull() {
+            addCriterion("recharge_avg is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgEqualTo(String value) {
+            addCriterion("recharge_avg =", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_avg = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotEqualTo(String value) {
+            addCriterion("recharge_avg <>", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_avg <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThan(String value) {
+            addCriterion("recharge_avg >", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThanColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_avg > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThanOrEqualTo(String value) {
+            addCriterion("recharge_avg >=", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgGreaterThanOrEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_avg >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThan(String value) {
+            addCriterion("recharge_avg <", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThanColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_avg < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThanOrEqualTo(String value) {
+            addCriterion("recharge_avg <=", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLessThanOrEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_avg <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgLike(String value) {
+            addCriterion("recharge_avg like", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotLike(String value) {
+            addCriterion("recharge_avg not like", value, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgIn(List<String> values) {
+            addCriterion("recharge_avg in", values, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotIn(List<String> values) {
+            addCriterion("recharge_avg not in", values, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgBetween(String value1, String value2) {
+            addCriterion("recharge_avg between", value1, value2, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeAvgNotBetween(String value1, String value2) {
+            addCriterion("recharge_avg not between", value1, value2, "rechargeAvg");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateIsNull() {
+            addCriterion("recharge_rate is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateIsNotNull() {
+            addCriterion("recharge_rate is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateEqualTo(String value) {
+            addCriterion("recharge_rate =", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_rate = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotEqualTo(String value) {
+            addCriterion("recharge_rate <>", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_rate <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThan(String value) {
+            addCriterion("recharge_rate >", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThanColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_rate > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThanOrEqualTo(String value) {
+            addCriterion("recharge_rate >=", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateGreaterThanOrEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_rate >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThan(String value) {
+            addCriterion("recharge_rate <", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThanColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_rate < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThanOrEqualTo(String value) {
+            addCriterion("recharge_rate <=", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLessThanOrEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("recharge_rate <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateLike(String value) {
+            addCriterion("recharge_rate like", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotLike(String value) {
+            addCriterion("recharge_rate not like", value, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateIn(List<String> values) {
+            addCriterion("recharge_rate in", values, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotIn(List<String> values) {
+            addCriterion("recharge_rate not in", values, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateBetween(String value1, String value2) {
+            addCriterion("recharge_rate between", value1, value2, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRechargeRateNotBetween(String value1, String value2) {
+            addCriterion("recharge_rate not between", value1, value2, "rechargeRate");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceIsNull() {
+            addCriterion("price is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceIsNotNull() {
+            addCriterion("price is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceEqualTo(String value) {
+            addCriterion("price =", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("price = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotEqualTo(String value) {
+            addCriterion("price <>", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("price <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThan(String value) {
+            addCriterion("price >", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThanColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("price > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThanOrEqualTo(String value) {
+            addCriterion("price >=", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceGreaterThanOrEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("price >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThan(String value) {
+            addCriterion("price <", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThanColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("price < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThanOrEqualTo(String value) {
+            addCriterion("price <=", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLessThanOrEqualToColumn(SunStaticUserDay.Column column) {
+            addCriterion(new StringBuilder("price <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceLike(String value) {
+            addCriterion("price like", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotLike(String value) {
+            addCriterion("price not like", value, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceIn(List<String> values) {
+            addCriterion("price in", values, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotIn(List<String> values) {
+            addCriterion("price not in", values, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceBetween(String value1, String value2) {
+            addCriterion("price between", value1, value2, "price");
+            return (Criteria) this;
+        }
+
+        public Criteria andPriceNotBetween(String value1, String value2) {
+            addCriterion("price not between", value1, value2, "price");
+            return (Criteria) this;
+        }
+
         public Criteria andInsertTimeIsNull() {
             addCriterion("insert_time is null");
             return (Criteria) this;
@@ -1012,14 +1312,14 @@ public class SunStaticUserDayExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated do_not_delete_during_merge Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated do_not_delete_during_merge Mon Oct 11 22:33:20 CST 2021
      */
     public static class Criteria extends GeneratedCriteria {
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         private SunStaticUserDayExample example;
 
@@ -1027,7 +1327,7 @@ public class SunStaticUserDayExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         protected Criteria(SunStaticUserDayExample example) {
             super();
@@ -1038,7 +1338,7 @@ public class SunStaticUserDayExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public SunStaticUserDayExample example() {
             return this.example;
@@ -1048,7 +1348,7 @@ public class SunStaticUserDayExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         @Deprecated
         public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
@@ -1062,7 +1362,7 @@ public class SunStaticUserDayExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then) {
             if (condition) {
@@ -1075,7 +1375,7 @@ public class SunStaticUserDayExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
             if (condition) {
@@ -1092,7 +1392,7 @@ public class SunStaticUserDayExample {
              * This method was generated by MyBatis Generator.
              * This method corresponds to the database table sun_static_user_day
              *
-             * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+             * @mbg.generated Mon Oct 11 22:33:20 CST 2021
              */
             Criteria add(Criteria add);
         }
@@ -1102,7 +1402,7 @@ public class SunStaticUserDayExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table sun_static_user_day
      *
-     * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+     * @mbg.generated Mon Oct 11 22:33:20 CST 2021
      */
     public static class Criterion {
         private String condition;
@@ -1195,7 +1495,7 @@ public class SunStaticUserDayExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         void criteria(Criteria criteria);
     }
@@ -1205,7 +1505,7 @@ public class SunStaticUserDayExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table sun_static_user_day
          *
-         * @mbg.generated Mon Oct 11 21:41:33 CST 2021
+         * @mbg.generated Mon Oct 11 22:33:20 CST 2021
          */
         void example(com.book.dao.polardb.pojo.example.SunStaticUserDayExample example);
     }

+ 3 - 0
book-dao/src/main/resources/mapper/polar/SunStaticOrderDay2Mapper.xml

@@ -5,4 +5,7 @@
     <select id="selectHistory" resultType="java.util.HashMap">
         SELECT SUM(t.active_count) as active_count,SUM(t.recharge_user_count) as recharge_user_count,SUM(t.recharge_sum) as recharge_sum from sun_static_order_day t;
     </select>
+    <select id="selectUserHistory" resultType="java.util.HashMap">
+        SELECT SUM(new_all_user) as new_all_user ,sum(new_recharge_user) as  new_recharge_user,sum(new_recharge_sum) as new_recharge_sum  from sun_static_user_day;
+    </select>
 </mapper>

+ 127 - 39
book-dao/src/main/resources/mapper/polar/SunStaticUserDayChannelMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="static_date" jdbcType="VARCHAR" property="staticDate" />
@@ -15,13 +15,16 @@
     <result column="new_recharge_user" jdbcType="INTEGER" property="newRechargeUser" />
     <result column="new_recharge_sum" jdbcType="VARCHAR" property="newRechargeSum" />
     <result column="new_recharge_count" jdbcType="INTEGER" property="newRechargeCount" />
+    <result column="recharge_avg" jdbcType="VARCHAR" property="rechargeAvg" />
+    <result column="recharge_rate" jdbcType="VARCHAR" property="rechargeRate" />
+    <result column="price" jdbcType="VARCHAR" property="price" />
     <result column="insert_time" jdbcType="TIMESTAMP" property="insertTime" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -55,7 +58,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -89,16 +92,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     id, static_date, channel_id, channel_name, new_all_user, new_recharge_user, new_recharge_sum, 
-    new_recharge_count, insert_time
+    new_recharge_count, recharge_avg, recharge_rate, price, insert_time
   </sql>
   <select id="selectByExample" parameterType="com.book.dao.polardb.pojo.example.SunStaticUserDayChannelExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <if test="distinct">
@@ -125,14 +128,14 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <if test="example != null and example.distinct">
       distinct
     </if>
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -161,7 +164,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -172,11 +175,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -192,7 +195,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     delete from sun_static_user_day_channel
     where id = #{id,jdbcType=INTEGER}
@@ -201,7 +204,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     delete from sun_static_user_day_channel
     <if test="_parameter != null">
@@ -212,26 +215,28 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day_channel (id, static_date, channel_id, 
       channel_name, new_all_user, new_recharge_user, 
-      new_recharge_sum, new_recharge_count, insert_time
+      new_recharge_sum, new_recharge_count, recharge_avg, 
+      recharge_rate, price, insert_time
       )
     values (#{id,jdbcType=INTEGER}, #{staticDate,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, 
       #{channelName,jdbcType=VARCHAR}, #{newAllUser,jdbcType=INTEGER}, #{newRechargeUser,jdbcType=INTEGER}, 
-      #{newRechargeSum,jdbcType=VARCHAR}, #{newRechargeCount,jdbcType=INTEGER}, #{insertTime,jdbcType=TIMESTAMP}
+      #{newRechargeSum,jdbcType=VARCHAR}, #{newRechargeCount,jdbcType=INTEGER}, #{rechargeAvg,jdbcType=VARCHAR}, 
+      #{rechargeRate,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}
       )
   </insert>
   <insert id="insertSelective" parameterType="map">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day_channel
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           ${column.escapedColumnName}
         </foreach>
@@ -262,6 +267,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count,
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg,
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate,
+          </if>
+          <if test="record.price != null">
+            price,
+          </if>
           <if test="record.insertTime != null">
             insert_time,
           </if>
@@ -271,7 +285,7 @@
     </choose>
     values
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -302,6 +316,15 @@
           <if test="record.newRechargeCount != null">
             #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -313,7 +336,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select count(*) from sun_static_user_day_channel
     <if test="_parameter != null">
@@ -324,12 +347,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day_channel
     SET
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -360,6 +383,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            price = #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -374,7 +406,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day_channel
     set id = #{record.id,jdbcType=INTEGER},
@@ -385,6 +417,9 @@
       new_recharge_user = #{record.newRechargeUser,jdbcType=INTEGER},
       new_recharge_sum = #{record.newRechargeSum,jdbcType=VARCHAR},
       new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
+      recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+      recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+      price = #{record.price,jdbcType=VARCHAR},
       insert_time = #{record.insertTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -394,12 +429,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day_channel
     SET
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -427,6 +462,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            price = #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -439,7 +483,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day_channel
     set static_date = #{staticDate,jdbcType=VARCHAR},
@@ -449,6 +493,9 @@
       new_recharge_user = #{newRechargeUser,jdbcType=INTEGER},
       new_recharge_sum = #{newRechargeSum,jdbcType=VARCHAR},
       new_recharge_count = #{newRechargeCount,jdbcType=INTEGER},
+      recharge_avg = #{rechargeAvg,jdbcType=VARCHAR},
+      recharge_rate = #{rechargeRate,jdbcType=VARCHAR},
+      price = #{price,jdbcType=VARCHAR},
       insert_time = #{insertTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -456,7 +503,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <include refid="Base_Column_List" />
@@ -473,11 +520,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -499,16 +546,17 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day_channel
     (id, static_date, channel_id, channel_name, new_all_user, new_recharge_user, new_recharge_sum, 
-      new_recharge_count, insert_time)
+      new_recharge_count, recharge_avg, recharge_rate, price, insert_time)
     values
     <foreach collection="list" item="item" separator=",">
       (#{item.id,jdbcType=INTEGER}, #{item.staticDate,jdbcType=VARCHAR}, #{item.channelId,jdbcType=VARCHAR}, 
         #{item.channelName,jdbcType=VARCHAR}, #{item.newAllUser,jdbcType=INTEGER}, #{item.newRechargeUser,jdbcType=INTEGER}, 
         #{item.newRechargeSum,jdbcType=VARCHAR}, #{item.newRechargeCount,jdbcType=INTEGER}, 
+        #{item.rechargeAvg,jdbcType=VARCHAR}, #{item.rechargeRate,jdbcType=VARCHAR}, #{item.price,jdbcType=VARCHAR}, 
         #{item.insertTime,jdbcType=TIMESTAMP})
     </foreach>
   </insert>
@@ -516,7 +564,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day_channel (
     <foreach collection="selective" item="column" separator=",">
@@ -551,6 +599,15 @@
         <if test="'new_recharge_count'.toString() == column.value">
           #{item.newRechargeCount,jdbcType=INTEGER}
         </if>
+        <if test="'recharge_avg'.toString() == column.value">
+          #{item.rechargeAvg,jdbcType=VARCHAR}
+        </if>
+        <if test="'recharge_rate'.toString() == column.value">
+          #{item.rechargeRate,jdbcType=VARCHAR}
+        </if>
+        <if test="'price'.toString() == column.value">
+          #{item.price,jdbcType=VARCHAR}
+        </if>
         <if test="'insert_time'.toString() == column.value">
           #{item.insertTime,jdbcType=TIMESTAMP}
         </if>
@@ -562,11 +619,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day_channel
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           ${column.escapedColumnName}
         </foreach>
@@ -597,6 +654,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count,
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg,
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate,
+          </if>
+          <if test="record.price != null">
+            price,
+          </if>
           <if test="record.insertTime != null">
             insert_time,
           </if>
@@ -606,7 +672,7 @@
     </choose>
     values
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -637,6 +703,15 @@
           <if test="record.newRechargeCount != null">
             #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -645,7 +720,7 @@
     </choose>
     on duplicate key update 
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -676,6 +751,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            price = #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -687,15 +771,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day_channel
     (id, static_date, channel_id, channel_name, new_all_user, new_recharge_user, new_recharge_sum, 
-      new_recharge_count, insert_time)
+      new_recharge_count, recharge_avg, recharge_rate, price, insert_time)
     values
     (#{id,jdbcType=INTEGER}, #{staticDate,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, 
       #{channelName,jdbcType=VARCHAR}, #{newAllUser,jdbcType=INTEGER}, #{newRechargeUser,jdbcType=INTEGER}, 
-      #{newRechargeSum,jdbcType=VARCHAR}, #{newRechargeCount,jdbcType=INTEGER}, #{insertTime,jdbcType=TIMESTAMP}
+      #{newRechargeSum,jdbcType=VARCHAR}, #{newRechargeCount,jdbcType=INTEGER}, #{rechargeAvg,jdbcType=VARCHAR}, 
+      #{rechargeRate,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}
       )
     on duplicate key update 
     id = #{id,jdbcType=INTEGER}, 
@@ -706,6 +791,9 @@
     new_recharge_user = #{newRechargeUser,jdbcType=INTEGER}, 
     new_recharge_sum = #{newRechargeSum,jdbcType=VARCHAR}, 
     new_recharge_count = #{newRechargeCount,jdbcType=INTEGER}, 
+    recharge_avg = #{rechargeAvg,jdbcType=VARCHAR}, 
+    recharge_rate = #{rechargeRate,jdbcType=VARCHAR}, 
+    price = #{price,jdbcType=VARCHAR}, 
     insert_time = #{insertTime,jdbcType=TIMESTAMP}
   </insert>
 </mapper>

+ 125 - 37
book-dao/src/main/resources/mapper/polar/SunStaticUserDayMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="static_date" jdbcType="VARCHAR" property="staticDate" />
@@ -13,13 +13,16 @@
     <result column="new_recharge_user" jdbcType="INTEGER" property="newRechargeUser" />
     <result column="new_recharge_sum" jdbcType="VARCHAR" property="newRechargeSum" />
     <result column="new_recharge_count" jdbcType="INTEGER" property="newRechargeCount" />
+    <result column="recharge_avg" jdbcType="VARCHAR" property="rechargeAvg" />
+    <result column="recharge_rate" jdbcType="VARCHAR" property="rechargeRate" />
+    <result column="price" jdbcType="VARCHAR" property="price" />
     <result column="insert_time" jdbcType="TIMESTAMP" property="insertTime" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -53,7 +56,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -87,16 +90,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     id, static_date, new_all_user, new_recharge_user, new_recharge_sum, new_recharge_count, 
-    insert_time
+    recharge_avg, recharge_rate, price, insert_time
   </sql>
   <select id="selectByExample" parameterType="com.book.dao.polardb.pojo.example.SunStaticUserDayExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <if test="distinct">
@@ -123,14 +126,14 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <if test="example != null and example.distinct">
       distinct
     </if>
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -159,7 +162,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -170,11 +173,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -190,7 +193,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     delete from sun_static_user_day
     where id = #{id,jdbcType=INTEGER}
@@ -199,7 +202,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     delete from sun_static_user_day
     <if test="_parameter != null">
@@ -210,24 +213,26 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day (id, static_date, new_all_user, 
       new_recharge_user, new_recharge_sum, new_recharge_count, 
+      recharge_avg, recharge_rate, price, 
       insert_time)
     values (#{id,jdbcType=INTEGER}, #{staticDate,jdbcType=VARCHAR}, #{newAllUser,jdbcType=INTEGER}, 
       #{newRechargeUser,jdbcType=INTEGER}, #{newRechargeSum,jdbcType=VARCHAR}, #{newRechargeCount,jdbcType=INTEGER}, 
+      #{rechargeAvg,jdbcType=VARCHAR}, #{rechargeRate,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, 
       #{insertTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="map">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           ${column.escapedColumnName}
         </foreach>
@@ -252,6 +257,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count,
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg,
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate,
+          </if>
+          <if test="record.price != null">
+            price,
+          </if>
           <if test="record.insertTime != null">
             insert_time,
           </if>
@@ -261,7 +275,7 @@
     </choose>
     values
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -286,6 +300,15 @@
           <if test="record.newRechargeCount != null">
             #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -297,7 +320,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select count(*) from sun_static_user_day
     <if test="_parameter != null">
@@ -308,12 +331,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day
     SET
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -338,6 +361,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            price = #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -352,7 +384,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day
     set id = #{record.id,jdbcType=INTEGER},
@@ -361,6 +393,9 @@
       new_recharge_user = #{record.newRechargeUser,jdbcType=INTEGER},
       new_recharge_sum = #{record.newRechargeSum,jdbcType=VARCHAR},
       new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
+      recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+      recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+      price = #{record.price,jdbcType=VARCHAR},
       insert_time = #{record.insertTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -370,12 +405,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day
     SET
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -397,6 +432,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            price = #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -409,7 +453,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     update sun_static_user_day
     set static_date = #{staticDate,jdbcType=VARCHAR},
@@ -417,6 +461,9 @@
       new_recharge_user = #{newRechargeUser,jdbcType=INTEGER},
       new_recharge_sum = #{newRechargeSum,jdbcType=VARCHAR},
       new_recharge_count = #{newRechargeCount,jdbcType=INTEGER},
+      recharge_avg = #{rechargeAvg,jdbcType=VARCHAR},
+      recharge_rate = #{rechargeRate,jdbcType=VARCHAR},
+      price = #{price,jdbcType=VARCHAR},
       insert_time = #{insertTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -424,7 +471,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <include refid="Base_Column_List" />
@@ -441,11 +488,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     select
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -467,16 +514,17 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day
     (id, static_date, new_all_user, new_recharge_user, new_recharge_sum, new_recharge_count, 
-      insert_time)
+      recharge_avg, recharge_rate, price, insert_time)
     values
     <foreach collection="list" item="item" separator=",">
       (#{item.id,jdbcType=INTEGER}, #{item.staticDate,jdbcType=VARCHAR}, #{item.newAllUser,jdbcType=INTEGER}, 
         #{item.newRechargeUser,jdbcType=INTEGER}, #{item.newRechargeSum,jdbcType=VARCHAR}, 
-        #{item.newRechargeCount,jdbcType=INTEGER}, #{item.insertTime,jdbcType=TIMESTAMP}
+        #{item.newRechargeCount,jdbcType=INTEGER}, #{item.rechargeAvg,jdbcType=VARCHAR}, 
+        #{item.rechargeRate,jdbcType=VARCHAR}, #{item.price,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}
         )
     </foreach>
   </insert>
@@ -484,7 +532,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day (
     <foreach collection="selective" item="column" separator=",">
@@ -513,6 +561,15 @@
         <if test="'new_recharge_count'.toString() == column.value">
           #{item.newRechargeCount,jdbcType=INTEGER}
         </if>
+        <if test="'recharge_avg'.toString() == column.value">
+          #{item.rechargeAvg,jdbcType=VARCHAR}
+        </if>
+        <if test="'recharge_rate'.toString() == column.value">
+          #{item.rechargeRate,jdbcType=VARCHAR}
+        </if>
+        <if test="'price'.toString() == column.value">
+          #{item.price,jdbcType=VARCHAR}
+        </if>
         <if test="'insert_time'.toString() == column.value">
           #{item.insertTime,jdbcType=TIMESTAMP}
         </if>
@@ -524,11 +581,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           ${column.escapedColumnName}
         </foreach>
@@ -553,6 +610,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count,
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg,
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate,
+          </if>
+          <if test="record.price != null">
+            price,
+          </if>
           <if test="record.insertTime != null">
             insert_time,
           </if>
@@ -562,7 +628,7 @@
     </choose>
     values
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -587,6 +653,15 @@
           <if test="record.newRechargeCount != null">
             #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -595,7 +670,7 @@
     </choose>
     on duplicate key update 
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -620,6 +695,15 @@
           <if test="record.newRechargeCount != null">
             new_recharge_count = #{record.newRechargeCount,jdbcType=INTEGER},
           </if>
+          <if test="record.rechargeAvg != null">
+            recharge_avg = #{record.rechargeAvg,jdbcType=VARCHAR},
+          </if>
+          <if test="record.rechargeRate != null">
+            recharge_rate = #{record.rechargeRate,jdbcType=VARCHAR},
+          </if>
+          <if test="record.price != null">
+            price = #{record.price,jdbcType=VARCHAR},
+          </if>
           <if test="record.insertTime != null">
             insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
           </if>
@@ -631,14 +715,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 11 21:41:33 CST 2021.
+      This element was generated on Mon Oct 11 22:33:20 CST 2021.
     -->
     insert into sun_static_user_day
     (id, static_date, new_all_user, new_recharge_user, new_recharge_sum, new_recharge_count, 
-      insert_time)
+      recharge_avg, recharge_rate, price, insert_time)
     values
     (#{id,jdbcType=INTEGER}, #{staticDate,jdbcType=VARCHAR}, #{newAllUser,jdbcType=INTEGER}, 
       #{newRechargeUser,jdbcType=INTEGER}, #{newRechargeSum,jdbcType=VARCHAR}, #{newRechargeCount,jdbcType=INTEGER}, 
+      #{rechargeAvg,jdbcType=VARCHAR}, #{rechargeRate,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, 
       #{insertTime,jdbcType=TIMESTAMP})
     on duplicate key update 
     id = #{id,jdbcType=INTEGER}, 
@@ -647,6 +732,9 @@
     new_recharge_user = #{newRechargeUser,jdbcType=INTEGER}, 
     new_recharge_sum = #{newRechargeSum,jdbcType=VARCHAR}, 
     new_recharge_count = #{newRechargeCount,jdbcType=INTEGER}, 
+    recharge_avg = #{rechargeAvg,jdbcType=VARCHAR}, 
+    recharge_rate = #{rechargeRate,jdbcType=VARCHAR}, 
+    price = #{price,jdbcType=VARCHAR}, 
     insert_time = #{insertTime,jdbcType=TIMESTAMP}
   </insert>
 </mapper>

+ 27 - 0
book-dao/src/main/resources/mapper/polar/SunUser2Mapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.book.dao.polardb.mapper.SunUser2Mapper">
+  <select id="selectByDay" resultType="java.util.HashMap">
+    <![CDATA[
+    SELECT COUNT(DISTINCT(openid)) as new_recharge_user,sum(recharge_amount) as new_recharge_sum,count(recharge_num) as new_recharge_count FROM sun_user WHERE start_time>#{startDate} and end_time<=#{endDate} and recharge_num>0;
+    ]]>
+</select>
+  <select id="selectByDayChannel" resultType="java.util.HashMap">
+    <![CDATA[
+    SELECT t.*,t2.channel_name FROM
+      (
+        SELECT channel_id,COUNT(DISTINCT(openid)) as new_recharge_user,sum(recharge_amount) as new_recharge_sum,count(recharge_num) as new_recharge_count  FROM sun_user WHERE start_time>#{startDate} and end_time<=#{endDate} and recharge_num>0 GROUP BY channel_id
+      ) t LEFT JOIN sun_channel t2 on t.channel_id=t2.channel_id;
+    ]]>
+  </select>
+  <select id="selectCountUserByDay" resultType="java.lang.Integer">
+    <![CDATA[
+    SELECT COUNT(1) FROM sun_user WHERE start_time>#{startDate} and end_time<=#{endDate};
+    ]]>
+  </select>
+    <select id="selectCountByDayChannel" resultType="java.util.HashMap">
+      <![CDATA[
+    SELECT channel_id,COUNT(DISTINCT(openid)) as user_count FROM sun_user WHERE start_time>#{startDate} and end_time<=#{endDate} GROUP BY channel_id
+      ]]>
+    </select>
+</mapper>

+ 159 - 58
book-server/src/main/java/com/book/server/controller/SunDataController.java

@@ -20,6 +20,8 @@ import javax.servlet.http.HttpServletResponse;
 import javax.websocket.server.PathParam;
 import java.io.BufferedOutputStream;
 import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 
@@ -117,11 +119,22 @@ public class SunDataController extends BaseController {
      * @return
      */
     @GetMapping("/orderStaticByDate-F891088E-7A75-4F4B-AEB4-A9D1697F5AD3")
-    public Result<PageResult<SunUserCollect>> orderStaticByDate(String date) {
+    public Result orderStaticByDate(String date) {
         sunDataService.orderStaticDate(date);
         return Result.success();
     }
 
+    /**
+     * 用户统计-重置某天
+     *
+     * @return
+     */
+    @GetMapping("/userStaticByDate-F891088E-7A75-4F4B-AEB4-A9D1697F5AB3")
+    public Result userStaticByDate(String startDate, String endDate) {
+        sunDataService.userStaticYesterday(startDate, endDate);
+        return Result.success();
+    }
+
     /**
      * 订单统计-获取今天
      *
@@ -132,6 +145,16 @@ public class SunDataController extends BaseController {
         return Result.success(sunDataService.getTodayOrderStatic());
     }
 
+    /**
+     * 用户统计-获取今天
+     *
+     * @return
+     */
+    @GetMapping("/getTodayUserStatic")
+    public Result getTodayUserStatic() {
+        return Result.success(sunDataService.getTodayUserStatic());
+    }
+
     /**
      * 订单统计-今天按渠道
      *
@@ -143,47 +166,40 @@ public class SunDataController extends BaseController {
     }
 
     /**
-     * 订单统计-导出当天
-     * @param response
-     * @throws UnsupportedEncodingException
+     * 用户统计-今天按渠道
+     *
+     * @return
      */
-    @GetMapping("/exportTodayOrderStaticByChannel")
-    public void exportTodayOrderStaticByChannel(HttpServletResponse response) throws UnsupportedEncodingException {
-        List<SunStaticOrderDayChannel> list = sunDataService.getTodayOrderStaticByChannel();
+    @GetMapping("/getTodayUserStaticByChannel")
+    public Result getTodayUserStaticByChannel() {
+        return Result.success(sunDataService.getTodayUserStaticByChannel());
+    }
+
+    public void export(HttpServletResponse response, String fileName, List<String> list) throws UnsupportedEncodingException {
 
-        /**
-         * 导出
-         */
         response.setContentType("text/plain");
-        String fileName = TimeUtil.getTodayStr() + UUID.randomUUID() + ".csv";
         response.setHeader("Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode(fileName, "UTF-8"));
 
         BufferedOutputStream buff = null;
-        StringBuffer write = new StringBuffer();
+        StringBuilder write = new StringBuilder();
         String enter = "\r\n";
         ServletOutputStream outSTr = null;
         try {
             outSTr = response.getOutputStream();
             buff = new BufferedOutputStream(outSTr);
             // 把内容写入文件
-            if (list.size() > 0) {
-                // 添加表头
-                write.append("日期,渠道 Id,渠道名称,活跃用户数,充值用户数,充值金额,充值笔数,充值人均");
+            for (String s : list) {
+                write.append(s);
                 write.append(enter);
-
-                for (int i = 0; i < list.size(); i++) {
-                    SunStaticOrderDayChannel text = list.get(i);
-                    write.append(text.getStaticDate() + "," + text.getChannelId() + ","+ text.getChannelName() + ","+ text.getActiveCount() + "," + text.getRechargeUserCount() + "," + text.getRechargeSum() + "," + text.getRechargeCount() + "," + text.getRechargeAvg());
-                    write.append(enter);
-                }
             }
-            buff.write(write.toString().getBytes("UTF-8"));
+            buff.write(write.toString().getBytes(StandardCharsets.UTF_8));
             buff.flush();
             buff.close();
         } catch (Exception e) {
             e.printStackTrace();
         } finally {
             try {
+                assert buff != null;
                 buff.close();
                 outSTr.close();
             } catch (Exception e) {
@@ -192,53 +208,98 @@ public class SunDataController extends BaseController {
         }
     }
 
+    /**
+     * 订单统计-导出当天
+     *
+     * @param response
+     * @throws UnsupportedEncodingException
+     */
+    @GetMapping("/exportTodayOrderStaticByChannel")
+    public void exportTodayOrderStaticByChannel(HttpServletResponse response) throws UnsupportedEncodingException {
+        String fileName = TimeUtil.getTodayStr() + "-" + UUID.randomUUID() + ".csv";
+        ArrayList<String> strings = new ArrayList<>();
+
+        List<SunStaticOrderDayChannel> list = sunDataService.getTodayOrderStaticByChannel();
+        strings.add("日期,渠道 Id,渠道名称,活跃用户数,充值用户数,充值金额,充值笔数,充值人均");
+        for (SunStaticOrderDayChannel text : list) {
+            strings.add(text.getStaticDate() + "," + text.getChannelId() + "," + text.getChannelName() + "," + text.getActiveCount() + "," + text.getRechargeUserCount() + "," + text.getRechargeSum() + "," + text.getRechargeCount() + "," + text.getRechargeAvg());
+        }
+        export(response, fileName, strings);
+    }
+
+    /**
+     * 用户统计-导出当天
+     *
+     * @param response
+     * @throws UnsupportedEncodingException
+     */
+    @GetMapping("/exportTodayUserStaticByChannel")
+    public void exportTodayUserStaticByChannel(HttpServletResponse response) throws UnsupportedEncodingException {
+        String fileName = TimeUtil.getTodayStr() + "-" + UUID.randomUUID() + ".csv";
+        ArrayList<String> strings = new ArrayList<>();
+
+        List<SunStaticUserDayChannel> list = sunDataService.getTodayUserStaticByChannel();
+        strings.add("日期,渠道 Id,渠道名称,新增用户数,新增用户的充值人数,新增用户充值金额(元),新增用户充值笔数,新增用户充值人均,新增付费率,单粉价");
+        for (SunStaticUserDayChannel text : list) {
+            strings.add(text.getStaticDate() + ","
+                    + text.getChannelId() + ","
+                    + text.getChannelName() + ","
+                    + text.getNewAllUser() + ","
+                    + text.getNewRechargeUser() + ","
+                    + text.getNewRechargeSum() + ","
+                    + text.getNewRechargeCount() + ","
+                    + text.getRechargeAvg() + ","
+                    + text.getRechargeRate() + ","
+                    + text.getPrice());
+        }
+        export(response, fileName, strings);
+    }
+
     /**
      * 订单统计-导出历史
+     *
      * @param response
      * @throws UnsupportedEncodingException
      */
     @GetMapping("/exportOrderStaticAll")
     public void exportTodayOrderStatic(HttpServletResponse response) throws UnsupportedEncodingException {
-        List<SunStaticOrderDay> list = sunDataService.getOrderStaticsAll();
-        /**
-         * 导出
-         */
-        response.setContentType("text/plain");
+
         String fileName = TimeUtil.getTodayStr() + UUID.randomUUID() + ".csv";
-        response.setHeader("Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode(fileName, "UTF-8"));
+        ArrayList<String> strings = new ArrayList<>();
 
-        BufferedOutputStream buff = null;
-        StringBuffer write = new StringBuffer();
-        String enter = "\r\n";
-        ServletOutputStream outSTr = null;
-        try {
-            outSTr = response.getOutputStream();
-            buff = new BufferedOutputStream(outSTr);
-            // 把内容写入文件
-            if (list.size() > 0) {
-                // 添加表头
-                write.append("日期,活跃用户数,充值用户数,充值金额,充值笔数,充值人均");
-                write.append(enter);
+        List<SunStaticOrderDay> list = sunDataService.getOrderStaticsAll();
+        strings.add("日期,活跃用户数,充值用户数,充值金额,充值笔数,充值人均");
+        for (SunStaticOrderDay text : list) {
+            strings.add(text.getStaticDate() + "," + text.getActiveCount() + "," + text.getRechargeUserCount() + "," + text.getRechargeSum() + "," + text.getRechargeCount() + "," + text.getRechargeAvg());
+        }
+        export(response, fileName, strings);
+    }
 
-                for (int i = 0; i < list.size(); i++) {
-                    SunStaticOrderDay text = list.get(i);
-                    write.append(text.getStaticDate() + "," + text.getActiveCount() + "," + text.getRechargeUserCount() + "," + text.getRechargeSum() + "," + text.getRechargeCount() + "," + text.getRechargeAvg());
-                    write.append(enter);
-                }
-            }
-            buff.write(write.toString().getBytes("UTF-8"));
-            buff.flush();
-            buff.close();
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                buff.close();
-                outSTr.close();
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
+    /**
+     * 用户统计-导出历史
+     *
+     * @param response
+     * @throws UnsupportedEncodingException
+     */
+    @GetMapping("/exportUserStaticAll")
+    public void exportUserStaticAll(HttpServletResponse response) throws UnsupportedEncodingException {
+
+        String fileName = TimeUtil.getTodayStr() + UUID.randomUUID() + ".csv";
+        ArrayList<String> strings = new ArrayList<>();
+
+        List<SunStaticUserDay> list = sunDataService.getUserStaticsAll();
+        strings.add("日期,新增用户数,新增用户的充值人数,新增用户充值金额(元),新增用户充值笔数,新增用户充值人均,新增付费率,单粉价");
+        for (SunStaticUserDay text : list) {
+            strings.add(text.getStaticDate() + ","
+                    + text.getNewAllUser() + ","
+                    + text.getNewRechargeUser() + ","
+                    + text.getNewRechargeSum() + ","
+                    + text.getNewRechargeCount() + ","
+                    + text.getRechargeAvg() + ","
+                    + text.getRechargeRate() + ","
+                    + text.getPrice());
         }
+        export(response, fileName, strings);
     }
 
     /**
@@ -251,6 +312,16 @@ public class SunDataController extends BaseController {
         return Result.success(sunDataService.getYesterdayOrderStatic());
     }
 
+    /**
+     * 用户统计-昨天
+     *
+     * @return
+     */
+    @GetMapping("/getYesterdayUserStatic")
+    public Result getYesterdayUserStatic() {
+        return Result.success(sunDataService.getYesterdayUserStatic());
+    }
+
     /**
      * 订单统计-历史
      *
@@ -261,6 +332,16 @@ public class SunDataController extends BaseController {
         return Result.success(sunDataService.getHistoryOrderStatic());
     }
 
+    /**
+     * 用户统计-历史
+     *
+     * @return
+     */
+    @GetMapping("/getHistoryUserStatic")
+    public Result getHistoryUserStatic() {
+        return Result.success(sunDataService.getHistoryUserStatic());
+    }
+
     /**
      * 订单统计-按天排序
      *
@@ -271,6 +352,16 @@ public class SunDataController extends BaseController {
         return Result.success(sunDataService.getOrderStatics(page, size));
     }
 
+    /**
+     * 用户统计-按天排序
+     *
+     * @return
+     */
+    @GetMapping("/getUserStatics")
+    public Result getUserStatics(int page, int size) {
+        return Result.success(sunDataService.getUserStatics(page, size));
+    }
+
     /**
      * 订单统计-按天查询不同渠道
      *
@@ -281,6 +372,16 @@ public class SunDataController extends BaseController {
         return Result.success(sunDataService.getOrderStaticByDateAndChannel(date));
     }
 
+    /**
+     * 用户统计-按天查询不同渠道
+     *
+     * @return
+     */
+    @GetMapping("/getUserStaticByDateAndChannel")
+    public Result getUserStaticByDateAndChannel(String date) {
+        return Result.success(sunDataService.getUserStaticByDateAndChannel(date));
+    }
+
 
     public static void main(String[] args) {
         System.out.println(UUID.randomUUID().toString());

+ 16 - 0
book-server/src/main/java/com/book/server/service/SunDataService.java

@@ -52,4 +52,20 @@ public interface SunDataService {
     List<SunStaticOrderDay> getOrderStaticsAll();
 
     List<SunStaticOrderDayChannel> getOrderStaticByDateAndChannel(String date);
+
+    void userStaticYesterday(String yesterdayStr, String todayStr);
+
+    SunStaticUserDay getTodayUserStatic();
+
+    List<SunStaticUserDayChannel> getTodayUserStaticByChannel();
+
+    SunStaticUserDay getYesterdayUserStatic();
+
+    Map getHistoryUserStatic();
+
+    PageResult<SunStaticUserDay> getUserStatics(int page, int size);
+
+    List<SunStaticUserDayChannel> getUserStaticByDateAndChannel(String date);
+
+    List<SunStaticUserDay> getUserStaticsAll();
 }

+ 143 - 0
book-server/src/main/java/com/book/server/service/impl/SunDataServiceImpl.java

@@ -420,6 +420,149 @@ public class SunDataServiceImpl implements SunDataService {
         );
     }
 
+    @Autowired
+    private SunStaticUserDayMapper sunStaticUserDayMapper;
+    @Autowired
+    private SunStaticUserDayChannelMapper sunStaticUserDayChannelMapper;
+    @Autowired
+    private SunUser2Mapper sunUser2Mapper;
+
+    @Override
+    public void userStaticYesterday(String yesterdayStr, String todayStr) {
+        /*
+         * 清除指定日期的统计,因为可能重新计算
+         */
+        sunStaticUserDayMapper.deleteByExample(SunStaticUserDayExample.newAndCreateCriteria().andStaticDateEqualTo(yesterdayStr).example());
+        sunStaticUserDayChannelMapper.deleteByExample(SunStaticUserDayChannelExample.newAndCreateCriteria().andStaticDateEqualTo(yesterdayStr).example());
+        /*
+         * 不分渠道统计
+         */
+        SunStaticUserDay sunUserByDate = getSunUserByDate(yesterdayStr, todayStr);
+        if (sunUserByDate == null) {
+            return;
+        } else {
+            sunStaticUserDayMapper.insert(sunUserByDate);
+        }
+        /*
+         * 分渠道统计
+         */
+        sunStaticUserDayChannelMapper.batchInsert(getSunUserByDateChannels(yesterdayStr, todayStr));
+
+    }
+
+    @Override
+    public SunStaticUserDay getTodayUserStatic() {
+        return getSunUserByDate(TimeUtil.getYesterdayStr(),TimeUtil.getTodayStr());
+    }
+
+    @Override
+    public List<SunStaticUserDayChannel> getTodayUserStaticByChannel() {
+        return getSunUserByDateChannels(TimeUtil.getYesterdayStr(),TimeUtil.getTodayStr());
+    }
+
+    @Override
+    public SunStaticUserDay getYesterdayUserStatic() {
+        return sunStaticUserDayMapper.selectOneByExample(SunStaticUserDayExample.newAndCreateCriteria().andStaticDateEqualTo(TimeUtil.getYesterdayStr()).example());
+    }
+
+    @Override
+    public Map getHistoryUserStatic() {
+        return sunStaticOrderDay2Mapper.selectUserHistory();
+    }
+
+    @Override
+    public PageResult<SunStaticUserDay> getUserStatics(int page, int size) {
+        SunStaticUserDayExample example = SunStaticUserDayExample.newAndCreateCriteria().example();
+        long l = sunStaticUserDayMapper.countByExample(example);
+        example.page(page, size);
+        example.orderBy(SunStaticOrderDay.Column.staticDate.desc());
+        List<SunStaticUserDay> sunStaticUserDays = sunStaticUserDayMapper.selectByExample(example);
+        return new PageResult<>(l, sunStaticUserDays);
+    }
+
+    @Override
+    public List<SunStaticUserDayChannel> getUserStaticByDateAndChannel(String date) {
+        return sunStaticUserDayChannelMapper.selectByExample(
+                SunStaticUserDayChannelExample.newAndCreateCriteria()
+                        .andStaticDateEqualTo(date)
+                        .example()
+        );
+    }
+
+    @Override
+    public List<SunStaticUserDay> getUserStaticsAll() {
+        SunStaticUserDayExample example = SunStaticUserDayExample.newAndCreateCriteria().example();
+        return sunStaticUserDayMapper.selectByExample(example);
+    }
+
+    private SunStaticUserDay getSunUserByDate(String startDate,String endDate) {
+        int i = sunUser2Mapper.selectCountUserByDay(startDate,endDate);
+        if (i <= 0) {
+            return null;
+        }
+
+        HashMap<String, String> recharge = sunUser2Mapper.selectByDay(startDate,endDate);
+        int new_recharge_user = getIntFromDb(recharge.get("new_recharge_user"));
+        float new_recharge_sum = getFloatFromDb(recharge.get("new_recharge_sum"));
+        float avg = 0;
+        //付费率
+        float rate = 0;
+        if (new_recharge_sum > 0) {
+            avg = new_recharge_sum / new_recharge_user;
+            rate = (float)new_recharge_user / i;
+        }
+        SunStaticUserDay day = SunStaticUserDay.builder()
+                .staticDate(startDate)
+                .newAllUser(i)
+                .newRechargeUser(new_recharge_user)
+                .newRechargeSum(String.format("%.2f", new_recharge_sum))
+                .newRechargeCount(getIntFromDb(recharge.get("new_recharge_count")))
+                .rechargeAvg(String.format("%.2f", avg))
+                .rechargeRate(String.format("%.2f", rate))
+                .insertTime(TimeUtil.getCurrentTimestamp())
+                .price("0") // TODO
+                .build();
+        return day;
+    }
+
+    private List<SunStaticUserDayChannel> getSunUserByDateChannels(String startDate,String endDate) {
+        HashMap<String, Integer> activeMap = new HashMap<>();
+        List<HashMap<String, String>> list = sunUser2Mapper.selectCountByDayChannel(startDate,endDate);
+        for (HashMap<String, String> hashMap : list) {
+            activeMap.put(hashMap.get("channel_id"), getIntFromDb(hashMap.get("user_count")));
+        }
+
+        List<HashMap<String, String>> recharges = sunUser2Mapper.selectByDayChannel(startDate, endDate);
+        ArrayList<SunStaticUserDayChannel> sunStaticDayChannels = new ArrayList<>();
+        for (HashMap<String, String> recharge : recharges) {
+            int new_recharge_user = getIntFromDb(recharge.get("new_recharge_user"));
+            float new_recharge_sum = getFloatFromDb(recharge.get("new_recharge_sum"));
+            int i = activeMap.get(recharge.get("channel_id"));
+            float avg = 0;
+            //付费率
+            float rate = 0;
+            if (new_recharge_sum > 0) {
+                avg = new_recharge_sum / new_recharge_user;
+                rate = (float)new_recharge_user / i;
+            }
+            SunStaticUserDayChannel day = SunStaticUserDayChannel.builder()
+                    .staticDate(startDate)
+                    .channelId(recharge.get("channel_id"))
+                    .channelName(recharge.get("channel_name"))
+                    .newAllUser(i)
+                    .newRechargeUser(new_recharge_user)
+                    .newRechargeSum(String.format("%.2f", new_recharge_sum))
+                    .newRechargeCount(getIntFromDb(recharge.get("new_recharge_count")))
+                    .rechargeAvg(String.format("%.2f", avg))
+                    .rechargeRate(String.format("%.2f", rate))
+                    .insertTime(TimeUtil.getCurrentTimestamp())
+                    .price("0") // TODO
+                    .build();
+            sunStaticDayChannels.add(day);
+        }
+        return sunStaticDayChannels;
+    }
+
     private void handleOrder(List<String> list, Integer taskId) {
         SunRequest request = taskMap.get(taskId);
         List<SunOrder> result = new ArrayList<>();

+ 8 - 0
book-server/src/main/java/com/book/server/task/SunDataTask.java

@@ -113,6 +113,14 @@ public class SunDataTask {
         String yesterdayStr = TimeUtil.getYesterdayStr();
         sunDataService.orderStaticDate(yesterdayStr);
     }
+    /**
+     * 用户昨日统计
+     * 凌晨 1 点 20 分
+     */
+    @Scheduled(cron = "1 20 0 * * ?")
+    public void userStaticYesterday() {
+        sunDataService.userStaticYesterday(TimeUtil.getYesterdayStr(),TimeUtil.getTodayStr());
+    }
 
     public static void main(String[] args) {
         System.out.println(TimeUtil.getTodayStr());