|
@@ -1,4 +1,4 @@
|
|
|
-package org.dromara.demo.controller;
|
|
|
|
|
|
|
+package org.dromara.business.controller;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -17,51 +17,51 @@ import org.dromara.common.core.validate.AddGroup;
|
|
|
import org.dromara.common.core.validate.EditGroup;
|
|
import org.dromara.common.core.validate.EditGroup;
|
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
|
import org.dromara.common.excel.utils.ExcelUtil;
|
|
import org.dromara.common.excel.utils.ExcelUtil;
|
|
|
-import org.dromara.demo.domain.vo.TournamentsVo;
|
|
|
|
|
-import org.dromara.demo.domain.bo.TournamentsBo;
|
|
|
|
|
-import org.dromara.demo.service.ITournamentsService;
|
|
|
|
|
|
|
+import org.dromara.business.domain.vo.TournamentsVo;
|
|
|
|
|
+import org.dromara.business.domain.bo.TournamentsBo;
|
|
|
|
|
+import org.dromara.business.service.ITournamentsService;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 【请填写功能名称】
|
|
|
|
|
|
|
+ * 【赛事管理】
|
|
|
*
|
|
*
|
|
|
* @author Lion Li
|
|
* @author Lion Li
|
|
|
- * @date 2025-06-05
|
|
|
|
|
|
|
+ * @date 2025-06-11
|
|
|
*/
|
|
*/
|
|
|
@Validated
|
|
@Validated
|
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
|
@RestController
|
|
@RestController
|
|
|
-@RequestMapping("/demo/tournaments")
|
|
|
|
|
|
|
+@RequestMapping("/business/tournaments")
|
|
|
public class TournamentsController extends BaseController {
|
|
public class TournamentsController extends BaseController {
|
|
|
|
|
|
|
|
private final ITournamentsService tournamentsService;
|
|
private final ITournamentsService tournamentsService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 查询【请填写功能名称】列表
|
|
|
|
|
|
|
+ * 查询【赛事管理】列表
|
|
|
*/
|
|
*/
|
|
|
- @SaCheckPermission("demo:tournaments:list")
|
|
|
|
|
|
|
+ @SaCheckPermission("business:tournaments:list")
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo<TournamentsVo> list(TournamentsBo bo, PageQuery pageQuery) {
|
|
public TableDataInfo<TournamentsVo> list(TournamentsBo bo, PageQuery pageQuery) {
|
|
|
return tournamentsService.queryPageList(bo, pageQuery);
|
|
return tournamentsService.queryPageList(bo, pageQuery);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 导出【请填写功能名称】列表
|
|
|
|
|
|
|
+ * 导出【赛事管理】列表
|
|
|
*/
|
|
*/
|
|
|
- @SaCheckPermission("demo:tournaments:export")
|
|
|
|
|
|
|
+ @SaCheckPermission("business:tournaments:export")
|
|
|
@Log(title = "【赛事管理-导出】", businessType = BusinessType.EXPORT)
|
|
@Log(title = "【赛事管理-导出】", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
|
public void export(TournamentsBo bo, HttpServletResponse response) {
|
|
public void export(TournamentsBo bo, HttpServletResponse response) {
|
|
|
List<TournamentsVo> list = tournamentsService.queryList(bo);
|
|
List<TournamentsVo> list = tournamentsService.queryList(bo);
|
|
|
- ExcelUtil.exportExcel(list, "【请填写功能名称】", TournamentsVo.class, response);
|
|
|
|
|
|
|
+ ExcelUtil.exportExcel(list, "【赛事管理-导出】", TournamentsVo.class, response);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取【请填写功能名称】详细信息
|
|
|
|
|
|
|
+ * 获取【赛事管理】详细信息
|
|
|
*
|
|
*
|
|
|
* @param id 主键
|
|
* @param id 主键
|
|
|
*/
|
|
*/
|
|
|
- @SaCheckPermission("demo:tournaments:query")
|
|
|
|
|
|
|
+ @SaCheckPermission("business:tournaments:query")
|
|
|
@GetMapping("/{id}")
|
|
@GetMapping("/{id}")
|
|
|
public R<TournamentsVo> getInfo(@NotNull(message = "主键不能为空")
|
|
public R<TournamentsVo> getInfo(@NotNull(message = "主键不能为空")
|
|
|
@PathVariable Long id) {
|
|
@PathVariable Long id) {
|
|
@@ -69,9 +69,9 @@ public class TournamentsController extends BaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 新增【请填写功能名称】
|
|
|
|
|
|
|
+ * 新增【赛事管理】
|
|
|
*/
|
|
*/
|
|
|
- @SaCheckPermission("demo:tournaments:add")
|
|
|
|
|
|
|
+ @SaCheckPermission("business:tournaments:add")
|
|
|
@Log(title = "【赛事管理-新增】", businessType = BusinessType.INSERT)
|
|
@Log(title = "【赛事管理-新增】", businessType = BusinessType.INSERT)
|
|
|
@RepeatSubmit()
|
|
@RepeatSubmit()
|
|
|
@PostMapping()
|
|
@PostMapping()
|
|
@@ -80,10 +80,10 @@ public class TournamentsController extends BaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 修改【请填写功能名称】
|
|
|
|
|
|
|
+ * 修改【赛事管理】
|
|
|
*/
|
|
*/
|
|
|
- @SaCheckPermission("demo:tournaments:edit")
|
|
|
|
|
- @Log(title = "【赛事管理-编辑】", businessType = BusinessType.UPDATE)
|
|
|
|
|
|
|
+ @SaCheckPermission("business:tournaments:edit")
|
|
|
|
|
+ @Log(title = "【赛事管理-修改】", businessType = BusinessType.UPDATE)
|
|
|
@RepeatSubmit()
|
|
@RepeatSubmit()
|
|
|
@PutMapping()
|
|
@PutMapping()
|
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TournamentsBo bo) {
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TournamentsBo bo) {
|
|
@@ -91,12 +91,12 @@ public class TournamentsController extends BaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 删除【请填写功能名称】
|
|
|
|
|
|
|
+ * 删除【赛事管理】
|
|
|
*
|
|
*
|
|
|
* @param ids 主键串
|
|
* @param ids 主键串
|
|
|
*/
|
|
*/
|
|
|
- @SaCheckPermission("demo:tournaments:remove")
|
|
|
|
|
- @Log(title = "【赛事管理-移除】", businessType = BusinessType.DELETE)
|
|
|
|
|
|
|
+ @SaCheckPermission("business:tournaments:remove")
|
|
|
|
|
+ @Log(title = "【赛事管理-删除】", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{ids}")
|
|
@DeleteMapping("/{ids}")
|
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
|
@PathVariable Long[] ids) {
|
|
@PathVariable Long[] ids) {
|