瀏覽代碼

feat(system): 重构赛事模块- 新增 AppGameCuDTO、AppGameRuleDTO、AppGameSchedule 等数据传输对象
- 更新 AppGame 和 AppGamePriceRules 实体类结构
- 重构 AppCoursesController 和 AppGameController 的分页查询接口
- 新增 AppGameScheduleController 控制器- 优化数据模型,移除冗余字段,统一字段命名

lix 2 周之前
父節點
當前提交
55e355d766
共有 32 個文件被更改,包括 785 次插入260 次删除
  1. 7 26
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppCoursesController.java
  2. 4 16
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppGameController.java
  3. 0 17
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppGamePriceRulesController.java
  4. 165 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppGameScheduleController.java
  5. 1 9
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppSiteController.java
  6. 17 16
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppCoursesCuDTO.java
  7. 74 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameCuDTO.java
  8. 6 6
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameDTO.java
  9. 24 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGamePageDTO.java
  10. 33 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameRuleDTO.java
  11. 45 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameScheduleDTO.java
  12. 5 8
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppSiteCuDTO.java
  13. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppSiteRuleDTO.java
  14. 44 56
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppGame.java
  15. 11 31
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppGamePriceRules.java
  16. 96 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppGameSchedule.java
  17. 7 11
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSite.java
  18. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSitePriceRules.java
  19. 32 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/enums/SitePriceTypeEnum.java
  20. 2 3
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/enums/SiteTypeEnum.java
  21. 1 4
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppGamePriceRulesMapper.java
  22. 17 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppGameScheduleMapper.java
  23. 5 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppGameScheduleMapper.xml
  24. 1 3
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppCoureseService.java
  25. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppGamePriceRulesService.java
  26. 14 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppGameScheduleService.java
  27. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppGameService.java
  28. 1 3
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppSiteService.java
  29. 18 13
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppCoureseServiceImpl.java
  30. 19 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppGameScheduleServiceImpl.java
  31. 120 36
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppGameServiceImpl.java
  32. 3 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSiteServiceImpl.java

+ 7 - 26
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppCoursesController.java

@@ -1,20 +1,15 @@
 package org.jeecg.modules.system.app.controller;
 
-import java.util.Arrays;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.system.app.dto.AppCoursesDTO;
+import org.jeecg.modules.system.app.dto.AppCoursesPageDTO;
 import org.jeecg.modules.system.app.entity.AppCourses;
 import org.jeecg.modules.system.app.service.IAppCoureseService;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
 import org.jeecg.common.system.base.controller.JeecgController;
@@ -42,28 +37,14 @@ public class AppCoursesController extends JeecgController<AppCourses, IAppCoures
 	/**
 	 * 分页列表查询
 	 *
-	 * @param appCourese
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
+	 * @param dto
 	 * @return
 	 */
 	//@AutoLog(value = "课程/培训表-分页列表查询")
 	@Operation(summary="课程/培训表-分页列表查询")
 	@GetMapping(value = "/list")
