yumeng 1 éve
szülő
commit
5823aa4569

+ 15 - 5
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java

@@ -357,6 +357,18 @@ public class DateUtils extends PropertyEditorSupport {
         return longDate;
         return longDate;
     }
     }
 
 
+
+    public static Integer getHour(long millis) {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        Date d1 = new Date(millis);
+        String d2 = simpleDateFormat.format(d1);
+        Integer hour = Integer.valueOf(d2);
+        return hour;
+    }
+
+
+
+
     public static String temp13ToDate(long millis) {
     public static String temp13ToDate(long millis) {
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Date d1 = new Date(millis);
         Date d1 = new Date(millis);
@@ -1146,11 +1158,9 @@ public class DateUtils extends PropertyEditorSupport {
     }
     }
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
-        Map<String, String> monthStartAndEnd = DateUtils.getMonthStartAndEnd();
-        String firstDay = monthStartAndEnd.get("firstDay");
-        String lastDay = monthStartAndEnd.get("lastDay");
-        List<String> days = DateUtils.getDays(firstDay, lastDay);
-        System.err.println(days);
+        Integer hour = getHour(1698979253012L);
+        System.err.println(hour);
+
     }
     }
 
 
     public static String getNowDate(String format) {
     public static String getNowDate(String format) {

+ 1 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/JiaoYangFenXiaoJob.java

@@ -268,6 +268,7 @@ public class JiaoYangFenXiaoJob {
         }
         }
     }
     }
 
 
+
     /**
     /**
      * 上个月数据获取
      * 上个月数据获取
      *
      *

+ 11 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/JyOrderList.java

@@ -125,6 +125,8 @@ public class JyOrderList
     @Excel(name = "订单时间")
     @Excel(name = "订单时间")
     private Long statDate;
     private Long statDate;
 
 
+    private Integer statHour;
+
     public static long getSerialVersionUID() {
     public static long getSerialVersionUID() {
         return serialVersionUID;
         return serialVersionUID;
     }
     }
@@ -353,6 +355,14 @@ public class JyOrderList
         this.statDate = statDate;
         this.statDate = statDate;
     }
     }
 
 
+    public Integer getStatHour() {
+        return statHour;
+    }
+
+    public void setStatHour(Integer statHour) {
+        this.statHour = statHour;
+    }
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         return "JyOrderList{" +
         return "JyOrderList{" +
@@ -384,6 +394,7 @@ public class JyOrderList
                 ", regimentalPromotionAmount=" + regimentalPromotionAmount +
                 ", regimentalPromotionAmount=" + regimentalPromotionAmount +
                 ", totalRegimentalSettleAmount=" + totalRegimentalSettleAmount +
                 ", totalRegimentalSettleAmount=" + totalRegimentalSettleAmount +
                 ", statDate=" + statDate +
                 ", statDate=" + statDate +
+                ", statHour=" + statHour +
                 '}';
                 '}';
     }
     }
 }
 }

+ 2 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/JiaoYangFenXiaoMapper.xml

@@ -30,6 +30,7 @@
         regimental_promotion_amount,
         regimental_promotion_amount,
         total_regimental_settle_amount,
         total_regimental_settle_amount,
         stat_date,
         stat_date,
+        stat_hour,
         commission_rate
         commission_rate
         )
         )
         values
         values
@@ -62,9 +63,9 @@
             #{add.regimentalPromotionAmount},
             #{add.regimentalPromotionAmount},
             #{add.totalRegimentalSettleAmount},
             #{add.totalRegimentalSettleAmount},
             #{add.statDate},
             #{add.statDate},
+            #{add.statHour},
             #{add.commissionRate}
             #{add.commissionRate}
             )
             )
-
         </foreach>
         </foreach>
 
 
 
 

+ 1 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/JiaoYangFenXiaoServiceImpl.java

@@ -110,6 +110,7 @@ public class JiaoYangFenXiaoServiceImpl implements IJiaoYangFenXiaoService {
             order.setRegimentalPromotionAmount(jsonObject.getLong("regimentalPromotionAmount"));
             order.setRegimentalPromotionAmount(jsonObject.getLong("regimentalPromotionAmount"));
             order.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
             order.setTotalRegimentalSettleAmount(jsonObject.getLong("totalRegimentalSettleAmount"));
             order.setStatDate(DateUtils.tempToLongDate(jsonObject.getLong("orderCreateTime")));
             order.setStatDate(DateUtils.tempToLongDate(jsonObject.getLong("orderCreateTime")));
+            order.setStatHour(DateUtils.getHour(jsonObject.getLong("orderCreateTime")));
             orders.add(order);
             orders.add(order);
         }
         }
         jiaoYangFenXiaoMapper.replace(orders);
         jiaoYangFenXiaoMapper.replace(orders);