独联体-个人中心菜单分区

This commit is contained in:
2025-09-22 16:15:16 +08:00
parent 87dc61ae91
commit db5c90ea63
4 changed files with 16 additions and 5 deletions

View File

@@ -19,12 +19,15 @@ public class PersonalCenterAdminService {
@Autowired
private PersonalCenterMapper personalCenterMapper;
public IPage getList(Integer pageNum, Integer pageSize, Integer centerId){
public IPage getList(Integer pageNum, Integer pageSize, Integer centerId, Integer partitionId){
Page page = new Page<>(pageNum, pageSize);
QueryWrapper<PersonalCenter> wrapper = new QueryWrapper<>();
if(centerId != null){
wrapper.lambda().eq(PersonalCenter :: getCenterId, centerId);
}
if (partitionId != null && partitionId != 0) {
wrapper.lambda().eq(PersonalCenter :: getPartitionId, partitionId);
}
// 我的房间不可更改
wrapper.lambda().ne(PersonalCenter::getCenterId,1).orderByAsc(PersonalCenter :: getCenterSeq);
return personalCenterMapper.selectPage(page,wrapper);

View File

@@ -23,9 +23,9 @@ public class PersonalCenterAdminController extends BaseController {
@ApiOperation("个人中心功能列表")
@GetMapping(value = "/list")
@ResponseBody
public BusiResult getList(Integer pageNum, Integer pageSize, Integer centerId){
public BusiResult getList(Integer pageNum, Integer pageSize, Integer centerId, Integer partitionId){
JSONObject jsonObject = new JSONObject();
IPage pageInfo = personalCenterAdminService.getList(pageNum, pageSize, centerId);
IPage pageInfo = personalCenterAdminService.getList(pageNum, pageSize, centerId, partitionId);
jsonObject.put("total",pageInfo.getTotal());
jsonObject.put("rows", pageInfo.getRecords());
return new BusiResult(jsonObject);