linhw 2024-05-23 14:21:07 +08:00
parent f7e9ae7b68
commit 134d775067
3 changed files with 12 additions and 4 deletions

View File

@ -60,6 +60,8 @@ public class AppUser extends BaseEntity
@Excel(name = "学校")
private Long school;
private String schoolName;
/** 专业 */
@Excel(name = "专业")
private String major;

View File

@ -175,6 +175,7 @@ public class AppUserServiceImpl implements IAppUserService
entity.setIsMember(appUser.getIsMember());
entity.setAppId(appUser.getAppId());
entity.setSchool(appUser.getSchool());
entity.setSchoolName(appUser.getCompanyName() == null ? null : appUser.getCompanyName());
// 学校
List<AppUserDataVo> schoolList = appUserMapper.selectList(entity);
Collections.shuffle(schoolList);
@ -185,6 +186,7 @@ public class AppUserServiceImpl implements IAppUserService
entity.setSchool(null);
entity.setSchoolName(null);
entity.setCompanyName(appUser.getCompanyName());
// 公司
List<AppUserDataVo> companylList = appUserMapper.selectList(entity);
@ -197,6 +199,7 @@ public class AppUserServiceImpl implements IAppUserService
// 好友的好友
List<Long> friendIds = appUserFriendMapper.selectByFriendId(ids);
entity.setCompanyName(null);
entity.setUsername(appUser.getCompanyName() == null ? null : appUser.getCompanyName());
entity.setFriendIds(friendIds);
List<AppUserDataVo> friendList = appUserMapper.selectList(entity);
if (friendList == null || friendList.size() == 0) {

View File

@ -182,10 +182,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="appId != null "> and a.id != #{appId}</if>
<if test="school != null and school != ''"> and a.school = #{school}</if>
<if test="companyName != null and companyName != ''">
and (a.company_name like concat('%', #{companyName}, '%')
or a.username like concat('%', #{companyName}, '%')
or s.name like concat('%', #{companyName}, '%')
)
and a.company_name like concat('%', #{companyName}, '%')
</if>
<if test="username != null and username != ''">
and a.username like concat('%', #{username}, '%')
</if>
<if test="schoolName != null and schoolName != ''">
and s.name like concat('%', #{schoolName}, '%')
</if>
<if test="ids != null and ids.size()"> and a.id not in
<foreach collection="ids" item="item" open="(" separator="," close=")">