Commit 542d08a1 by fudahua

同步通讯录 新增成员

parent 50510bef
......@@ -79,6 +79,7 @@ public class ClerkSyncOperation implements BaseSyncOperation {
public void dealSingleByMq(DealParamMqDTO dealParamMqDTO, TabHaobanPreDealLog dataPre) {
logger.info("成员处理:{}", JSONObject.toJSONString(dealParamMqDTO));
ClerkDTO clerkDTO = clerkService.getClerkByClerkIdNodel(dealParamMqDTO.getData());
String reason = "";
boolean dealFlag = true;
if (clerkDTO == null) {
logger.info("成员不存在:t:{},d:{}", dealParamMqDTO.getTaskId(), dealParamMqDTO.getData());
......@@ -100,14 +101,19 @@ public class ClerkSyncOperation implements BaseSyncOperation {
gicClerkDTO.setClerkName(clerkDTO.getClerkName());
gicClerkDTO.setStoreId(clerkDTO.getStoreId());
gicClerkDTO.setEnterpriseId(clerkDTO.getEnterpriseId());
staffApiService.addGicClerk(gicClerkDTO);
ServiceResponse response = staffApiService.saveSyncStaffByGic(gicClerkDTO);
if (response.getCode() != 1) {
reason = response.getMessage();
dealFlag = false;
}
} catch (Exception e) {
e.printStackTrace();
logger.info("同步失败:", JSONObject.toJSONString(dataPre));
reason = "成员处理异常";
dealFlag = false;
} finally {
if (!dealFlag) {
dealException(dealParamMqDTO.getTaskId(), dealParamMqDTO.getData(), dataPre.getEnterpriseId(), "成员处理异常");
dealException(dealParamMqDTO.getTaskId(), dealParamMqDTO.getData(), dataPre.getEnterpriseId(), reason);
} else {
dealSuccess(dealParamMqDTO.getTaskId(), dealParamMqDTO.getData(), dataPre.getEnterpriseId(), dataPre.getWxEnterpriseId());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment