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

手机端新增账号增加创建时间

leon 5 лет назад
Родитель
Сommit
3309693fcf

+ 5 - 0
src/main/java/com/mokamrp/privates/tast/pangu/SyncFosterwxEdit.java

@@ -11,11 +11,13 @@ import com.mokamrp.privates.service.pangu.FosterwxMobileService;
 import com.mokamrp.privates.service.pangu.FosterwxMobileWxfriendService;
 import com.mokamrp.privates.service.pangu.FosterwxStationService;
 import com.mokamrp.privates.service.pangu.FosterwxTaskScheduleService;
+import org.apache.tomcat.jni.Local;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -67,9 +69,12 @@ public class SyncFosterwxEdit {
                     if (fosterwxMobileService.count(fosterwxMobileLambdaQueryWrapper) > 0) continue;
                     
                     fosterwxMobile.setMobileUnioCode(String.format("%02d", fosterwxMobile.getStationId()) + String.format("%02d", fosterwxMobile.getMobileCode()));
+                    fosterwxMobile.setCreateAt(LocalDateTime.now());
+                    fosterwxMobile.setUpdateAt(LocalDateTime.now());
                     fosterwxMobileService.save(fosterwxMobile);
                 } else {
                     //.更新
+                    fosterwxMobile.setUpdateAt(LocalDateTime.now());
                     fosterwxMobileService.update(fosterwxMobile, new QueryWrapper<FosterwxMobile>().eq("id", fosterwxMobile.getId()));
                 }
                 //.更新微信好友信息