提交 853dbd9e 编写于 作者: tao.jin's avatar tao.jin

增加requestId方便链路追踪

上级 3a28a6e4
流水线 #39555 已失败 于阶段
...@@ -17,6 +17,7 @@ import com.pica.cloud.account.account.server.util.*; ...@@ -17,6 +17,7 @@ import com.pica.cloud.account.account.server.util.*;
import com.pica.cloud.foundation.completeness.client.utils.IntactUtils; import com.pica.cloud.foundation.completeness.client.utils.IntactUtils;
import com.pica.cloud.foundation.encryption.common.constants.EncryptConstants; import com.pica.cloud.foundation.encryption.common.constants.EncryptConstants;
import com.pica.cloud.foundation.encryption.util.EncryptUtils; import com.pica.cloud.foundation.encryption.util.EncryptUtils;
import com.pica.cloud.foundation.entity.PicaResponse;
import com.pica.cloud.foundation.redis.ICacheClient; import com.pica.cloud.foundation.redis.ICacheClient;
import com.pica.cloud.foundation.utils.utils.StringUtil; import com.pica.cloud.foundation.utils.utils.StringUtil;
import com.pica.cloud.tag.transport.client.ITransportDoctorClient; import com.pica.cloud.tag.transport.client.ITransportDoctorClient;
...@@ -31,6 +32,7 @@ import org.springframework.stereotype.Service; ...@@ -31,6 +32,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.UUID;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
@Service @Service
...@@ -87,6 +89,7 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -87,6 +89,7 @@ public class RegisterServiceImpl implements RegisterService {
@Override @Override
public LoginResult register(BaseRequest baseRequest,QueryMobileEntity queryMobileEntity) { public LoginResult register(BaseRequest baseRequest,QueryMobileEntity queryMobileEntity) {
String requestId = UUID.randomUUID().toString();
//接入新旭事务一致性 //接入新旭事务一致性
String batchNo = IntactUtils.getUUID(); String batchNo = IntactUtils.getUUID();
intactUtil.sendIntact(batchNo,"register",com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_1,"baseRequest:"+ JSON.toJSONString(baseRequest)+",queryMobileEntity:"+JSON.toJSONString(queryMobileEntity)); intactUtil.sendIntact(batchNo,"register",com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_1,"baseRequest:"+ JSON.toJSONString(baseRequest)+",queryMobileEntity:"+JSON.toJSONString(queryMobileEntity));
...@@ -176,9 +179,12 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -176,9 +179,12 @@ public class RegisterServiceImpl implements RegisterService {
redisClient.del(nxKey); redisClient.del(nxKey);
intactUtil.sendIntact(batchNo,"register",com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_3,"baseRequest:"+ JSON.toJSONString(baseRequest)+",queryMobileEntity:"+JSON.toJSONString(queryMobileEntity)); intactUtil.sendIntact(batchNo,"register",com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_3,"baseRequest:"+ JSON.toJSONString(baseRequest)+",queryMobileEntity:"+JSON.toJSONString(queryMobileEntity));
transportDoctorClient.updateDoctorProfilesById( logger.info("@@@update doctor profiles by id: requestId-{}, doctorId-{}", requestId, userId);
userId.intValue(), Lists.newArrayList(new StickerProfileDto(Integer.valueOf(stickerId), "1")), null); PicaResponse<Integer> updateDoctorProfilesResp = transportDoctorClient.updateDoctorProfilesById(
userId.intValue(), Lists.newArrayList(new StickerProfileDto(Integer.valueOf(stickerId), "1")), requestId, null);
if (updateDoctorProfilesResp.getData() != null && updateDoctorProfilesResp.getData().equals(0)) {
logger.error("update doctor tag failed");
}
return result; return result;
} else { } else {
logger.info("register-account is exists"); logger.info("register-account is exists");
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册