Showing
1 changed file
with
27 additions
and
3 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/customer/CustomerCreditController.java
| @@ -118,12 +118,12 @@ public class CustomerCreditController extends DefaultBaseController { | @@ -118,12 +118,12 @@ public class CustomerCreditController extends DefaultBaseController { | ||
| 118 | public InvokeResult<GetCustomerCreditBo> getExamineById(@NotBlank(message = "id不能为空!") String id) { | 118 | public InvokeResult<GetCustomerCreditBo> getExamineById(@NotBlank(message = "id不能为空!") String id) { |
| 119 | 119 | ||
| 120 | Object o = redisHandler.get(id); | 120 | Object o = redisHandler.get(id); |
| 121 | - CustomerCredit customerCredit = null; | 121 | + GetCustomerCreditBo getCustomerCreditBo = null; |
| 122 | if (o != null) { | 122 | if (o != null) { |
| 123 | String jsonString = o.toString(); | 123 | String jsonString = o.toString(); |
| 124 | // 2. 反序列化为 CustomerCredit 对象 | 124 | // 2. 反序列化为 CustomerCredit 对象 |
| 125 | - customerCredit = JsonUtil.parseObject(jsonString, CustomerCredit.class); | ||
| 126 | - GetCustomerCreditBo result = packCustomerCreditData(customerCredit); | 125 | + getCustomerCreditBo = JsonUtil.parseObject(jsonString, GetCustomerCreditBo.class); |
| 126 | + GetCustomerCreditBo result = packCustomerCreditDataExamine(getCustomerCreditBo); | ||
| 127 | return InvokeResultBuilder.success(result); | 127 | return InvokeResultBuilder.success(result); |
| 128 | } else { | 128 | } else { |
| 129 | CustomerCredit data = customerCreditService.findById(id); | 129 | CustomerCredit data = customerCreditService.findById(id); |
| @@ -340,4 +340,28 @@ public class CustomerCreditController extends DefaultBaseController { | @@ -340,4 +340,28 @@ public class CustomerCreditController extends DefaultBaseController { | ||
| 340 | } | 340 | } |
| 341 | return data; | 341 | return data; |
| 342 | } | 342 | } |
| 343 | + | ||
| 344 | + /** | ||
| 345 | + * 封装客户资信数据 | ||
| 346 | + * | ||
| 347 | + * @param credit 数据实体 | ||
| 348 | + * @return GetCustomerCreditBo | ||
| 349 | + */ | ||
| 350 | + private GetCustomerCreditBo packCustomerCreditDataExamine(GetCustomerCreditBo credit) { | ||
| 351 | + //调查人 | ||
| 352 | + if (StringUtil.isNotEmpty(credit.getInvestigator())) { | ||
| 353 | + SysUser sysUser = sysUserService.findById(credit.getInvestigator()); | ||
| 354 | + if (sysUser != null) { | ||
| 355 | + credit.setInvestigatorName(sysUser.getName()); | ||
| 356 | + } | ||
| 357 | + } | ||
| 358 | + //主管审核 | ||
| 359 | + if (StringUtil.isNotEmpty(credit.getSupervisorReview())) { | ||
| 360 | + SysUser sysUser = sysUserService.findById(credit.getSupervisorReview()); | ||
| 361 | + if (sysUser != null) { | ||
| 362 | + credit.setSupervisorReviewName(sysUser.getName()); | ||
| 363 | + } | ||
| 364 | + } | ||
| 365 | + return credit; | ||
| 366 | + } | ||
| 343 | } | 367 | } |