后台-用户等级-按等级查询

This commit is contained in:
khalil
2025-06-09 18:36:16 +08:00
parent 1aad3c5a5d
commit 5f1c0f9f96
4 changed files with 12 additions and 8 deletions

View File

@@ -9,7 +9,8 @@ import org.apache.ibatis.annotations.Param;
public interface UserRechargeLevelAdminMapper {
Page<UserRechargeLevelAdminVo> page(Page<UserRechargeLevelAdminVo> page,
@Param("uid") Long uid,
@Param("partitionId") Integer partitionId,
@Param("uid") Long uid);
@Param("level") String level);
}

View File

@@ -6,7 +6,6 @@ import com.accompany.business.service.user.UsersService;
import com.accompany.common.model.PageReq;
import com.accompany.core.model.Users;
import com.accompany.payment.model.UserRechargeLevelConfig;
import com.accompany.payment.service.RechargeUserService;
import com.accompany.payment.service.UserRechargeLevelConfigService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
@@ -23,7 +22,7 @@ public class UserRechargeLevelAdminService {
@Autowired
private UserRechargeLevelConfigService levelConfigService;
public Page<UserRechargeLevelAdminVo> page(Integer partitionId, Long erbanNo, PageReq req) {
public Page<UserRechargeLevelAdminVo> page(Long erbanNo, Integer partitionId, String level, PageReq req) {
Page<UserRechargeLevelAdminVo> page = new Page<>(req.getPage(), req.getPageSize());
Long uid = null;
@@ -35,7 +34,7 @@ public class UserRechargeLevelAdminService {
uid = u.getUid();
}
adminMapper.page(page, partitionId, uid);
adminMapper.page(page, uid, partitionId, level);
return page;
}

View File

@@ -18,11 +18,14 @@
<if test="uid != null">
and url.uid = #{uid}
</if>
<if test="level != null and level != ''">
and url.level = #{level}
</if>
<if test="partitionId != null">
and u.partition_id = #{partitionId}
</if>
</where>
order by url.total_gold desc, url.last_60_total_gold desc
order by url.total_gold desc
</select>
</mapper>

View File

@@ -32,14 +32,15 @@ public class UserRechargeLevelAdminController {
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = "partitionId", value = "分区ID"),
@ApiImplicitParam(name = "erbanNo", value = "用户ID"),
@ApiImplicitParam(name = "partitionId", value = "分区ID"),
@ApiImplicitParam(name = "level", value = "等级"),
@ApiImplicitParam(name = "page", value = "页码", required = true),
@ApiImplicitParam(name = "pageSize", value = "页长", required = true),
})
@GetMapping("/page")
public BusiResult<PageResult<UserRechargeLevelAdminVo>> page(Integer partitionId, Long erbanNo, PageReq req) {
return BusiResult.success(new PageResult<>(service.page(partitionId, erbanNo, req)));
public BusiResult<PageResult<UserRechargeLevelAdminVo>> page(Long erbanNo, Integer partitionId, String level, PageReq req) {
return BusiResult.success(new PageResult<>(service.page(erbanNo, partitionId, level, req)));
}
}