This commit is contained in:
张良(004796)
2024-05-07 14:48:25 +08:00
parent 09e0fa3a4c
commit cbe9327457
5 changed files with 9 additions and 6 deletions

View File

@@ -47,8 +47,8 @@ public class HomeAppController {
@GetMapping("/vip/page")
@Operation(summary = "首页查询VIP推荐用户-分页")
@Log(title = "首页查询VIP推荐用户-分页", businessType = BusinessType.OTHER,isPrintResponseData = false, isSaveDb = false)
public R<List<HomeUserListVo>> vipPage(){
List<HomeUserListVo> vo = userService.vipHomePage();
public R<List<HomeUserListVo>> vipPage(String residenceCityCode){
List<HomeUserListVo> vo = userService.vipHomePage(residenceCityCode);
return R.ok(vo);
}

View File

@@ -23,7 +23,7 @@ public interface UserMapper extends BaseMapper<User> {
Page<HomeUserListVo> homePageApp(@Param("build") Page<Object> build, @Param("params") HomePageReq params);
List<HomeUserListVo> vipHomePage(@Param("limit") int limit);
List<HomeUserListVo> vipHomePage(@Param("residenceCityCode") String residenceCityCode, @Param("limit") int limit);
MinUser getMinUserById(@Param("userId") Long userId);
}

View File

@@ -47,7 +47,7 @@ public interface UserService extends IService<User> {
Page<HomeUserListVo> homePage(HomePageReq params);
List<HomeUserListVo> vipHomePage();
List<HomeUserListVo> vipHomePage(String residenceCityCode);
boolean lock(Long id);

View File

@@ -272,8 +272,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements Use
}
@Override
public List<HomeUserListVo> vipHomePage() {
List<HomeUserListVo> result = baseMapper.vipHomePage(20);
public List<HomeUserListVo> vipHomePage(String residenceCityCode) {
List<HomeUserListVo> result = baseMapper.vipHomePage(residenceCityCode,20);
String cosDomain = systemConfigManager.getSystemConfig(SystemConfigEnum.COS_DOMAIN);
boolean vip = false; // 是否为VIP
boolean card = false; // 是否实名认证

View File

@@ -98,6 +98,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
join xq_user_status t3 on t1.id = t3.user_id
join xq_user_login t4 on t1.id = t4.user_id
where t1.type = 0 and t1.status = 0 and t1.finish_base_status = 1 and t3.personals_status = 1 and t1.open_vip = 1 and t3.push_vip = 1
<if test="residenceCityCode != null and residenceCityCode != ''">
and t1.residence_city_code = #{residenceCityCode}
</if>
order by t4.last_login_time desc
</select>
<select id="getMinUserById" resultType="com.ruoyi.xq.dto.common.user.MinUser">