Commit 9704da5d authored by wujipeng's avatar wujipeng
Browse files

用户详情增加展示信息

parent ba7ba16e
......@@ -14,6 +14,4 @@ public class UserDTO extends UserEntity {
private List<UserAccountEntity> userAccountList;
@ApiModelProperty("关系,方便解析和会回显")
private List<RelationShipDTO> relationShipList;
}
......@@ -42,4 +42,8 @@ public class UserEntity {
@ApiModelProperty("关系")
@TableField("relation_ship")
private String relationShip;
@ApiModelProperty("关系,方便解析和会回显")
@TableField(exist = false)
private List<RelationShipDTO> relationShipList;
}
......@@ -13,6 +13,7 @@ import com.platform.model.vo.UserVO;
import com.platform.service.UserAccountService;
import com.platform.service.UserService;
import com.platform.utils.DozerUtils;
import com.platform.utils.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -34,6 +35,13 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
List<UserAccountEntity> userAccountEntityList = userAccountService.queryListByUserName(userName);
userVO.setUserAccountList(userAccountEntityList);
}
String relationShip = userEntity.getRelationShip();
if(StringUtils.isNotEmpty(relationShip)){
List<RelationShipDTO> relationShipDTOS = JSON.parseArray(relationShip, RelationShipDTO.class);
if(!relationShipDTOS.isEmpty()){
userVO.setRelationShipList(relationShipDTOS);
}
}
return userVO;
}
......
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