linhw 2024-05-23 14:34:14 +08:00
parent 134d775067
commit f67944e15a
2 changed files with 5 additions and 12 deletions

View File

@ -175,7 +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());
entity.setCompanyName(appUser.getCompanyName());
// 学校
List<AppUserDataVo> schoolList = appUserMapper.selectList(entity);
Collections.shuffle(schoolList);
@ -186,8 +186,6 @@ public class AppUserServiceImpl implements IAppUserService
entity.setSchool(null);
entity.setSchoolName(null);
entity.setCompanyName(appUser.getCompanyName());
// 公司
List<AppUserDataVo> companylList = appUserMapper.selectList(entity);
Collections.shuffle(companylList);
@ -198,8 +196,6 @@ 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,13 +182,10 @@ 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}, '%')
</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}, '%')
and (a.company_name like concat('%', #{companyName}, '%')
or a.username like concat('%', #{companyName}, '%')
or s.name like concat('%', #{companyName}, '%')
)
</if>
<if test="ids != null and ids.size()"> and a.id not in
<foreach collection="ids" item="item" open="(" separator="," close=")">