-	public Result<IPage<AppCourses>> queryPageList(AppCourses appCourese,
-												   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-												   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-												   HttpServletRequest req) {
-
-
-        QueryWrapper<AppCourses> queryWrapper = QueryGenerator.initQueryWrapper(appCourese, req.getParameterMap());
-		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-
-		queryWrapper.eq("org_code",loginUser.getOrgCode());
-		Page<AppCourses> page = new Page<AppCourses>(pageNo, pageSize);
-		IPage<AppCourses> pageList = appCoursesService.page(page, queryWrapper);
-		return Result.OK(pageList);
+	public Result<IPage<AppCoursesDTO>> queryPageList(AppCoursesPageDTO dto) {
+		return Result.OK(appCoursesService.queryWitchPriceRulesPage(dto));
 	}
 	
 	/**
@@ -74,7 +55,7 @@ public class AppCoursesController extends JeecgController<AppCourses, IAppCoures
 	 */
 	@AutoLog(value = "课程/培训表-添加")
 	@Operation(summary="课程/培训表-添加")
-	@RequiresPermissions("org.jeecg.modules.app:nm_courese:add")
+//	@RequiresPermissions("org.jeecg.modules.app:nm_courese:add")
 	@PostMapping(value = "/add")
 	public Result<String> add(@RequestBody AppCoursesDTO appCoursesDTO) {
 		return appCoursesService.saveWitchPriceRules(appCoursesDTO)?Result.OK("添加成功!"):Result.error("添加失败!");
@@ -88,7 +69,7 @@ public class AppCoursesController extends JeecgController<AppCourses, IAppCoures
 	 */
 	@AutoLog(value = "课程/培训表-编辑")
 	@Operation(summary="课程/培训表-编辑")
-	@RequiresPermissions("org.jeecg.modules.app:nm_courese:edit")
+//	@RequiresPermissions("org.jeecg.modules.app:nm_courese:edit")
 	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
 	public Result<String> edit(@RequestBody AppCoursesDTO appCoursesDTO) {
 		return appCoursesService.editWitchPriceRules(appCoursesDTO)?Result.OK("操作成功!"):Result.error("操作失败!");
@@ -102,7 +83,7 @@ public class AppCoursesController extends JeecgController<AppCourses, IAppCoures
 	 */
 	@AutoLog(value = "课程/培训表-通过id删除")
 	@Operation(summary="课程/培训表-通过id删除")
-	@RequiresPermissions("org.jeecg.modules.app:nm_courese:delete")
+//	@RequiresPermissions("org.jeecg.modules.app:nm_courese:delete")
 	@DeleteMapping(value = "/delete")
 	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
 		return appCoursesService.deleteWitchPriceRulesById(id)?Result.OK("操作成功!"):Result.error("操作失败!");

+ 4 - 16
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppGameController.java

@@ -18,6 +18,7 @@ import org.jeecg.common.system.query.QueryRuleEnum;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.system.app.dto.AppGameDTO;
+import org.jeecg.modules.system.app.dto.AppGamePageDTO;
 import org.jeecg.modules.system.app.entity.AppGame;
 import org.jeecg.modules.system.app.service.IAppGameService;
 
@@ -59,27 +60,14 @@ public class AppGameController extends JeecgController<AppGame, IAppGameService>
 	/**
 	 * 分页列表查询
 	 *
-	 * @param appGame
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
+	 * @param dto
 	 * @return
 	 */
 	//@AutoLog(value = "赛事表-分页列表查询")
 	@Operation(summary="赛事表-分页列表查询")
 	@GetMapping(value = "/list")
-	public Result<IPage<AppGame>> queryPageList(AppGame appGame,
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-								   HttpServletRequest req) {
-
-
-        QueryWrapper<AppGame> queryWrapper = QueryGenerator.initQueryWrapper(appGame, req.getParameterMap());
-		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-		queryWrapper.eq("org_code",loginUser.getOrgCode());
-		Page<AppGame> page = new Page<AppGame>(pageNo, pageSize);
-		IPage<AppGame> pageList = appGameService.page(page, queryWrapper);
-		return Result.OK(pageList);
+	public Result<IPage<AppGameDTO>> queryPageList(AppGamePageDTO dto) {
+		return Result.OK(appGameService.queryWitchPriceRulesPage(dto));
 	}
 	
 	/**

+ 0 - 17
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppGamePriceRulesController.java

@@ -1,19 +1,10 @@
 package org.jeecg.modules.system.app.controller;
 
 import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.system.query.QueryRuleEnum;
-import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.system.app.entity.AppGamePriceRules;
 import org.jeecg.modules.system.app.service.IAppGamePriceRulesService;
 
@@ -22,18 +13,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.Operation;
 import org.jeecg.common.aspect.annotation.AutoLog;

+ 165 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppGameScheduleController.java

@@ -0,0 +1,165 @@
+package org.jeecg.modules.system.app.controller;
+
+import java.util.Arrays;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.system.app.entity.AppGameSchedule;
+import org.jeecg.modules.system.app.service.IAppGameScheduleService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+ /**
+ * @Description: 赛程安排表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-08
+ * @Version: V1.0
+ */
+@Tag(name="赛程安排表")
+@RestController
+@RequestMapping("/org/jeecg/modules/system/app/appGameSchedule")
+@Slf4j
+public class AppGameScheduleController extends JeecgController<AppGameSchedule, IAppGameScheduleService> {
+	@Autowired
+	private IAppGameScheduleService appGameScheduleService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param appGameSchedule
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "赛程安排表-分页列表查询")
+	@Operation(summary="赛程安排表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<AppGameSchedule>> queryPageList(AppGameSchedule appGameSchedule,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+
+
+        QueryWrapper<AppGameSchedule> queryWrapper = QueryGenerator.initQueryWrapper(appGameSchedule, req.getParameterMap());
+		Page<AppGameSchedule> page = new Page<AppGameSchedule>(pageNo, pageSize);
+		IPage<AppGameSchedule> pageList = appGameScheduleService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param appGameSchedule
+	 * @return
+	 */
+	@AutoLog(value = "赛程安排表-添加")
+	@Operation(summary="赛程安排表-添加")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_game_schedule:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody AppGameSchedule appGameSchedule) {
+		appGameScheduleService.save(appGameSchedule);
+
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param appGameSchedule
+	 * @return
+	 */
+	@AutoLog(value = "赛程安排表-编辑")
+	@Operation(summary="赛程安排表-编辑")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_game_schedule:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody AppGameSchedule appGameSchedule) {
+		appGameScheduleService.updateById(appGameSchedule);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "赛程安排表-通过id删除")
+	@Operation(summary="赛程安排表-通过id删除")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_game_schedule:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		appGameScheduleService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "赛程安排表-批量删除")
+	@Operation(summary="赛程安排表-批量删除")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_game_schedule:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.appGameScheduleService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "赛程安排表-通过id查询")
+	@Operation(summary="赛程安排表-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<AppGameSchedule> queryById(@RequestParam(name="id",required=true) String id) {
+		AppGameSchedule appGameSchedule = appGameScheduleService.getById(id);
+		if(appGameSchedule==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(appGameSchedule);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param appGameSchedule
+    */
+    @RequiresPermissions("org.jeecg.modules.system.app:nm_game_schedule:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, AppGameSchedule appGameSchedule) {
+        return super.exportXls(request, appGameSchedule, AppGameSchedule.class, "赛程安排表");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("org.jeecg.modules.system.app:nm_game_schedule:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, AppGameSchedule.class);
+    }
+
+}

+ 1 - 9
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppSiteController.java

@@ -1,24 +1,16 @@
 package org.jeecg.modules.system.app.controller;
 
-import java.util.Arrays;
-import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.system.app.dto.AppSiteDTO;
 import org.jeecg.modules.system.app.dto.AppSitePageDTO;
 import org.jeecg.modules.system.app.entity.AppSite;
-import org.jeecg.modules.system.app.entity.AppSitePriceRules;
 import org.jeecg.modules.system.app.service.IAppSitePriceRulesService;
 import org.jeecg.modules.system.app.service.IAppSiteService;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
 import org.jeecg.common.system.base.controller.JeecgController;
@@ -58,7 +50,7 @@ public class AppSiteController extends JeecgController<AppSite, IAppSiteService>
 	@Operation(summary="场地表-分页列表查询")
 	@GetMapping(value = "/list")
 	public Result<IPage<AppSiteDTO>> queryPageList(AppSitePageDTO dto) {
-		return Result.OK(appSiteService.querySiteList(dto));
+		return Result.OK(appSiteService.queryWitchPriceRulesPage(dto));
 	}
 
 	/**

+ 17 - 16
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppCoursesCuDTO.java

@@ -24,15 +24,14 @@ import java.math.BigDecimal;
 public class AppCoursesCuDTO {
     @Schema(description = "id")
     private String id;
-    /**部门id*/
+    /**部门*/
     @Excel(name = "部门id", width = 15)
     @Schema(description = "部门id")
     private String orgCode;
     @Excel(name = "教练ID", width = 15)
     @Schema(description = "教练ID")
     private String userId;
-    /**商户/场地id;场馆/学校等场地*/
-    @Excel(name = "商户/场地id;场馆/学校等场地", width = 15)
+    /**部门id*/
     @Schema(description = "商户/场地id;场馆/学校等场地")
     private String tenantId;
     /**产品名称*/
@@ -40,55 +39,57 @@ public class AppCoursesCuDTO {
     @Schema(description = "产品名称")
     private String name;
     /**类目;0足球 1篮球 2羽毛球 3跑步...仅包场*/
-    @Excel(name = "类目;0足球 1篮球 2羽毛球 3跑步...仅包场", width = 15)
     @Schema(description = "类目;0足球 1篮球 2羽毛球 3跑步...仅包场")
     private String categoryId;
     /**费用类型;0 精品 1免费 仅课程*/
-    @Excel(name = "费用类型;0 精品 1免费 仅课程", width = 15)
     @Schema(description = "费用类型;0 精品 1免费 仅课程")
     private Integer priceType;
     /**原价*/
-    @Excel(name = "原价", width = 15)
     @Schema(description = "原价")
     private BigDecimal originalPrice;
     /**售价*/
-    @Excel(name = "售价", width = 15)
     @Schema(description = "售价")
     private BigDecimal sellingPrice;
     /**上课场地*/
-    @Excel(name = "上课场地", width = 15)
     @Schema(description = "上课场地")
     private String siteId;
     /**保险id;可能有多个险种*/
-    @Excel(name = "保险id;可能有多个险种", width = 15)
     @Schema(description = "保险id;可能有多个险种")
     private String insureIds;
     /**封面*/
-    @Excel(name = "封面", width = 15)
     @Schema(description = "封面")
     private String cover;
     /**背景图;可能数组*/
-    @Excel(name = "背景图;可能数组", width = 15)
     @Schema(description = "背景图;可能数组")
     private String backgroundImage;
     /**提示/须知*/
-    @Excel(name = "提示/须知", width = 15)
     @Schema(description = "提示/须知")
     private String reminder;
     /**上架状态;0上架 1下架*/
-    @Excel(name = "上架状态;0上架 1下架", width = 15)
     @Schema(description = "上架状态;0上架 1下架")
     private Integer rackingStatus;
     /**视频*/
-    @Excel(name = "视频", width = 15)
     @Schema(description = "视频")
     private String video;
     /**好评*/
-    @Excel(name = "好评", width = 15)
     @Schema(description = "好评")
     private BigDecimal goodRate;
     /**排序*/
-    @Excel(name = "排序", width = 15)
     @Schema(description = "排序")
     private Integer sort;
+    /**限购次数*/
+    @Schema(description = "限购次数")
+    private Integer limitNum;
+    /**服务详情*/
+    @Schema(description = "服务详情")
+    private Integer details;
+    /**适用人群*/
+    @Schema(description = "适用人群")
+    private Integer fitPeople;
+    /**开始时间*/
+    @Schema(description = "开始时间")
+    private Integer startTime;
+    /**结束时间*/
+    @Schema(description = "结束时间")
+    private Integer endTime;
 }

+ 74 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameCuDTO.java

@@ -0,0 +1,74 @@
+package org.jeecg.modules.system.app.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author DM
+ * @date 2025/7/8 16:15
+ * @description
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description = "赛事入参自定义DTO")
+public class AppGameCuDTO {
+    @Schema(description = "id")
+    private String id;
+    /**产品名称*/
+    @Schema(description = "产品名称")
+    private String name;
+    /**封面*/
+    @Schema(description = "封面")
+    private String cover;
+    /**背景图;可能数组*/
+    @Schema(description = "背景图;可能数组")
+    private String backgroundImage;
+    /**举办方*/
+    @Schema(description = "举办方")
+    private String organizers;
+    /**举办地址*/
+    @Schema(description = "举办地址")
+    private String address;
+    /**报名截止时间*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "报名截止时间")
+    private Date applicationEndTime;
+    /**保险id;可能有多个险种*/
+    @Schema(description = "保险id;可能有多个险种")
+    private String insureIds;
+    /**开始时间*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "开始时间")
+    private Date startTime;
+    /**结束时间*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "结束时间")
+    private Date endTime;
+    /**提示/须知/说明*/
+    @Schema(description = "提示/须知/说明")
+    private String reminder;
+    /**资质,逗号分割*/
+    @Schema(description = "资质,逗号分割")
+    private String aptitudes;
+    /**赛事成绩*/
+    @Schema(description = "赛事成绩")
+    private String gameResults;
+    /**排序*/
+    @Schema(description = "排序")
+    private Integer sort;
+}

+ 6 - 6
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameDTO.java

@@ -7,8 +7,6 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
-import org.jeecg.modules.system.app.entity.AppGame;
-import org.jeecg.modules.system.app.entity.AppGamePriceRules;
 
 import java.util.List;
 
@@ -22,9 +20,11 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = false)
 @AllArgsConstructor
 @NoArgsConstructor
-@Schema(description = "赛事入参DTO")
+@Schema(description = "赛事-赛程-赛价入参DTO")
 public class AppGameDTO {
-    private AppGame game;
-    @ArraySchema(schema = @Schema(implementation = AppGamePriceRules.class), minItems = 1)
-    private List<AppGamePriceRules> gamePriceRules;
+    private AppGameCuDTO game;
+    @ArraySchema(schema = @Schema(implementation = AppGameRuleDTO.class), minItems = 1)
+    private List<AppGameRuleDTO> gamePriceRules;
+    @ArraySchema(schema = @Schema(implementation = AppGameScheduleDTO.class), minItems = 1)
+    private List<AppGameScheduleDTO> scheduleDTOS;
 }

+ 24 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGamePageDTO.java

@@ -0,0 +1,24 @@
+package org.jeecg.modules.system.app.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+/**
+ * @author DM
+ * @date 2025/7/8 17:05
+ * @description
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description = "赛事-赛程-赛价分页入参DTO")
+public class AppGamePageDTO extends BasePageDTO{
+    @Schema(description = "名称", example = "xxx运动会")
+    private String name;
+}

+ 33 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameRuleDTO.java

@@ -0,0 +1,33 @@
+package org.jeecg.modules.system.app.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+/**
+ * @author DM
+ * @date 2025/7/8 16:18
+ * @description
+ */
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description = "赛价入参DTO")
+public class AppGameRuleDTO {
+    private String id;
+    /**赛事id*/
+    @Schema(description = "赛事id")
+    private String gameId;
+    /**比赛项目*/
+    @Schema(description = "比赛项目")
+    private String categoryId;
+    /**售价*/
+    @Schema(description = "售价")
+    private String sellingPrice;
+}

+ 45 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppGameScheduleDTO.java

@@ -0,0 +1,45 @@
+package org.jeecg.modules.system.app.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author DM
+ * @date 2025/7/8 16:19
+ * @description
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description = "赛程安排入参DTO")
+public class AppGameScheduleDTO {
+    @Schema(description = "id")
+    private String id;
+    /**比赛名称*/
+    @Schema(description = "比赛名称")
+    private String name;
+    /**开始时间*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "开始时间")
+    private Date startTime;
+    /**结束时间*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "结束时间")
+    private Date endTime;
+    /**安排*/
+    @Schema(description = "安排")
+    private String arrange;
+}

