Merge remote-tracking branch 'origin/main'
commit
d291747dde
|
|
@ -67,6 +67,8 @@ public interface AppUserMapper
|
||||||
AppUser selectAppUserByPhone(@Param("phoneNumber") String phoneNumber);
|
AppUser selectAppUserByPhone(@Param("phoneNumber") String phoneNumber);
|
||||||
List<AppUserDataVo> selectList(AppUser appUser);
|
List<AppUserDataVo> selectList(AppUser appUser);
|
||||||
|
|
||||||
|
List<AppUserDataVo> selectListByName(AppUser appUser);
|
||||||
|
|
||||||
List<Long> listByOrderTime();
|
List<Long> listByOrderTime();
|
||||||
void updateAppUserById();
|
void updateAppUserById();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,9 @@ public class AppRegisterServiceImpl implements IAppRegisterService {
|
||||||
appUser.setProvinceId(appRegister.getProvinceId() != null ? appRegister.getProvinceId() : null);
|
appUser.setProvinceId(appRegister.getProvinceId() != null ? appRegister.getProvinceId() : null);
|
||||||
appUser.setCityId(appRegister.getCityId() != null ? appRegister.getCityId() : null);
|
appUser.setCityId(appRegister.getCityId() != null ? appRegister.getCityId() : null);
|
||||||
appUser.setTownId(appRegister.getTownId() != null ? appRegister.getTownId() : null);
|
appUser.setTownId(appRegister.getTownId() != null ? appRegister.getTownId() : null);
|
||||||
|
appUser.setJx("[]");
|
||||||
|
appUser.setHy("[]");
|
||||||
|
appUser.setJy("[]");
|
||||||
appUserMapper.insertAppUser(appUser);
|
appUserMapper.insertAppUser(appUser);
|
||||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(appRegister.getInvitationCode())) {
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(appRegister.getInvitationCode())) {
|
||||||
AppCode appCode = appCodeMapper.selectAppCodeByCode(appRegister.getInvitationCode());
|
AppCode appCode = appCodeMapper.selectAppCodeByCode(appRegister.getInvitationCode());
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,15 @@ public class AppUserServiceImpl implements IAppUserService {
|
||||||
entity.setSchool(appUser.getSchool());
|
entity.setSchool(appUser.getSchool());
|
||||||
entity.setSearch(appUser.getSearch());
|
entity.setSearch(appUser.getSearch());
|
||||||
// 学校
|
// 学校
|
||||||
List<AppUserDataVo> schoolList = appUserMapper.selectList(entity);
|
List<AppUserDataVo> schoolList = new ArrayList<>();
|
||||||
|
if (StringUtils.isBlank(appUser.getSearch())) {
|
||||||
|
schoolList = appUserMapper.selectList(entity);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(appUser.getSearch())) {
|
||||||
|
AppUser user = new AppUser();
|
||||||
|
user.setSearch(appUser.getSearch());
|
||||||
|
schoolList = appUserMapper.selectListByName(user);
|
||||||
|
}
|
||||||
Collections.shuffle(schoolList);
|
Collections.shuffle(schoolList);
|
||||||
if (schoolList.size() > limit) {
|
if (schoolList.size() > limit) {
|
||||||
schoolList = schoolList.subList(0, limit);
|
schoolList = schoolList.subList(0, limit);
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
group by a.id
|
group by a.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectListByName" parameterType="AppUser" resultType="com.ruoyi.app.domain.vo.AppUserDataVo">
|
||||||
|
select
|
||||||
|
<include refid="appUserColumns"/>,
|
||||||
|
s.name as "schoolName",
|
||||||
|
count(f.user_id) as "fansNum",
|
||||||
|
a.id as "userId"
|
||||||
|
from app_user a
|
||||||
|
left join app_school s on s.id = a.school
|
||||||
|
left join app_user_fans f on f.user_id = a.id
|
||||||
|
<where>
|
||||||
|
a.username like concat('%', #{search}, '%')
|
||||||
|
or a.nickname like concat('%', #{search}, '%')
|
||||||
|
</where>
|
||||||
|
group by a.id
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="listByOrderTime" resultType="java.lang.Long">
|
<select id="listByOrderTime" resultType="java.lang.Long">
|
||||||
select
|
select
|
||||||
a.id
|
a.id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue