Commit 45cd57eb authored by 李健华's avatar 李健华

Merge branch 'KA-38' into 'master'

去掉查询从库注解

See merge request !31
parents 73eae94e ffcb0ccb
package cn.quantgroup.xyqb.service.user.impl; package cn.quantgroup.xyqb.service.user.impl;
import cn.quantgroup.tech.db.DSType;
import cn.quantgroup.tech.db.TargetDataSource;
import cn.quantgroup.xyqb.entity.CustomerInfoEntity; import cn.quantgroup.xyqb.entity.CustomerInfoEntity;
import cn.quantgroup.xyqb.repository.ICustomerInfoRepository; import cn.quantgroup.xyqb.repository.ICustomerInfoRepository;
import cn.quantgroup.xyqb.service.user.ICustomerInfoService; import cn.quantgroup.xyqb.service.user.ICustomerInfoService;
...@@ -19,14 +17,14 @@ public class CustomerInfoServiceImpl implements ICustomerInfoService { ...@@ -19,14 +17,14 @@ public class CustomerInfoServiceImpl implements ICustomerInfoService {
private ICustomerInfoRepository customerInfoRepository; private ICustomerInfoRepository customerInfoRepository;
@Override @Override
@TargetDataSource(type = DSType.SLAVE)//查询从库 // @TargetDataSource(type = DSType.SLAVE)//查询从库
public CustomerInfoEntity findSlaveByCustomerId(Long customerId) { public CustomerInfoEntity findSlaveByCustomerId(Long customerId) {
CustomerInfoEntity customerInfo = customerInfoRepository.findByCustomerId(customerId); CustomerInfoEntity customerInfo = customerInfoRepository.findByCustomerId(customerId);
return customerInfo; return customerInfo;
} }
@Override @Override
@TargetDataSource(type = DSType.SLAVE)//查询从库 // @TargetDataSource(type = DSType.SLAVE)//查询从库
public CustomerInfoEntity findSlaveByOpenId(String openId, String institutionId, String productId) { public CustomerInfoEntity findSlaveByOpenId(String openId, String institutionId, String productId) {
CustomerInfoEntity customerInfo = customerInfoRepository.findByInstitutionIdAndProductIdAndSourceOpenId(institutionId, productId, openId); CustomerInfoEntity customerInfo = customerInfoRepository.findByInstitutionIdAndProductIdAndSourceOpenId(institutionId, productId, openId);
return customerInfo; return 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