This commit is contained in:
parent
209aac0bab
commit
caa26fa87b
|
@ -49,7 +49,7 @@ public class Counselor extends BaseEntity {
|
|||
* 个人简介
|
||||
*/
|
||||
private String introduce;
|
||||
private String introduce_title;
|
||||
private String introduceTitle;
|
||||
|
||||
/**
|
||||
* 擅长领域
|
||||
|
|
|
@ -120,8 +120,7 @@ public class CounselorVo implements Serializable {
|
|||
*/
|
||||
private String goodRate;
|
||||
|
||||
@Translation(type = TransConstant.OSS_ID_TO_URL)
|
||||
private Long avatarUrl;
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 咨询数量
|
||||
*/
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.service.DictService;
|
||||
import org.dromara.common.core.service.OssService;
|
||||
import org.dromara.common.core.utils.DateUtils;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
|
@ -51,6 +52,7 @@ public class CounselorServiceImpl implements ICounselorService {
|
|||
|
||||
private final DictService dictService;
|
||||
private final ISysUserService userService;
|
||||
private final OssService ossService;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -124,13 +126,16 @@ public class CounselorServiceImpl implements ICounselorService {
|
|||
List<CounselorVo> records = result.getRecords();
|
||||
for (CounselorVo one : records) {
|
||||
SysUserVo user = userService.selectUserById(one.getId());
|
||||
one.setAvatarUrl(user.getAvatar());
|
||||
String url = ossService.selectUrlByIds(String.valueOf(user.getAvatar()));
|
||||
one.setAvatarUrl(url);
|
||||
one.setReservationNum(100);
|
||||
Date practiceTime = one.getPracticeTime();
|
||||
String betweenYear = DateUtils.getBetweenYear(practiceTime, new Date());
|
||||
one.setPracticeString(betweenYear);
|
||||
//List<String> specialityField = one.getSpecialityField();
|
||||
String scaleTypeName = dictService.getDictLabel("good_field", StrUtil.join(StrUtil.COMMA, one.getSpecialityField()));
|
||||
one.setSpecialityFieldName(StrUtil.split(scaleTypeName, StrUtil.COMMA));
|
||||
|
||||
}
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue