Commit 956e1882 authored by 廖旭伟's avatar 廖旭伟

更新用户名bug修改

parent 4f4fefd8
package com.mortals.xhx.module.sst.service.impl;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.feign.user.IUserFeign;
......@@ -28,15 +30,21 @@ public class SstAgreementServiceImpl extends AbstractCRUDServiceImpl<SstAgreemen
@Autowired
private IUserFeign userFeign;
@Autowired
private UserService userService;
@Override
protected void findAfter(SstAgreementEntity params, PageInfo pageInfo, Context context, List<SstAgreementEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
list.stream().forEach(item->{
if(item.getUpdateUserId()!=null) {
Rest<UserPdu> resp = userFeign.info(item.getUpdateUserId());
if (resp.getCode() == YesNoEnum.YES.getValue()) {
item.setUpdateUserName(resp.getData().getRealName());
// Rest<UserPdu> resp = userFeign.info(item.getUpdateUserId());
// if (resp.getCode() == YesNoEnum.YES.getValue()) {
// item.setUpdateUserName(resp.getData().getRealName());
// }
UserEntity userEntity = userService.get(item.getUpdateUserId());
if(userEntity!=null){
item.setUpdateUserName(userEntity.getRealName());
}
}
});
......
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