独联体-个人中心菜单分区
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user