Commit c9cdd355 authored by 高广京's avatar 高广京

Merge branch 'KF-30' into 'master'

新增日志

See merge request !23
parents 93d7d2d0 ad212e19
...@@ -9,6 +9,8 @@ import cn.quantgroup.xyqb.repository.IProductLoginRepository; ...@@ -9,6 +9,8 @@ import cn.quantgroup.xyqb.repository.IProductLoginRepository;
import cn.quantgroup.xyqb.service.user.IOauthLoginInfoService; import cn.quantgroup.xyqb.service.user.IOauthLoginInfoService;
import cn.quantgroup.xyqb.util.AtomicSequencer; import cn.quantgroup.xyqb.util.AtomicSequencer;
import cn.quantgroup.xyqb.util.RandomSequencer; import cn.quantgroup.xyqb.util.RandomSequencer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -41,7 +43,7 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -41,7 +43,7 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRES_NEW) @Transactional(propagation = Propagation.REQUIRES_NEW)
public void addLoginInfo(User user, Integer tenantId) { public void addLoginInfo(User user, Integer tenantId) {
log.info("=addLoginInfo= -> user={}, tenetId={}", user, tenantId); log.info("=addLoginInfo -> user={}, tenetId={}", JSON.toJSONString(user), tenantId);
OauthClientDetailsEntity oauthClientDetailsEntity = oauthClientDetailsRepository.findFirstByClientId(tenantId); OauthClientDetailsEntity oauthClientDetailsEntity = oauthClientDetailsRepository.findFirstByClientId(tenantId);
if (oauthClientDetailsEntity != null) { if (oauthClientDetailsEntity != null) {
String institutionId = oauthClientDetailsEntity.getInstitutionId(); String institutionId = oauthClientDetailsEntity.getInstitutionId();
...@@ -62,8 +64,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -62,8 +64,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
Integer partitionKey = atomicSequencer.partitionKey(customerId); Integer partitionKey = atomicSequencer.partitionKey(customerId);
productLoginEntity = EntityBuilder.productLogin(productId, institutionId, phoneNo, customerId, customerName, partitionKey, id); productLoginEntity = EntityBuilder.productLogin(productId, institutionId, phoneNo, customerId, customerName, partitionKey, id);
productLoginEntity.setExtensionAccountId(userId); productLoginEntity.setExtensionAccountId(userId);
log.info("=save productLoginRepository= {}", productLoginEntity); log.info("=addLoginInfo=save begin productLoginRepository={}", JSON.toJSONString(productLoginEntity));
productLoginRepository.save(productLoginEntity); productLoginRepository.save(productLoginEntity);
log.info("=addLoginInfo=save end productLoginRepository={}", JSON.toJSONString(productLoginEntity));
// 根据customerId 获取uuid // 根据customerId 获取uuid
CustomerLoginEntity customerLoginEntity = customerLoginRepository.findFirstByCustomerId(productLoginEntity.getCustomerId()); CustomerLoginEntity customerLoginEntity = customerLoginRepository.findFirstByCustomerId(productLoginEntity.getCustomerId());
if (null != customerLoginEntity) { if (null != customerLoginEntity) {
...@@ -82,9 +85,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -82,9 +85,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
customerLogin.setModifiedDate(new Date()); customerLogin.setModifiedDate(new Date());
customerLogin.setCreatedBy(""); customerLogin.setCreatedBy("");
customerLogin.setModifiedBy(""); customerLogin.setModifiedBy("");
log.info("=save customerLoginRepository= {}", customerLogin); log.info("=addLoginInfo=save begin customerLoginRepository={}", JSON.toJSONString(customerLogin));
customerLoginRepository.save(customerLogin); customerLoginRepository.save(customerLogin);
log.info("=addLoginInfo=save end customerLoginRepository={}", JSON.toJSONString(customerLogin));
// 添加用户信息表 // 添加用户信息表
CustomerInfoEntity customerInfo = new CustomerInfoEntity(); CustomerInfoEntity customerInfo = new CustomerInfoEntity();
// customerInfo.setId(atomicSequencer.nextId()); // customerInfo.setId(atomicSequencer.nextId());
...@@ -96,9 +99,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -96,9 +99,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
customerInfo.setModifiedDate(new Date()); customerInfo.setModifiedDate(new Date());
customerInfo.setCreatedBy(""); customerInfo.setCreatedBy("");
customerInfo.setModifiedBy(""); customerInfo.setModifiedBy("");
log.info("=save customerInfoRepository= {}", customerInfo); log.info("=addLoginInfo=save begin customerInfoRepository={}", JSON.toJSONString(customerInfo));
customerInfoRepository.save(customerInfo); customerInfoRepository.save(customerInfo);
log.info("=addLoginInfo=save end customerInfoRepository={}", JSON.toJSONString(customerInfo));
} }
} }
} }
...@@ -106,7 +109,7 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -106,7 +109,7 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRES_NEW) @Transactional(propagation = Propagation.REQUIRES_NEW)
public void addRegisterInfo(User user, AppletParamEntry appletParamEntry) { public void addRegisterInfo(User user, AppletParamEntry appletParamEntry) {
log.info("=addRegisterInfo= -> User={}, AppletParamEntry={}", user, appletParamEntry); log.info("=addRegisterInfo= -> User={}, AppletParamEntry={}", JSON.toJSONString(user), appletParamEntry);
OauthClientDetailsEntity oauthClientDetailsEntity = oauthClientDetailsRepository.findFirstByClientId(appletParamEntry.getTenantId()); OauthClientDetailsEntity oauthClientDetailsEntity = oauthClientDetailsRepository.findFirstByClientId(appletParamEntry.getTenantId());
if (oauthClientDetailsEntity != null) { if (oauthClientDetailsEntity != null) {
String institutionId = oauthClientDetailsEntity.getInstitutionId(); String institutionId = oauthClientDetailsEntity.getInstitutionId();
...@@ -126,8 +129,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -126,8 +129,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
Integer partitionKey = atomicSequencer.partitionKey(customerId); Integer partitionKey = atomicSequencer.partitionKey(customerId);
productLoginEntity = EntityBuilder.productLogin(productId, institutionId, phoneNo, customerId, customerName, partitionKey, id); productLoginEntity = EntityBuilder.productLogin(productId, institutionId, phoneNo, customerId, customerName, partitionKey, id);
productLoginEntity.setExtensionAccountId(userId); productLoginEntity.setExtensionAccountId(userId);
log.info("=save productLoginRepository= {}", productLoginEntity); log.info("=addRegisterInfo=save begin productLoginRepository= {}", JSON.toJSONString(productLoginEntity));
productLoginRepository.save(productLoginEntity); productLoginRepository.save(productLoginEntity);
log.info("=addRegisterInfo=save end productLoginRepository= {}", JSON.toJSONString(productLoginEntity));
// 根据customerId 获取uuid // 根据customerId 获取uuid
CustomerLoginEntity customerLoginEntity = customerLoginRepository.findFirstByCustomerId(productLoginEntity.getCustomerId()); CustomerLoginEntity customerLoginEntity = customerLoginRepository.findFirstByCustomerId(productLoginEntity.getCustomerId());
if (null != customerLoginEntity) { if (null != customerLoginEntity) {
...@@ -146,9 +150,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -146,9 +150,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
customerLogin.setModifiedDate(new Date()); customerLogin.setModifiedDate(new Date());
customerLogin.setCreatedBy(""); customerLogin.setCreatedBy("");
customerLogin.setModifiedBy(""); customerLogin.setModifiedBy("");
log.info("=save customerLoginRepository= {}", customerLogin); log.info("=addRegisterInfo=save begin customerLoginRepository= {}", JSON.toJSONString(customerLogin));
customerLoginRepository.save(customerLogin); customerLoginRepository.save(customerLogin);
log.info("=addRegisterInfo=save end customerLoginRepository= {}", JSON.toJSONString(customerLogin));
// 添加用户信息表 // 添加用户信息表
CustomerInfoEntity customerInfo = new CustomerInfoEntity(); CustomerInfoEntity customerInfo = new CustomerInfoEntity();
// customerInfo.setId(atomicSequencer.nextId()); // customerInfo.setId(atomicSequencer.nextId());
...@@ -171,9 +175,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -171,9 +175,9 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
customerInfo.setModifiedDate(new Date()); customerInfo.setModifiedDate(new Date());
customerInfo.setCreatedBy(""); customerInfo.setCreatedBy("");
customerInfo.setModifiedBy(""); customerInfo.setModifiedBy("");
log.info("=save customerInfoRepository= {}", customerInfo); log.info("=addRegisterInfo=save begin customerInfoRepository= {}", JSON.toJSONString(customerInfo));
customerInfoRepository.save(customerInfo); customerInfoRepository.save(customerInfo);
log.info("=addRegisterInfo=save end customerInfoRepository= {}", JSON.toJSONString(customerInfo));
} }
} }
} }
......
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