diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index 4c0ee501..225e4088 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -778,7 +778,7 @@ public class UsersController extends BaseController { } map.put("result", errInfo); map.put("code","0"); -// map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd))); + map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd))); return map; } @@ -1032,7 +1032,7 @@ public class UsersController extends BaseController { map.put("USER_ID",ID); map.put("result", errInfo); //返回结果 map.put("code", "0"); -// map.put("syncInfo", JSONUtil.toJsonStr(userinfo)); + map.put("syncInfo", JSONUtil.toJsonStr(userinfo)); } else { map.put("result", "您输入的身份证号和用户名二次校验失败,请确认后重新申请"); //返回结果 } @@ -1066,9 +1066,9 @@ public class UsersController extends BaseController { for (Object key : set) { param.put(key.toString(),pd.getString(key.toString())); } -// String UserDto = JSON.toJSONString(param); -// String result = HttpClientUtilDoGet.sendHttpPost(tongBuUrl + "/docking/core/user/addOrUpdate", UserDto,param); -// returnMap = (Map) JSON.parse(result); + String UserDto = JSON.toJSONString(param); + String result = HttpClientUtilDoGet.sendHttpPost(tongBuUrl + "/docking/core/user/addOrUpdate", UserDto,param); + returnMap = (Map) JSON.parse(result); // TODO com.alibaba.fastjson.JSONException: syntax error, pos 1 暂时不用人员中台 returnMap.put("result", "success"); } @@ -2503,12 +2503,23 @@ public class UsersController extends BaseController { return doCheck(param.get("USERNAME"),param.get("CARD_NO"),param.get("USER_ID")); } + /** + * 检查人员中台用户是否存在 + * + * @param USERNAME 用户名 + * @param CARD_NO 身份证号 + * @param USER_ID 用户id + * @return map + * @throws Exception + * @author water_xu + * @date 2024-9-29 + */ public Map doCheck(String USERNAME, String CARD_NO, String USER_ID) throws Exception { -// String result = HttpClientUtilDoGet.sendHttpGet(tongBuUrl + "/docking/core/user/getCheck"+"?USERNAME="+USERNAME+"&CARD_NO="+CARD_NO+"&USER_ID="+USER_ID); -// Map returnMap = (Map) JSON.parse(result); + String result = HttpClientUtilDoGet.sendHttpGet(tongBuUrl + "/docking/core/user/getCheck"+"?USERNAME="+USERNAME+"&CARD_NO="+CARD_NO+"&USER_ID="+USER_ID); + Map returnMap = (Map) JSON.parse(result); // 人员中台暂时不用 - Map returnMap = new HashMap<>(); - returnMap.put("result", "success"); +// Map returnMap = new HashMap<>(); +// returnMap.put("result", "success"); return returnMap; } diff --git a/src/main/java/com/zcloud/syncData/SyncDataAdviceAspect.java b/src/main/java/com/zcloud/syncData/SyncDataAdviceAspect.java index dabed28d..d50553f2 100644 --- a/src/main/java/com/zcloud/syncData/SyncDataAdviceAspect.java +++ b/src/main/java/com/zcloud/syncData/SyncDataAdviceAspect.java @@ -25,8 +25,8 @@ import java.util.Map; * 作者:water_xu * 官网:www.zcloudchina.com */ -//@Aspect -//@Component +@Aspect +@Component @SuppressWarnings("all") public class SyncDataAdviceAspect { diff --git a/src/main/java/com/zcloud/syncData/listener/SyncDataListener.java b/src/main/java/com/zcloud/syncData/listener/SyncDataListener.java index a313f873..0eebb398 100644 --- a/src/main/java/com/zcloud/syncData/listener/SyncDataListener.java +++ b/src/main/java/com/zcloud/syncData/listener/SyncDataListener.java @@ -85,10 +85,12 @@ public class SyncDataListener implements RocketMQListener { pd.putAll(tenCorpDto.getPd()); pd.put("CONSUMPTION_TIME", DateUtil.date2Str(new Date())); pd.put("CONSUMPTION_TYPE","MqQyDataListener"); - if ("qy".equals(tenCorpDto.getMessage())){ - // 在本端发的同步消息,不需要再次同步该数据 - return; - } + //2024-10-08 黄宇轩修改, + // 三端新增用户后,人员中台将用户信息同步到core_sync_user表 +// if ("qy".equals(tenCorpDto.getMessage())){ +// // 在本端发的同步消息,不需要再次同步该数据 +// return; +// } try { //拿到原路径 String url = pd.getString("url");