Merge remote-tracking branch 'origin/feat_chievements_dev' into feat_chievements_dev

This commit is contained in:
liuhuazhong 2025-05-09 08:32:14 +08:00
commit b74154e56c
3 changed files with 35 additions and 4 deletions

View File

@ -74,6 +74,25 @@ public class ExpertResourceLibrary extends BaseEntity {
private Long watcherSum;
private Long favoriteSum;
private String userImg;
private String userNickName;
public String getUserImg() {
return userImg;
}
public void setUserImg(String userImg) {
this.userImg = userImg;
}
public String getUserNickName() {
return userNickName;
}
public void setUserNickName(String userNickName) {
this.userNickName = userNickName;
}
public String getAreaQuery() {
return areaQuery;
}

View File

@ -1,6 +1,7 @@
package com.microservices.dms.resourceLibrary.service.impl;
import com.microservices.common.core.utils.DateUtils;
import com.microservices.common.core.utils.StringUtils;
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
import com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary;
import com.microservices.dms.resourceLibrary.domain.vo.ExpertAttachmentVo;
@ -68,7 +69,16 @@ public class ExpertResourceLibraryServiceImpl implements IExpertResourceLibraryS
*/
@Override
public List<ExpertResourceLibrary> selectExpertResourceLibraryList(ExpertResourceLibrary expertResourceLibrary) {
return expertResourceLibraryMapper.selectExpertResourceLibraryList(expertResourceLibrary);
List<ExpertResourceLibrary> expertResourceLibraryList = expertResourceLibraryMapper.selectExpertResourceLibraryList(expertResourceLibrary);
for (ExpertResourceLibrary a : expertResourceLibraryList) {
String gender = a.getGender();
String img = "images/avatars/User/boy.jpg";
if(StringUtils.isNotEmpty(gender) && gender.equals("1")){
img = "images/avatars/User/girl.jpg";
}
a.setUserImg(img);
}
return expertResourceLibraryList;
}

View File

@ -72,7 +72,8 @@
<select id="selectExpertResourceLibraryList" parameterType="ExpertResourceLibrary"
resultType="com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary">
select * from ( select erl.id, e.id as expert_id,e.user_id, e.expert_name, e.highest_degree, e.graduated_from,
e.id_number,erl.gender,images, attachments,
u.nickname as "userNickName",ue.gender as "gender",
e.id_number,images, attachments,
e.major, e.workplace, e.phone,
e.workplace_type, e.expert_email, erl.expert_summary, erl.expert_detail, e.professional_title, e.expert_type,
expert_domain,u.authentication as expertAuth,
@ -83,11 +84,12 @@
erl.update_by, erl.update_time,erl.sort_no
from experts e
inner join users u on e.user_id = u.id
inner join user_extensions ue on u.id = ue.user_id
left join expert_resource_library erl on e.id = erl.expert_id
<where>
e.is_delete='0' and e.status=1
<if test="userId != null ">and user_id = #{userId}</if>
<if test="gender != null ">and gender = #{gender}</if>
<if test="userId != null ">and e.user_id = #{userId}</if>
<if test="gender != null ">and ue.gender = #{gender}</if>
<if test="expertName != null and expertName != ''">and e.expert_name like concat('%', #{expertName}, '%')
</if>
<if test="highestDegree != null and highestDegree != ''">and highest_degree = #{highestDegree}</if>