|
@@ -22,6 +22,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import me.zhengjie.config.RsaProperties;
|
|
|
import me.zhengjie.modules.dm.card.domain.DmCard;
|
|
|
import me.zhengjie.modules.dm.card.service.DmCardService;
|
|
|
import me.zhengjie.modules.dm.card.service.dto.DmCardDto;
|
|
@@ -40,6 +41,7 @@ import me.zhengjie.modules.system.service.DeptService;
|
|
|
import me.zhengjie.modules.system.service.UserService;
|
|
|
import me.zhengjie.modules.system.service.dto.DeptDto;
|
|
|
import me.zhengjie.modules.system.service.dto.UserDto;
|
|
|
+import me.zhengjie.utils.RsaUtils;
|
|
|
import me.zhengjie.utils.SecurityUtils;
|
|
|
import me.zhengjie.utils.StringUtils;
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
@@ -71,7 +73,7 @@ public class ZkDataSyncTask {
|
|
|
private final DmRoomDeviceRepository dmRoomDeviceRepository;
|
|
|
private final DmCardService dmCardService;
|
|
|
|
|
|
- public void run() {
|
|
|
+ public void run() throws Exception {
|
|
|
log.info("deptSync 执行开始");
|
|
|
deptSync();
|
|
|
log.info("deptSync 执行结束");
|
|
@@ -205,7 +207,6 @@ public class ZkDataSyncTask {
|
|
|
|
|
|
user.setEmail(item.getString("email"));
|
|
|
user.setPhone(item.getString("mobile"));
|
|
|
- user.setPassword(passwordEncoder.encode("12345678"));
|
|
|
user.setEnabled(item.getInteger("userStatus") == 1);
|
|
|
user.setIsAdmin(false);
|
|
|
user.setOrgPassword("12345678");
|
|
@@ -266,6 +267,7 @@ public class ZkDataSyncTask {
|
|
|
if (userDto != null) {
|
|
|
userService.updateSync(user);
|
|
|
} else {
|
|
|
+ user.setPassword(passwordEncoder.encode("12345678"));
|
|
|
userService.createSync(user);
|
|
|
}
|
|
|
} catch (Exception e) {
|