房间角标添加游戏类型

This commit is contained in:
2025-08-15 16:36:57 +08:00
parent f6e42005fc
commit 440a2cc46b
3 changed files with 7 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ public interface AdminResourceService {
* @param pageSize
* @return
*/
IPage<Resource> page(Integer type, Integer partitionId, Integer pageNo, Integer pageSize);
IPage<Resource> page(Integer type, Integer panelType, String code, Integer partitionId, Integer pageNo, Integer pageSize);
/**
* 保存

View File

@@ -4,6 +4,7 @@ import com.accompany.admin.service.resource.AdminResourceService;
import com.accompany.business.model.resource.Resource;
import com.accompany.business.service.resource.ResourceService;
import com.accompany.common.constant.Constant;
import com.accompany.common.utils.StringUtils;
import com.accompany.core.util.I18NMessageSourceUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -28,10 +29,12 @@ public class AdminResourceServiceImpl implements AdminResourceService {
private ResourceService resourceService;
@Override
public IPage<Resource> page(Integer type, Integer partitionId, Integer pageNo, Integer pageSize) {
public IPage<Resource> page(Integer type, Integer panelType, String code, Integer partitionId, Integer pageNo, Integer pageSize) {
return resourceService.page(new Page<>(pageNo, pageSize), Wrappers.<Resource>lambdaQuery()
.eq(Resource::getType, type)
.eq(partitionId != null, Resource::getPartitionId, partitionId)
.eq(panelType!= null, Resource::getPanelType, panelType)
.eq(StringUtils.isNotEmpty(code), Resource::getCode, code)
.orderByAsc(Resource::getSkipType)
.orderByAsc(Resource::getCreateTime));
}

View File

@@ -33,10 +33,10 @@ public class AdminResourceController {
@ApiImplicitParam(name = "type", value = "资源类型", required = true)
@ApiOperation("分页列表")
@GetMapping("page")
public BusiResult<IPage<Resource>> page(@RequestParam("type") Integer type,
public BusiResult<IPage<Resource>> page(@RequestParam("type") Integer type, Integer panelType, String code,
@RequestParam(value = "partitionId", required = false) Integer partitionId,
PageReq req) {
return BusiResult.success(adminResourceService.page(type, partitionId, req.getPage(), req.getPageSize()));
return BusiResult.success(adminResourceService.page(type, panelType, code, partitionId, req.getPage(), req.getPageSize()));
}
/**