dzx 1 rok pred
rodič
commit
df891fa6b5

+ 5 - 1
src/main/java/com/xjrsoft/module/job/AttendanceMessageTask.java

@@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoUnit;
@@ -302,9 +303,12 @@ public class AttendanceMessageTask {
             }
 
             if(isInsert){
+                SimpleDateFormat sdf = new SimpleDateFormat();
                 Entity entity = Entity.create(table);
+                entity.set("id", IdUtil.getSnowflakeNextId());
+                entity.set("content", "消息推送人数:" + userCount);
+                entity.set("create_date", sdf.format(new Date()));
                 entity.set("content", "消息推送人数:" + userCount);
-                entity.set("create_date", LocalDateTime.now());
                 entity.set("template_id", wechatTemplate);
                 entity.set("send_time", recentlyTime);
                 SqlRunnerAdapter.db().dynamicInsert(table, entity);