|
@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fjhx.area.entity.po.CustomizeArea;
|
|
|
+import com.fjhx.area.service.CustomizeAreaService;
|
|
|
import com.fjhx.area.utils.CustomizeAreaUtil;
|
|
|
import com.fjhx.common.constant.SourceConstant;
|
|
|
import com.fjhx.common.entity.coding.bo.CustomerCodeAndCountryId;
|
|
@@ -67,6 +69,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
|
|
|
@Autowired
|
|
|
private DictTenantDataService dictTenantDataService;
|
|
|
+ @Autowired
|
|
|
+ private CustomizeAreaService customizeAreaService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -177,8 +181,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
@Override
|
|
|
public CustomerVo detail(Long id) {
|
|
|
//查询客户表的信息
|
|
|
- Customer Customer = this.getById(id);
|
|
|
- CustomerVo result = BeanUtil.toBean(Customer, CustomerVo.class);
|
|
|
+ Customer customer = this.getById(id);
|
|
|
+ CustomerVo result = BeanUtil.toBean(customer, CustomerVo.class);
|
|
|
if (ObjectUtil.isEmpty(result)) {
|
|
|
throw new ServiceException("没有找到该用户信息");
|
|
|
}
|
|
@@ -186,7 +190,15 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
List<CustomerUser> customerUserList = customerUserService.list(Wrappers.<CustomerUser>lambdaQuery()
|
|
|
.eq(CustomerUser::getCustomerId, result.getId()));
|
|
|
result.setCustomerUserList(customerUserList);
|
|
|
+ //赋值国省市信息
|
|
|
CustomizeAreaUtil.setAreaName(result);
|
|
|
+ //赋值国旗信息
|
|
|
+ DynamicDataSourceContextHolder.push(SourceConstant.BASE);
|
|
|
+ CustomizeArea country = customizeAreaService.getById(result.getCountryId());
|
|
|
+ DynamicDataSourceContextHolder.poll();
|
|
|
+ if (ObjectUtil.isNotEmpty(country)) {
|
|
|
+ result.setCountryIcon(country.getIcon());
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|