+ 5 - 8
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppSiteCuDTO.java

@@ -34,8 +34,9 @@ public class AppSiteCuDTO {
     /**地址;仅赛事*/
     @Schema(description = "地址")
     private String address;
-    /**类型;0学校 1包场 2不固定场*/
-    @Schema(description = "类型;0学校 1包场 2不固定场")
+    /**类型;0学校 1体育馆*/
+    @Excel(name = "类型;0学校 1体育馆 ", width = 15)
+    @Schema(description = "类型;0学校 1体育馆 ")
     private Integer type;
     /**运动类目id;多个用逗号分割*/
     @Schema(description = "运动类目id;多个用逗号分割")
@@ -46,12 +47,11 @@ public class AppSiteCuDTO {
     /**封面*/
     @Schema(description = "封面")
     private String cover;
-    /**背景图;可能数组*/
-    @Schema(description = "背景图;可能数组")
-    private String backgroundImage;
     /**退款类型;0可退/到期自动退 1限时退 2不可退*/
     @Schema(description = "退款类型;0可退/到期自动退 1限时退 2不可退")
     private Integer refundType;
+    @Schema(description = "体育馆包场提前退款时间;单位:分钟")
+    private Integer earlyRefundTime;
     /**有效期;单位:天 仅无固定场*/
     @Schema(description = "有效期;单位:天 仅无固定场")
     private Integer indate;
@@ -79,9 +79,6 @@ public class AppSiteCuDTO {
     /**提示/须知*/
     @Schema(description = "提示/须知")
     private String reminder;
-    /**视频*/
-    @Schema(description = "视频")
-    private String video;
     /**排序*/
     @Schema(description = "排序")
     private Integer sort;

+ 4 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppSiteRuleDTO.java

@@ -63,6 +63,10 @@ public class AppSiteRuleDTO {
     @Excel(name = "库存", width = 15)
     @Schema(description = "库存")
     private Integer inventory;
+    /**0学校 1体育馆包场 2体育馆不固定场*/
+    @Excel(name = "0学校 1体育馆包场 2体育馆不固定场", width = 15)
+    @Schema(description = "0学校 1体育馆包场 2体育馆不固定场")
+    private Integer type;
     /**是否教学日0是1不是*/
     @Excel(name = "是否教学日0是1不是", width = 15)
     @Schema(description = "是否教学日0是1不是")

+ 44 - 56
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppGame.java

@@ -1,24 +1,28 @@
 package org.jeecg.modules.system.app.entity;
 
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import org.jeecg.common.constant.ProvinceCityArea;
+import org.jeecg.common.util.SpringContextUtils;
+import lombok.Data;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
 import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import org.jeecgframework.poi.excel.annotation.Excel;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
 
 /**
  * @Description: 赛事表
  * @Author: jeecg-boot
- * @Date:   2025-07-03
+ * @Date:   2025-07-08
  * @Version: V1.0
  */
 @Data
@@ -33,18 +37,26 @@ public class AppGame implements Serializable {
 	@TableId(type = IdType.ASSIGN_ID)
     @Schema(description = "id")
     private String id;
-	/**部门id*/
-	@Excel(name = "部门id", width = 15)
-    @Schema(description = "部门id")
+	/**部门编码*/
+	@Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
     private String orgCode;
-	/**商户/场地id;场馆/主办单位/学校等场地*/
-	@Excel(name = "商户/场地id;场馆/主办单位/学校等场地", width = 15)
-    @Schema(description = "商户/场地id;场馆/主办单位/学校等场地")
+	/**关联部门id*/
+	@Excel(name = "关联部门id", width = 15)
+    @Schema(description = "关联部门id")
     private String tenantId;
 	/**产品名称*/
 	@Excel(name = "产品名称", width = 15)
     @Schema(description = "产品名称")
     private String name;
+	/**封面*/
+	@Excel(name = "封面", width = 15)
+    @Schema(description = "封面")
+    private String cover;
+	/**背景图;可能数组*/
+	@Excel(name = "背景图;可能数组", width = 15)
+    @Schema(description = "背景图;可能数组")
+    private String backgroundImage;
 	/**举办方*/
 	@Excel(name = "举办方", width = 15)
     @Schema(description = "举办方")
@@ -53,46 +65,16 @@ public class AppGame implements Serializable {
 	@Excel(name = "举办地址", width = 15)
     @Schema(description = "举办地址")
     private String address;
-	/**类型;0单人 1团队*/
-	@Excel(name = "类型;0单人 1团队", width = 15)
-    @Schema(description = "类型;0单人 1团队")
-    private Integer type;
+	/**报名截止时间*/
+	@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "报名截止时间")
+    private Date applicationEndTime;
 	/**保险id;可能有多个险种*/
 	@Excel(name = "保险id;可能有多个险种", width = 15)
     @Schema(description = "保险id;可能有多个险种")
     private String insureIds;
-	/**封面*/
-	@Excel(name = "封面", width = 15)
-    @Schema(description = "封面")
-    private String cover;
-	/**背景图;可能数组*/
-	@Excel(name = "背景图;可能数组", width = 15)
-    @Schema(description = "背景图;可能数组")
-    private String backgroundImage;
-	/**退款类型;0可退/到期自动退 1限时退 2不可退*/
-	@Excel(name = "退款类型;0可退/到期自动退 1限时退 2不可退", width = 15)
-    @Schema(description = "退款类型;0可退/到期自动退 1限时退 2不可退")
-    private Integer refundType;
-	/**有效期;单位:天 仅无固定场*/
-	@Excel(name = "有效期;单位:天 仅无固定场", width = 15)
-    @Schema(description = "有效期;单位:天 仅无固定场")
-    private Integer indate;
-	/**提前预约时间;单位:时 0面预约*/
-	@Excel(name = "提前预约时间;单位:时 0面预约", width = 15)
-    @Schema(description = "提前预约时间;单位:时 0面预约")
-    private Integer advanceTime;
-	/**适用人数*/
-	@Excel(name = "适用人数", width = 15)
-    @Schema(description = "适用人数")
-    private Integer usableCount;
-	/**提示/须知*/
-	@Excel(name = "提示/须知", width = 15)
-    @Schema(description = "提示/须知")
-    private String reminder;
-	/**视频*/
-	@Excel(name = "视频", width = 15)
-    @Schema(description = "视频")
-    private String video;
 	/**开始时间*/
 	@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@@ -105,12 +87,18 @@ public class AppGame implements Serializable {
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @Schema(description = "结束时间")
     private Date endTime;
-    /**报名截止时间*/
-    @Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-    @Schema(description = "报名截止时间")
-    private Date applicationEndTime;
+	/**提示/须知/说明*/
+	@Excel(name = "提示/须知/说明", width = 15)
+    @Schema(description = "提示/须知/说明")
+    private String reminder;
+	/**资质,逗号分割*/
+	@Excel(name = "资质,逗号分割", width = 15)
+    @Schema(description = "资质,逗号分割")
+    private String aptitudes;
+	/**赛事成绩*/
+	@Excel(name = "赛事成绩", width = 15)
+    @Schema(description = "赛事成绩")
+    private String gameResults;
 	/**排序*/
 	@Excel(name = "排序", width = 15)
     @Schema(description = "排序")

+ 11 - 31
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppGamePriceRules.java

@@ -22,11 +22,11 @@ import lombok.experimental.Accessors;
 /**
  * @Description: 赛事价格规则表
  * @Author: jeecg-boot
- * @Date:   2025-07-03
+ * @Date:   2025-07-08
  * @Version: V1.0
  */
 @Data
-@TableName("nm_game_peice_rules")
+@TableName("nm_game_price_rules")
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = false)
 @Schema(description="赛事价格规则表")
@@ -37,42 +37,22 @@ public class AppGamePriceRules implements Serializable {
 	@TableId(type = IdType.ASSIGN_ID)
     @Schema(description = "id")
     private String id;
-	/**部门id*/
-	@Excel(name = "部门id", width = 15)
-    @Schema(description = "部门id")
+	/**部门编码*/
+	@Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
     private String orgCode;
-	/**租户id*/
-	@Excel(name = "租户id", width = 15)
-    @Schema(description = "租户id")
+	/**关联部门id*/
+	@Excel(name = "关联部门id", width = 15)
+    @Schema(description = "关联部门id")
     private String tenantId;
 	/**赛事id*/
 	@Excel(name = "赛事id", width = 15)
     @Schema(description = "赛事id")
     private String gameId;
-	/**目*/
-	@Excel(name = "目", width = 15)
-    @Schema(description = "目")
+	/**比赛项目*/
+	@Excel(name = "比赛项目", width = 15)
+    @Schema(description = "比赛项目")
     private String categoryId;
-	/**开始时间*/
-	@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-    @Schema(description = "开始时间")
-    private Date startTime;
-	/**结束时间*/
-	@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-    @Schema(description = "结束时间")
-    private Date endTime;
-	/**赛制安排*/
-	@Excel(name = "赛制安排", width = 15)
-    @Schema(description = "赛制安排")
-    private String competitionSystem;
-	/**原价*/
-	@Excel(name = "原价", width = 15)
-    @Schema(description = "原价")
-    private String originalPrice;
 	/**售价*/
 	@Excel(name = "售价", width = 15)
     @Schema(description = "售价")

+ 96 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppGameSchedule.java

@@ -0,0 +1,96 @@
+package org.jeecg.modules.system.app.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import org.jeecg.common.constant.ProvinceCityArea;
+import org.jeecg.common.util.SpringContextUtils;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 赛程安排表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-08
+ * @Version: V1.0
+ */
+@Data
+@TableName("nm_game_schedule")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="赛程安排表")
+public class AppGameSchedule implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @Schema(description = "id")
+    private String id;
+    /**赛事id*/
+    @Schema(description = "赛事id")
+    private String gameId;
+	/**部门id*/
+	@Excel(name = "部门id", width = 15)
+    @Schema(description = "部门id")
+    private String tenantId;
+	/**部门编码*/
+	@Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
+    private String orgCode;
+	/**比赛名称*/
+	@Excel(name = "比赛名称", width = 15)
+    @Schema(description = "比赛名称")
+    private String name;
+	/**开始时间*/
+	@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "开始时间")
+    private Date startTime;
+	/**结束时间*/
+	@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "结束时间")
+    private Date endTime;
+	/**安排*/
+	@Excel(name = "安排", width = 15)
+    @Schema(description = "安排")
+    private String arrange;
+	/**创建人;创建人*/
+    @Schema(description = "创建人;创建人")
+    private String createBy;
+	/**创建时间;创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "创建时间;创建时间")
+    private Date createTime;
+	/**更新人;更新人*/
+    @Schema(description = "更新人;更新人")
+    private String updateBy;
+	/**更新时间;更新时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "更新时间;更新时间")
+    private Date updateTime;
+	/**系统状态;状态(0-正常,1-冻结)*/
+	@Excel(name = "系统状态;状态(0-正常,1-冻结)", width = 15)
+    @Schema(description = "系统状态;状态(0-正常,1-冻结)")
+    private Integer status;
+	/**删除标志;删除状态(0-正常,1-已删除)*/
+	@Excel(name = "删除标志;删除状态(0-正常,1-已删除)", width = 15)
+    @Schema(description = "删除标志;删除状态(0-正常,1-已删除)")
+    @TableLogic
+    private Integer delFlag;
+}

+ 7 - 11
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSite.java

@@ -61,9 +61,9 @@ public class AppSite implements Serializable {
 	@Excel(name = "纬度", width = 15)
     @Schema(description = "纬度")
     private BigDecimal latitude;
-	/**类型;0学校 1包场 2不固定场*/
-	@Excel(name = "类型;0学校 1包场 2不固定场", width = 15)
-    @Schema(description = "类型;0学校 1包场 2不固定场")
+	/**类型;0学校 1体育馆*/
+	@Excel(name = "类型;0学校 1体育馆 ", width = 15)
+    @Schema(description = "类型;0学校 1体育馆 ")
     private Integer type;
 	/**运动类目id;多个用逗号分割*/
 	@Excel(name = "运动类目id;多个用逗号分割", width = 15)
@@ -77,14 +77,14 @@ public class AppSite implements Serializable {
 	@Excel(name = "封面", width = 15)
     @Schema(description = "封面")
     private String cover;
-	/**背景图;可能数组*/
-	@Excel(name = "背景图;可能数组", width = 15)
-    @Schema(description = "背景图;可能数组")
-    private String backgroundImage;
 	/**退款类型;0可退/到期自动退 1限时退 2不可退*/
 	@Excel(name = "退款类型;0可退/到期自动退 1限时退 2不可退", width = 15)
     @Schema(description = "退款类型;0可退/到期自动退 1限时退 2不可退")
     private Integer refundType;
+	/**体育馆包场提前退款时间;单位:分钟*/
+	@Excel(name = "体育馆包场提前退款时间;单位:分钟", width = 15)
+    @Schema(description = "体育馆包场提前退款时间;单位:分钟")
+    private Integer earlyRefundTime;
 	/**有效期;单位:天 仅无固定场*/
 	@Excel(name = "有效期;单位:天 仅无固定场", width = 15)
     @Schema(description = "有效期;单位:天 仅无固定场")
@@ -121,10 +121,6 @@ public class AppSite implements Serializable {
 	@Excel(name = "提示/须知", width = 15)
     @Schema(description = "提示/须知")
     private String reminder;
-	/**视频*/
-	@Excel(name = "视频", width = 15)
-    @Schema(description = "视频")
-    private String video;
 	/**排序*/
 	@Excel(name = "排序", width = 15)
     @Schema(description = "排序")

+ 4 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSitePriceRules.java

@@ -77,6 +77,10 @@ public class AppSitePriceRules implements Serializable {
     @Excel(name = "库存", width = 15)
     @Schema(description = "库存")
     private Integer inventory;
+    /**0学校 1体育馆包场 2体育馆不固定场*/
+    @Excel(name = "0学校 1体育馆包场 2体育馆不固定场", width = 15)
+    @Schema(description = "0学校 1体育馆包场 2体育馆不固定场")
+    private Integer type;
     /**是否教学日0是1不是*/
     @Excel(name = "是否教学日0是1不是", width = 15)
     @Schema(description = "是否教学日0是1不是")

+ 32 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/enums/SitePriceTypeEnum.java

@@ -0,0 +1,32 @@
+package org.jeecg.modules.system.app.enums;
+
+import lombok.Getter;
+
+@Getter
+public enum SitePriceTypeEnum {
+    //    0学校 1包场 2不固定场
+    SCHOOL(0, "学校"),
+    PACKAGE(1, "包场"),
+    UNFIXED(2, "不固定场");
+    final int code;
+    final String name;
+    SitePriceTypeEnum(int code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+    public int getCode() {
+        return code;
+    }
+    public String getName() {
+        return name;
+    }
+    public static SitePriceTypeEnum getByCode(int code) {
+        for (SitePriceTypeEnum value : values()) {
+            if (value.code == code) {
+                return value;
+            }
+        }
+        return null;
+    }
+
+}

+ 2 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/enums/SiteTypeEnum.java

@@ -4,10 +4,9 @@ import lombok.Getter;
 
 @Getter
 public enum SiteTypeEnum {
-//    0学校 1包场 2不固定场
+//    0学校 1体育馆
     SCHOOL(0, "学校"),
-    PACKAGE(1, "包场"),
-    UNFIXED(2, "不固定场");
+    GYMNASIUM(1, "体育馆");
     final int code;
     final String name;
     SiteTypeEnum(int code, String name) {

+ 1 - 4
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppGamePriceRulesMapper.java

@@ -1,10 +1,7 @@
 package org.jeecg.modules.system.app.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.system.app.entity.AppGamePriceRules;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.system.app.entity.AppGamePriceRules;
 
 /**
  * @Description: 赛事价格规则表

+ 17 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppGameScheduleMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.system.app.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.system.app.entity.AppGameSchedule;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 赛程安排表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-08
+ * @Version: V1.0
+ */
+public interface AppGameScheduleMapper extends BaseMapper<AppGameSchedule> {
+
+}

+ 5 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppGameScheduleMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.system.app.mapper.AppGameScheduleMapper">
+
+</mapper>

+ 1 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppCoureseService.java

@@ -3,8 +3,6 @@ package org.jeecg.modules.system.app.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.jeecg.modules.system.app.dto.AppCoursesDTO;
 import org.jeecg.modules.system.app.dto.AppCoursesPageDTO;
-import org.jeecg.modules.system.app.dto.AppSiteDTO;
-import org.jeecg.modules.system.app.dto.AppSitePageDTO;
 import org.jeecg.modules.system.app.entity.AppCourses;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -40,6 +38,6 @@ public interface IAppCoureseService extends IService<AppCourses> {
      */
     Boolean deleteWitchPriceRulesById(String id);
 
-    IPage<AppCoursesDTO> querySiteList(AppCoursesPageDTO dto);
+    IPage<AppCoursesDTO> queryWitchPriceRulesPage(AppCoursesPageDTO dto);
 
 }

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppGamePriceRulesService.java

@@ -1,7 +1,7 @@
 package org.jeecg.modules.system.app.service;
 
-import org.jeecg.modules.system.app.entity.AppGamePriceRules;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.system.app.entity.AppGamePriceRules;
 
 /**
  * @Description: 赛事价格规则表

+ 14 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppGameScheduleService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.system.app.service;
+
+import org.jeecg.modules.system.app.entity.AppGameSchedule;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 赛程安排表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-08
+ * @Version: V1.0
+ */
+public interface IAppGameScheduleService extends IService<AppGameSchedule> {
+
+}

+ 4 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppGameService.java

@@ -1,6 +1,8 @@
 package org.jeecg.modules.system.app.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.jeecg.modules.system.app.dto.AppGameDTO;
+import org.jeecg.modules.system.app.dto.AppGamePageDTO;
 import org.jeecg.modules.system.app.dto.AppSiteDTO;
 import org.jeecg.modules.system.app.entity.AppGame;
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -37,4 +39,6 @@ public interface IAppGameService extends IService<AppGame> {
      */
     Boolean deleteWitchPriceRulesById(String id);
 
+    IPage<AppGameDTO> queryWitchPriceRulesPage(AppGamePageDTO dto);
+
 }

+ 1 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppSiteService.java

@@ -1,12 +1,10 @@
 package org.jeecg.modules.system.app.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.jeecg.modules.system.app.dto.AppCategoryDTO;
 import org.jeecg.modules.system.app.dto.AppSiteDTO;
 import org.jeecg.modules.system.app.dto.AppSitePageDTO;
 import org.jeecg.modules.system.app.entity.AppSite;
 import com.baomidou.mybatisplus.extension.service.IService;
-import org.jeecg.modules.system.app.vo.AppCategoryVO;
 
 /**
  * @Description: 场地表
@@ -41,6 +39,6 @@ public interface IAppSiteService extends IService<AppSite> {
      */
     Boolean deleteWitchPriceRulesById(String id);
 
-    IPage<AppSiteDTO> querySiteList(AppSitePageDTO dto);
+    IPage<AppSiteDTO> queryWitchPriceRulesPage(AppSitePageDTO dto);
 
 }

+ 18 - 13
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppCoureseServiceImpl.java

@@ -133,19 +133,24 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
     }
 
     @Override
-    public IPage<AppCoursesDTO> querySiteList(AppCoursesPageDTO dto) {
-//        Page<AppCourses> page = new Page<>(dto.getPageNum(), dto.getPageSize());
-//        LambdaQueryWrapper<AppCourses> wrapper = Wrappers.<AppCourses>lambdaQuery()
-//                .like(StringUtils.isNotBlank(dto.getName()), AppCourses::getName, dto.getName());
-////                .eq(AppCourses::getOrgCode, loginUser.getOrgCode());
-//        IPage<AppCourses> resultPage = baseMapper.selectPage(page, wrapper);
-//        return resultPage.convert(record -> {
-//            AppCoursesCuDTO cuDTO = new AppCoursesCuDTO();
-//            BeanUtils.copyProperties(cuDTO, record);
-//            List<AppCoursesPriceRules> priceRulesList = priceRulesMapper.selectList(Wrappers.lambdaQuery().eq(::getCoursesId, record.getId()));
-//
-//        })
-        return null;
+    public IPage<AppCoursesDTO> queryWitchPriceRulesPage(AppCoursesPageDTO dto) {
+        Page<AppCourses> page = new Page<>(dto.getPageNum(), dto.getPageSize());
+        LambdaQueryWrapper<AppCourses> wrapper = Wrappers.<AppCourses>lambdaQuery()
+                .like(StringUtils.isNotBlank(dto.getName()), AppCourses::getName, dto.getName());
+//                .eq(AppCourses::getOrgCode, loginUser.getOrgCode());
+        IPage<AppCourses> resultPage = baseMapper.selectPage(page, wrapper);
+        return resultPage.convert(record -> {
+            AppCoursesCuDTO cuDTO = new AppCoursesCuDTO();
+            BeanUtils.copyProperties(cuDTO, record);
+            List<AppCoursesPriceRules> priceRulesList = priceRulesMapper.selectList(Wrappers.<AppCoursesPriceRules>lambdaQuery().eq(AppCoursesPriceRules::getCoursesId, record.getId()));
+            List<AppCoursesRuleDTO> priceRuleDTOs =new ArrayList<>();
+            priceRulesList.forEach(rule-> {
+                AppCoursesRuleDTO appCoursesRuleDTO = new AppCoursesRuleDTO();
+                BeanUtils.copyProperties(rule, appCoursesRuleDTO);
+                priceRuleDTOs.add(appCoursesRuleDTO);
+            });
+            return new AppCoursesDTO(cuDTO, priceRuleDTOs);
+        });
     }
 
     /**

+ 19 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppGameScheduleServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.system.app.service.impl;
+
+import org.jeecg.modules.system.app.entity.AppGameSchedule;
+import org.jeecg.modules.system.app.mapper.AppGameScheduleMapper;
+import org.jeecg.modules.system.app.service.IAppGameScheduleService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 赛程安排表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-08
+ * @Version: V1.0
+ */
+@Service
+public class AppGameScheduleServiceImpl extends ServiceImpl<AppGameScheduleMapper, AppGameSchedule> implements IAppGameScheduleService {
+
+}

+ 120 - 36
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppGameServiceImpl.java

@@ -1,23 +1,29 @@
 package org.jeecg.modules.system.app.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import lombok.Setter;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.vo.LoginUser;
-import org.jeecg.modules.system.app.dto.AppGameDTO;
+import org.jeecg.modules.system.app.dto.*;
 import org.jeecg.modules.system.app.entity.AppGame;
 import org.jeecg.modules.system.app.entity.AppGamePriceRules;
+import org.jeecg.modules.system.app.entity.AppGameSchedule;
 import org.jeecg.modules.system.app.mapper.AppGameMapper;
 import org.jeecg.modules.system.app.mapper.AppGamePriceRulesMapper;
+import org.jeecg.modules.system.app.mapper.AppGameScheduleMapper;
 import org.jeecg.modules.system.app.service.IAppGameService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 
 import static org.jeecg.common.constant.CommonConstant.SC_INTERNAL_SERVER_ERROR_500;
@@ -25,96 +31,174 @@ import static org.jeecg.common.constant.CommonConstant.SC_INTERNAL_SERVER_ERROR_
 /**
  * @Description: 赛事表
  * @Author: jeecg-boot
- * @Date:   2025-07-03
+ * @Date: 2025-07-03
  * @Version: V1.0
  */
 @Service
 public class AppGameServiceImpl extends ServiceImpl<AppGameMapper, AppGame> implements IAppGameService {
     @Resource
     private AppGamePriceRulesMapper rulesMapper;
+    @Resource
+    AppGameScheduleMapper scheduleMapper;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean saveWitchPriceRules(AppGameDTO gameDTO) {
-        AppGame game=gameDTO.getGame();
-        if (null==game.getType()) throw new JeecgBootException("请选择赛事类型");
+        AppGameCuDTO gameCuDTO = gameDTO.getGame();
+        AppGame game = new AppGame();
+        BeanUtils.copyProperties(gameCuDTO, game);
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         game.setOrgCode(sysUser.getOrgCode());
         game.setTenantId(sysUser.getOrgId());
         int saveGameResult = baseMapper.insert(game);
-        if (saveGameResult<1) {
+        if (saveGameResult < 1) {
             throw new JeecgBootException("赛事信息保存失败");
         }
-        List<AppGamePriceRules> priceRulesList = gameDTO.getGamePriceRules();
-        for (AppGamePriceRules rule : priceRulesList) {
-            rule.setGameId(game.getId());
-            rule.setOrgCode(game.getOrgCode());
-            rule.setTenantId(game.getTenantId());
-            int savePriceResult = rulesMapper.insert(rule); // 保证每个操作都在事务中
-            if (savePriceResult<1) {
+        gameDTO.getGamePriceRules().forEach(gameRuleDtos -> {
+            AppGamePriceRules appGamePriceRules = new AppGamePriceRules();
+            BeanUtils.copyProperties(gameRuleDtos, appGamePriceRules);
+            appGamePriceRules.setGameId(game.getId());
+            appGamePriceRules.setOrgCode(game.getOrgCode());
+            appGamePriceRules.setTenantId(game.getTenantId());
+            int savePriceResult = rulesMapper.insert(appGamePriceRules); // 保证每个操作都在事务中
+            if (savePriceResult < 1) {
                 throw new JeecgBootException("赛事价格规则保存失败");
             }
-        }
+        });
+        gameDTO.getScheduleDTOS().forEach(scheduleDTO -> {
+            AppGameSchedule appGameSchedule = new AppGameSchedule();
+            BeanUtils.copyProperties(scheduleDTO, appGameSchedule);
+            appGameSchedule.setGameId(game.getId());
+            appGameSchedule.setOrgCode(game.getOrgCode());
+            appGameSchedule.setTenantId(game.getTenantId());
+            int saveScheduleResult = scheduleMapper.insert(appGameSchedule);
+            if (saveScheduleResult < 1) {
+                throw new JeecgBootException("赛事安排保存失败");
+            }
+        });
+
         return Boolean.TRUE;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean editWitchPriceRules(AppGameDTO gameDTO) {
-        AppGame game=gameDTO.getGame();
-        if (null==game.getType()) throw new JeecgBootException("请选择赛事类型");
+        AppGameCuDTO gameCuDTO = gameDTO.getGame();
+        AppGame game = new AppGame();
+        BeanUtils.copyProperties(gameCuDTO, game);
         AppGame dbGame = baseMapper.selectById(game.getId());
-        if (null==dbGame) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
+        if (null == dbGame) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        checkPermission(sysUser,dbGame);
+//        checkPermission(sysUser,dbGame);
         game.setOrgCode(sysUser.getOrgCode());
         game.setTenantId(sysUser.getOrgId());
         int updateGameResult = baseMapper.updateById(game);
-        if (updateGameResult<1) {
+        if (updateGameResult < 1) {
             throw new JeecgBootException("赛事信息保存失败");
         }
-        List<AppGamePriceRules> priceRulesList = gameDTO.getGamePriceRules();
-        for (AppGamePriceRules rule : priceRulesList) {
-            rule.setGameId(game.getId());
-            rule.setOrgCode(game.getOrgCode());
-            rule.setTenantId(game.getTenantId());
-            int savePriceResult = rulesMapper.updateById(rule);
-            if (savePriceResult<1) {
+        gameDTO.getGamePriceRules().forEach(gameRuleDTO -> {
+            AppGamePriceRules appGamePriceRules = new AppGamePriceRules();
+            BeanUtils.copyProperties(gameRuleDTO, appGamePriceRules);
+            appGamePriceRules.setGameId(game.getId());
+            appGamePriceRules.setOrgCode(game.getOrgCode());
+            appGamePriceRules.setTenantId(game.getTenantId());
+            int savePriceResult = rulesMapper.updateById(appGamePriceRules);
+            if (savePriceResult < 1) {
                 throw new JeecgBootException("赛事价格规则保存失败");
             }
-        }
+
+        });
+        gameDTO.getScheduleDTOS().forEach(scheduleDTO -> {
+            AppGameSchedule appGameSchedule = new AppGameSchedule();
+            BeanUtils.copyProperties(scheduleDTO, appGameSchedule);
+            appGameSchedule.setGameId(game.getId());
+            appGameSchedule.setOrgCode(game.getOrgCode());
+            appGameSchedule.setTenantId(game.getTenantId());
+            int saveScheduleResult = scheduleMapper.updateById(appGameSchedule);
+            if (saveScheduleResult < 1) {
+                throw new JeecgBootException("赛事安排保存失败");
+            }
+        });
+
         return Boolean.TRUE;
     }
 
     @Override
     public AppGameDTO queryWitchPriceRulesById(String id) {
         AppGame dbGame = baseMapper.selectById(id);
-        if (null==dbGame) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
+        if (null == dbGame) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
+        AppGameCuDTO appGameCuDTO = new AppGameCuDTO();
+        BeanUtils.copyProperties(dbGame, appGameCuDTO);
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        checkPermission(sysUser,dbGame);
-        List<AppGamePriceRules> priceRulesList = rulesMapper.selectList(Wrappers.<AppGamePriceRules>lambdaQuery().eq(AppGamePriceRules::getGameId, id));
-        return new AppGameDTO(dbGame,priceRulesList);
+//        checkPermission(sysUser,dbGame);
+        List<AppGameRuleDTO> gameRuleDTOS = new ArrayList<>();
+        rulesMapper.selectList(Wrappers.<AppGamePriceRules>lambdaQuery().eq(AppGamePriceRules::getGameId, id)).forEach(priceRules -> {
+            AppGameRuleDTO priceRulesDTO = new AppGameRuleDTO();
+            BeanUtils.copyProperties(priceRules, priceRulesDTO);
+            gameRuleDTOS.add(priceRulesDTO);
+        });
+        List<AppGameScheduleDTO> scheduleDTOS = new ArrayList<>();
+        scheduleMapper.selectList(Wrappers.<AppGameSchedule>lambdaQuery().eq(AppGameSchedule::getGameId, id)).forEach(schedule -> {
+            AppGameScheduleDTO scheduleDTO = new AppGameScheduleDTO();
+            BeanUtils.copyProperties(schedule, scheduleDTO);
+            scheduleDTOS.add(scheduleDTO);
+        });
+        return new AppGameDTO(appGameCuDTO, gameRuleDTOS, scheduleDTOS);
     }
 
     @Override
     public Boolean deleteWitchPriceRulesById(String id) {
         AppGame dbGame = baseMapper.selectById(id);
-        if (null==dbGame) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
+        if (null == dbGame) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        checkPermission(sysUser,dbGame);
+//        checkPermission(sysUser, dbGame);
         int deleteGameResult = baseMapper.deleteById(id);
-        if (deleteGameResult<1) {
+        if (deleteGameResult < 1) {
             throw new JeecgBootException("赛事信息删除失败");
         }
+        int deletePriceResult = rulesMapper.delete(Wrappers.<AppGamePriceRules>lambdaQuery().eq(AppGamePriceRules::getGameId, id));
+        if (deletePriceResult<1) throw new JeecgBootException("赛事价格规则删除失败", SC_INTERNAL_SERVER_ERROR_500);
+        int deleteScheduleResult = scheduleMapper.delete(Wrappers.<AppGameSchedule>lambdaQuery().eq(AppGameSchedule::getGameId, id));
+        if (deleteScheduleResult<1) throw new JeecgBootException("赛事安排删除失败", SC_INTERNAL_SERVER_ERROR_500);
         return Boolean.TRUE;
     }
 
+    @Override
+    public IPage<AppGameDTO> queryWitchPriceRulesPage(AppGamePageDTO dto) {
+        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        Page<AppGame> page = new Page<>(dto.getPageNum(), dto.getPageSize());
+        LambdaQueryWrapper<AppGame> wrapper = Wrappers.<AppGame>lambdaQuery()
+                .like(StringUtils.isNotBlank(dto.getName()), AppGame::getName, dto.getName());
+//                .eq(AppGame::getOrgCode, loginUser.getOrgCode());
+
+        IPage<AppGame> resultPage = baseMapper.selectPage(page, wrapper);
+        return resultPage.convert(record -> {
+            AppGameCuDTO cuDTO = new AppGameCuDTO();
+            BeanUtils.copyProperties(cuDTO, record);
+            List<AppGameRuleDTO> priceRulesDTOList = new ArrayList<>();
+            rulesMapper.selectList(Wrappers.<AppGamePriceRules>lambdaQuery().eq(AppGamePriceRules::getGameId, record.getId())).forEach(rule-> {
+                AppGameRuleDTO appGameRuleDTO = new AppGameRuleDTO();
+                BeanUtils.copyProperties(rule, appGameRuleDTO);
+                priceRulesDTOList.add(appGameRuleDTO);
+            });
+            List<AppGameScheduleDTO> scheduleDTOS = new ArrayList<>();
+            scheduleMapper.selectList(Wrappers.<AppGameSchedule>lambdaQuery().eq(AppGameSchedule::getGameId, record.getId())).forEach(schedule-> {
+                AppGameScheduleDTO appGameScheduleDTO = new AppGameScheduleDTO();
+                BeanUtils.copyProperties(schedule, appGameScheduleDTO);
+                scheduleDTOS.add(appGameScheduleDTO);
+            });
+            return new AppGameDTO(cuDTO, priceRulesDTOList, scheduleDTOS);
+        });
+    }
+
     /**
-     *  校验权限
+     * 校验权限
+     *
      * @param sysUser
      * @param game
      */
     private void checkPermission(LoginUser sysUser, AppGame game) {
-        if (!sysUser.getOrgCode().equals(game.getOrgCode())) throw new JeecgBootException("无权限操作", SC_INTERNAL_SERVER_ERROR_500);
+        if (!sysUser.getOrgCode().equals(game.getOrgCode()))
+            throw new JeecgBootException("无权限操作", SC_INTERNAL_SERVER_ERROR_500);
     }
 }

+ 3 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSiteServiceImpl.java

@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -56,6 +57,7 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
         // 获取价格规则列表
         List<AppSiteRuleDTO> priceRulesList = appSiteDTO.getPriceRulesList();
         for (AppSiteRuleDTO rule : priceRulesList) {
+            if (null==rule.getSellingPrice()||(rule.getSellingPrice().compareTo(BigDecimal.ZERO)<=0))throw new JeecgBootException("保存失败:价格不能为空或0", SC_INTERNAL_SERVER_ERROR_500);
             // 设置当前规则对应的场地 ID
             AppSitePriceRules appSitePriceRules = new AppSitePriceRules();
             appSitePriceRules.setSiteId(site.getId());
@@ -143,7 +145,7 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
     }
 
     @Override
-    public IPage<AppSiteDTO> querySiteList(AppSitePageDTO dto) {
+    public IPage<AppSiteDTO> queryWitchPriceRulesPage(AppSitePageDTO dto) {
         Page<AppSite> page = new Page<>(dto.getPageNum(), dto.getPageSize());
         LambdaQueryWrapper<AppSite> wrapper = Wrappers.<AppSite>lambdaQuery()
                 .like(StringUtils.isNotBlank(dto.getName()), AppSite::getName, dto.getName());