Ver código fonte

refactor(app): 重构课程模块数据结构和逻辑

- 更新 AppCourses 实体字段,增加用户 ID 等信息
- 重构 AppCoursesCuDTO 和 AppCoursesDTO,优化课程信息传输结构
- 更新 AppCoursesPriceRules 实体,添加排序字段
- 重构 AppCoursesPriceRulesController 和 AppCoursesPriceRulesServiceImpl
- 优化课程价格规则查询和保存逻辑
lix 2 semanas atrás
pai
commit
421cdfbb62
28 arquivos alterados com 1268 adições e 719 exclusões
  1. 3 2
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppCoursesController.java
  2. 125 115
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppCoursesPriceRulesController.java
  3. 109 109
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppSiteController.java
  4. 182 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppSitePlaceController.java
  5. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppSitePriceRulesController.java
  6. 62 31
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppCoursesCuDTO.java
  7. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppCoursesDTO.java
  8. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppCoursesRuleDTO.java
  9. 65 45
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppSiteCuDTO.java
  10. 1 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppSiteDTO.java
  11. 2 11
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/AppSiteRuleDTO.java
  12. 105 96
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppCourses.java
  13. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppCoursesPriceRules.java
  14. 59 71
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSite.java
  15. 117 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSitePlace.java
  16. 70 42
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSitePriceRules.java
  17. 16 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppSitePlaceMapper.java
  18. 5 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppSitePlaceMapper.xml
  19. 3 2
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppCoureseService.java
  20. 5 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppCoursesPriceRulesService.java
  21. 14 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppSitePlaceService.java
  22. 30 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppSitePriceRulesService.java
  23. 28 27
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppSiteService.java
  24. 10 24
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppCoureseServiceImpl.java
  25. 61 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppCoursesPriceRulesServiceImpl.java
  26. 19 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSitePlaceServiceImpl.java
  27. 27 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSitePriceRulesServiceImpl.java
  28. 140 140
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSiteServiceImpl.java

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

@@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.system.app.dto.AppCoursesCuDTO;
 import org.jeecg.modules.system.app.dto.AppCoursesDTO;
 import org.jeecg.modules.system.app.dto.AppCoursesPageDTO;
 import org.jeecg.modules.system.app.entity.AppCourses;
@@ -43,7 +44,7 @@ public class AppCoursesController extends JeecgController<AppCourses, IAppCoures
 	//@AutoLog(value = "课程/培训表-分页列表查询")
 	@Operation(summary="课程/培训表-分页列表查询")
 	@GetMapping(value = "/list")
-	public Result<IPage<AppCoursesDTO>> queryPageList(AppCoursesPageDTO dto) {
+	public Result<IPage<AppCoursesCuDTO>> queryPageList(AppCoursesPageDTO dto) {
 		return Result.OK(appCoursesService.queryWitchPriceRulesPage(dto));
 	}
 	
@@ -71,7 +72,7 @@ public class AppCoursesController extends JeecgController<AppCourses, IAppCoures
 	@Operation(summary="课程/培训表-编辑")
 //	@RequiresPermissions("org.jeecg.modules.app:nm_courese:edit")
 	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-	public Result<String> edit(@RequestBody AppCoursesDTO appCoursesDTO) {
+	public Result<String> edit(@RequestBody AppCoursesCuDTO appCoursesDTO) {
 		return appCoursesService.editWitchPriceRules(appCoursesDTO)?Result.OK("操作成功!"):Result.error("操作失败!");
 	}
 	

+ 125 - 115
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppCoursesPriceRulesController.java

@@ -14,6 +14,7 @@ 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.dto.AppCoursesRuleDTO;
 import org.jeecg.modules.system.app.entity.AppCoursesPriceRules;
 import org.jeecg.modules.system.app.service.IAppCoursesPriceRulesService;
 
@@ -44,7 +45,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
  * @Date:   2025-07-03
  * @Version: V1.0
  */
-@Tag(name="课程价格规则表")
+@Tag(name="课程课时表")
 @RestController
 @RequestMapping("/app/appCoursesPriceRules")
 @Slf4j
@@ -52,131 +53,140 @@ public class AppCoursesPriceRulesController extends JeecgController<AppCoursesPr
 	@Autowired
 	private IAppCoursesPriceRulesService appCoursesPriceRulesService;
 	
+//	/**
+//	 * 分页列表查询
+//	 *
+//	 * @param appCoursesPriceRules
+//	 * @param pageNo
+//	 * @param pageSize
+//	 * @param req
+//	 * @return
+//	 */
+//	//@AutoLog(value = "课程价格规则表-分页列表查询")
+//	@Operation(summary="课程价格规则表-分页列表查询")
+//	@GetMapping(value = "/list")
+//	public Result<IPage<AppCoursesPriceRules>> queryPageList(AppCoursesPriceRules appCoursesPriceRules,
+//								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+//								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+//								   HttpServletRequest req) {
+//
+//
+//        QueryWrapper<AppCoursesPriceRules> queryWrapper = QueryGenerator.initQueryWrapper(appCoursesPriceRules, req.getParameterMap());
+//		Page<AppCoursesPriceRules> page = new Page<AppCoursesPriceRules>(pageNo, pageSize);
+//		IPage<AppCoursesPriceRules> pageList = appCoursesPriceRulesService.page(page, queryWrapper);
+//		return Result.OK(pageList);
+//	}
+//
+//	/**
+//	 *   添加
+//	 *
+//	 * @param appCoursesPriceRules
+//	 * @return
+//	 */
+//	@AutoLog(value = "课程价格规则表-添加")
+//	@Operation(summary="课程价格规则表-添加")
+//	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:add")
+//	@PostMapping(value = "/add")
+//	public Result<String> add(@RequestBody AppCoursesPriceRules appCoursesPriceRules) {
+//		appCoursesPriceRulesService.save(appCoursesPriceRules);
+//
+//		return Result.OK("添加成功!");
+//	}
+//
+//	/**
+//	 *  编辑
+//	 *
+//	 * @param appCoursesPriceRules
+//	 * @return
+//	 */
+//	@AutoLog(value = "课程价格规则表-编辑")
+//	@Operation(summary="课程价格规则表-编辑")
+//	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:edit")
+//	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+//	public Result<String> edit(@RequestBody AppCoursesPriceRules appCoursesPriceRules) {
+//		appCoursesPriceRulesService.updateById(appCoursesPriceRules);
+//		return Result.OK("编辑成功!");
+//	}
+//
+//	/**
+//	 *   通过id删除
+//	 *
+//	 * @param id
+//	 * @return
+//	 */
+//	@AutoLog(value = "课程价格规则表-通过id删除")
+//	@Operation(summary="课程价格规则表-通过id删除")
+//	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:delete")
+//	@DeleteMapping(value = "/delete")
+//	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+//		appCoursesPriceRulesService.removeById(id);
+//		return Result.OK("删除成功!");
+//	}
+//
+//	/**
+//	 *  批量删除
+//	 *
+//	 * @param ids
+//	 * @return
+//	 */
+//	@AutoLog(value = "课程价格规则表-批量删除")
+//	@Operation(summary="课程价格规则表-批量删除")
+//	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:deleteBatch")
+//	@DeleteMapping(value = "/deleteBatch")
+//	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+//		this.appCoursesPriceRulesService.removeByIds(Arrays.asList(ids.split(",")));
+//		return Result.OK("批量删除成功!");
+//	}
+//
 	/**
-	 * 分页列表查询
+	 * 通过id查询
 	 *
-	 * @param appCoursesPriceRules
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
+	 * @param coursesId
 	 * @return
 	 */
-	//@AutoLog(value = "课程价格规则表-分页列表查询")
-	@Operation(summary="课程价格规则表-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<AppCoursesPriceRules>> queryPageList(AppCoursesPriceRules appCoursesPriceRules,
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-								   HttpServletRequest req) {
-
-
-        QueryWrapper<AppCoursesPriceRules> queryWrapper = QueryGenerator.initQueryWrapper(appCoursesPriceRules, req.getParameterMap());
-		Page<AppCoursesPriceRules> page = new Page<AppCoursesPriceRules>(pageNo, pageSize);
-		IPage<AppCoursesPriceRules> pageList = appCoursesPriceRulesService.page(page, queryWrapper);
-		return Result.OK(pageList);
+	//@AutoLog(value = "课程价格规则表-通过id查询")
+	@Operation(summary="课程价格规则表-通过课程id查询")
+	@GetMapping(value = "/queryListByCoursesId")
+	public Result<List<AppCoursesRuleDTO>> queryListByCoursesId(@RequestParam(name="id",required=true) String coursesId) {
+		return Result.OK(appCoursesPriceRulesService.queryCoursesPriceRulesList(coursesId));
 	}
-	
-	/**
-	 *   添加
-	 *
-	 * @param appCoursesPriceRules
-	 * @return
-	 */
-	@AutoLog(value = "课程价格规则表-添加")
-	@Operation(summary="课程价格规则表-添加")
-	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:add")
-	@PostMapping(value = "/add")
-	public Result<String> add(@RequestBody AppCoursesPriceRules appCoursesPriceRules) {
-		appCoursesPriceRulesService.save(appCoursesPriceRules);
 
-		return Result.OK("添加成功!");
-	}
-	
-	/**
-	 *  编辑
-	 *
-	 * @param appCoursesPriceRules
-	 * @return
-	 */
-	@AutoLog(value = "课程价格规则表-编辑")
-	@Operation(summary="课程价格规则表-编辑")
-	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:edit")
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-	public Result<String> edit(@RequestBody AppCoursesPriceRules appCoursesPriceRules) {
-		appCoursesPriceRulesService.updateById(appCoursesPriceRules);
-		return Result.OK("编辑成功!");
-	}
-	
-	/**
-	 *   通过id删除
-	 *
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "课程价格规则表-通过id删除")
-	@Operation(summary="课程价格规则表-通过id删除")
-	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:delete")
-	@DeleteMapping(value = "/delete")
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-		appCoursesPriceRulesService.removeById(id);
-		return Result.OK("删除成功!");
-	}
-	
-	/**
-	 *  批量删除
-	 *
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "课程价格规则表-批量删除")
-	@Operation(summary="课程价格规则表-批量删除")
-	@RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:deleteBatch")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		this.appCoursesPriceRulesService.removeByIds(Arrays.asList(ids.split(",")));
-		return Result.OK("批量删除成功!");
-	}
-	
 	/**
-	 * 通过id查询
+	 * 编辑保存课时
 	 *
-	 * @param id
+	 * @param dtoList
 	 * @return
 	 */
 	//@AutoLog(value = "课程价格规则表-通过id查询")
-	@Operation(summary="课程价格规则表-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<AppCoursesPriceRules> queryById(@RequestParam(name="id",required=true) String id) {
-		AppCoursesPriceRules appCoursesPriceRules = appCoursesPriceRulesService.getById(id);
-		if(appCoursesPriceRules==null) {
-			return Result.error("未找到对应数据");
-		}
-		return Result.OK(appCoursesPriceRules);
+	@Operation(summary="课程价格规则表-编辑保存课时")
+	@PostMapping(value = "/editPriceRules")
+	public Result<String> editPriceRules(List<AppCoursesRuleDTO> dtoList) {
+		return appCoursesPriceRulesService.saveWitchPriceRules(dtoList)?Result.OK("操作成功"):Result.error("保存失败");
 	}
-
-    /**
-    * 导出excel
-    *
-    * @param request
-    * @param appCoursesPriceRules
-    */
-    @RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:exportXls")
-    @RequestMapping(value = "/exportXls")
-    public ModelAndView exportXls(HttpServletRequest request, AppCoursesPriceRules appCoursesPriceRules) {
-        return super.exportXls(request, appCoursesPriceRules, AppCoursesPriceRules.class, "课程价格规则表");
-    }
-
-    /**
-      * 通过excel导入数据
-    *
-    * @param request
-    * @param response
-    * @return
-    */
-    @RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:importExcel")
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-        return super.importExcel(request, response, AppCoursesPriceRules.class);
-    }
+//
+//    /**
+//    * 导出excel
+//    *
+//    * @param request
+//    * @param appCoursesPriceRules
+//    */
+//    @RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:exportXls")
+//    @RequestMapping(value = "/exportXls")
+//    public ModelAndView exportXls(HttpServletRequest request, AppCoursesPriceRules appCoursesPriceRules) {
+//        return super.exportXls(request, appCoursesPriceRules, AppCoursesPriceRules.class, "课程价格规则表");
+//    }
+//
+//    /**
+//      * 通过excel导入数据
+//    *
+//    * @param request
+//    * @param response
+//    * @return
+//    */
+//    @RequiresPermissions("org.jeecg.modules.app:nm_courses_price_rules:importExcel")
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+//        return super.importExcel(request, response, AppCoursesPriceRules.class);
+//    }
 
 }

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

@@ -30,123 +30,123 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
  * @Date:   2025-07-03
  * @Version: V1.0
  */
-@Tag(name="场地表")
+@Tag(name="商户信息补充")
 @RestController
 @RequestMapping("/appSite")
 @Slf4j
 public class AppSiteController extends JeecgController<AppSite, IAppSiteService> {
-	@Autowired
-	private IAppSiteService appSiteService;
-	@Autowired
-	private IAppSitePriceRulesService sitePriceRulesService;
-
-	/**
-	 * 分页列表查询
-	 *
-	 * @param dto
-	 * @return
-	 */
-	//@AutoLog(value = "场地表-分页列表查询")
-	@Operation(summary="场地表-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<AppSiteDTO>> queryPageList(AppSitePageDTO dto) {
-		return Result.OK(appSiteService.queryWitchPriceRulesPage(dto));
-	}
-
-	/**
-	 *   添加
-	 *
-	 * @param appSiteDTO
-	 * @return
-	 */
-	@AutoLog(value = "场地表-添加")
-	@Operation(summary="场地表-添加")
-//	@RequiresPermissions("org.jeecg.modules.app:nm_site:add")
-	@PostMapping(value = "/add")
-	public Result<String> add(@RequestBody AppSiteDTO appSiteDTO) {
-		return appSiteService.saveWitchPriceRules(appSiteDTO)?Result.OK("添加成功!"):Result.error("添加失败!");
-	}
-
-	/**
-	 *  编辑
-	 *
-	 * @param appSiteDTO
-	 * @return
-	 */
-	@AutoLog(value = "场地表-编辑")
-	@Operation(summary="场地表-编辑")
-//	@RequiresPermissions("org.jeecg.modules.app:nm_site:edit")
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-	public Result<String> edit(@RequestBody AppSiteDTO appSiteDTO) {
-		return appSiteService.editWitchPriceRules(appSiteDTO)?Result.OK("操作成功!"):Result.error("操作失败!");
-	}
-
-	/**
-	 *   通过id删除
-	 *
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "场地表-通过id删除")
-	@Operation(summary="场地表-通过id删除")
-//	@RequiresPermissions("org.jeecg.modules.app:nm_site:delete")
-	@DeleteMapping(value = "/delete")
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-
-		return appSiteService.deleteWitchPriceRulesById(id)? Result.OK("删除成功!"):Result.error("删除失败!");
-	}
-
+//	@Autowired
+//	private IAppSiteService appSiteService;
+//	@Autowired
+//	private IAppSitePriceRulesService sitePriceRulesService;
+//
 //	/**
-//	 *  批量删除
+//	 * 分页列表查询
 //	 *
-//	 * @param ids
+//	 * @param dto
 //	 * @return
 //	 */
-//	@AutoLog(value = "场地表-批量删除")
-//	@Operation(summary="场地表-批量删除")
-//	@RequiresPermissions("org.jeecg.modules.app:nm_site:deleteBatch")
-//	@DeleteMapping(value = "/deleteBatch")
-//	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-//		this.appSiteService.removeByIds(Arrays.asList(ids.split(",")));
-//		return Result.OK("批量删除成功!");
+//	//@AutoLog(value = "场地表-分页列表查询")
+//	@Operation(summary="场地表-分页列表查询")
+//	@GetMapping(value = "/list")
+//	public Result<IPage<AppSiteDTO>> queryPageList(AppSitePageDTO dto) {
+//		return Result.OK(appSiteService.queryWitchPriceRulesPage(dto));
 //	}
-
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	//@AutoLog(value = "场地表-通过id查询")
-	@Operation(summary="场地表-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<AppSiteDTO> queryById(@RequestParam(name="id",required=true) String id) {
-			return Result.ok(appSiteService.queryWitchPriceRulesById(id));
-	}
-
-    /**
-    * 导出excel
-    *
-    * @param request
-    * @param appSite
-    */
-    @RequiresPermissions("org.jeecg.modules.app:nm_site:exportXls")
-    @RequestMapping(value = "/exportXls")
-    public ModelAndView exportXls(HttpServletRequest request, AppSite appSite) {
-        return super.exportXls(request, appSite, AppSite.class, "场地表");
-    }
-
-    /**
-      * 通过excel导入数据
-    *
-    * @param request
-    * @param response
-    * @return
-    */
-    @RequiresPermissions("org.jeecg.modules.app:nm_site:importExcel")
-    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-        return super.importExcel(request, response, AppSite.class);
-    }
+//
+//	/**
+//	 *   添加
+//	 *
+//	 * @param appSiteDTO
+//	 * @return
+//	 */
+//	@AutoLog(value = "场地表-添加")
+//	@Operation(summary="场地表-添加")
+////	@RequiresPermissions("org.jeecg.modules.app:nm_site:add")
+//	@PostMapping(value = "/add")
+//	public Result<String> add(@RequestBody AppSiteDTO appSiteDTO) {
+//		return appSiteService.saveWitchPriceRules(appSiteDTO)?Result.OK("添加成功!"):Result.error("添加失败!");
+//	}
+//
+//	/**
+//	 *  编辑
+//	 *
+//	 * @param appSiteDTO
+//	 * @return
+//	 */
+//	@AutoLog(value = "场地表-编辑")
+//	@Operation(summary="场地表-编辑")
+////	@RequiresPermissions("org.jeecg.modules.app:nm_site:edit")
+//	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+//	public Result<String> edit(@RequestBody AppSiteDTO appSiteDTO) {
+//		return appSiteService.editWitchPriceRules(appSiteDTO)?Result.OK("操作成功!"):Result.error("操作失败!");
+//	}
+//
+//	/**
+//	 *   通过id删除
+//	 *
+//	 * @param id
+//	 * @return
+//	 */
+//	@AutoLog(value = "场地表-通过id删除")
+//	@Operation(summary="场地表-通过id删除")
+////	@RequiresPermissions("org.jeecg.modules.app:nm_site:delete")
+//	@DeleteMapping(value = "/delete")
+//	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+//
+//		return appSiteService.deleteWitchPriceRulesById(id)? Result.OK("删除成功!"):Result.error("删除失败!");
+//	}
+//
+////	/**
+////	 *  批量删除
+////	 *
+////	 * @param ids
+////	 * @return
+////	 */
+////	@AutoLog(value = "场地表-批量删除")
+////	@Operation(summary="场地表-批量删除")
+////	@RequiresPermissions("org.jeecg.modules.app:nm_site:deleteBatch")
+////	@DeleteMapping(value = "/deleteBatch")
+////	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+////		this.appSiteService.removeByIds(Arrays.asList(ids.split(",")));
+////		return Result.OK("批量删除成功!");
+////	}
+//
+//	/**
+//	 * 通过id查询
+//	 *
+//	 * @param id
+//	 * @return
+//	 */
+//	//@AutoLog(value = "场地表-通过id查询")
+//	@Operation(summary="场地表-通过id查询")
+//	@GetMapping(value = "/queryById")
+//	public Result<AppSiteDTO> queryById(@RequestParam(name="id",required=true) String id) {
+//			return Result.ok(appSiteService.queryWitchPriceRulesById(id));
+//	}
+//
+//    /**
+//    * 导出excel
+//    *
+//    * @param request
+//    * @param appSite
+//    */
+//    @RequiresPermissions("org.jeecg.modules.app:nm_site:exportXls")
+//    @RequestMapping(value = "/exportXls")
+//    public ModelAndView exportXls(HttpServletRequest request, AppSite appSite) {
+//        return super.exportXls(request, appSite, AppSite.class, "场地表");
+//    }
+//
+//    /**
+//      * 通过excel导入数据
+//    *
+//    * @param request
+//    * @param response
+//    * @return
+//    */
+//    @RequiresPermissions("org.jeecg.modules.app:nm_site:importExcel")
+//    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+//    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+//        return super.importExcel(request, response, AppSite.class);
+//    }
 
 }

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

@@ -0,0 +1,182 @@
+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 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.modules.system.app.entity.AppSitePlace;
+import org.jeecg.modules.system.app.service.IAppSitePlaceService;
+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;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+ /**
+ * @Description: 商户场所表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-09
+ * @Version: V1.0
+ */
+@Tag(name="商户场所表")
+@RestController
+@RequestMapping("/org/jeecg/modules/system/app/appSitePlace")
+@Slf4j
+public class AppSitePlaceController extends JeecgController<AppSitePlace, IAppSitePlaceService> {
+	@Autowired
+	private IAppSitePlaceService appSitePlaceService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param appSitePlace
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "商户场所表-分页列表查询")
+	@Operation(summary="商户场所表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<AppSitePlace>> queryPageList(AppSitePlace appSitePlace,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+
+
+        QueryWrapper<AppSitePlace> queryWrapper = QueryGenerator.initQueryWrapper(appSitePlace, req.getParameterMap());
+		Page<AppSitePlace> page = new Page<AppSitePlace>(pageNo, pageSize);
+		IPage<AppSitePlace> pageList = appSitePlaceService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param appSitePlace
+	 * @return
+	 */
+	@AutoLog(value = "商户场所表-添加")
+	@Operation(summary="商户场所表-添加")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_site_place:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody AppSitePlace appSitePlace) {
+		appSitePlaceService.save(appSitePlace);
+
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param appSitePlace
+	 * @return
+	 */
+	@AutoLog(value = "商户场所表-编辑")
+	@Operation(summary="商户场所表-编辑")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_site_place:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody AppSitePlace appSitePlace) {
+		appSitePlaceService.updateById(appSitePlace);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "商户场所表-通过id删除")
+	@Operation(summary="商户场所表-通过id删除")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_site_place:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		appSitePlaceService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "商户场所表-批量删除")
+	@Operation(summary="商户场所表-批量删除")
+	@RequiresPermissions("org.jeecg.modules.system.app:nm_site_place:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.appSitePlaceService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "商户场所表-通过id查询")
+	@Operation(summary="商户场所表-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<AppSitePlace> queryById(@RequestParam(name="id",required=true) String id) {
+		AppSitePlace appSitePlace = appSitePlaceService.getById(id);
+		if(appSitePlace==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(appSitePlace);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param appSitePlace
+    */
+    @RequiresPermissions("org.jeecg.modules.system.app:nm_site_place:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, AppSitePlace appSitePlace) {
+        return super.exportXls(request, appSitePlace, AppSitePlace.class, "商户场所表");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("org.jeecg.modules.system.app:nm_site_place:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, AppSitePlace.class);
+    }
+
+}

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

@@ -27,7 +27,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
  * @Date:   2025-07-03
  * @Version: V1.0
  */
-@Tag(name="场地价格规则表")
+@Tag(name="场地明细规则表")
 @RestController
 @RequestMapping("/app/appSitePriceRules")
 @Slf4j

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

@@ -1,5 +1,6 @@
 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;
@@ -7,8 +8,10 @@ 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.math.BigDecimal;
+import java.util.Date;
 
 /**
  * @author DM
@@ -24,72 +27,100 @@ import java.math.BigDecimal;
 public class AppCoursesCuDTO {
     @Schema(description = "id")
     private String id;
-    /**部门*/
-    @Excel(name = "部门id", width = 15)
-    @Schema(description = "部门id")
+    /**部门编码*/
+    @Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
     private String orgCode;
-    @Excel(name = "教练ID", width = 15)
-    @Schema(description = "教练ID")
+    /**教练id(关联用户表)*/
+    @Excel(name = "教练id(关联用户表)", width = 15)
+    @Schema(description = "教练id(关联用户表)")
     private String userId;
-    /**部门id*/
-    @Schema(description = "商户/场地id;场馆/学校等场地")
+    /**关联部门id*/
+    @Excel(name = "关联部门id", width = 15)
+    @Schema(description = "关联部门id")
     private String tenantId;
     /**产品名称*/
     @Excel(name = "产品名称", width = 15)
     @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;
-    /**原价*/
-    @Schema(description = "原价")
-    private BigDecimal originalPrice;
-    /**售价*/
-    @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 BigDecimal originalPrice;
+    /**售价*/
+    @Excel(name = "售价", width = 15)
+    @Schema(description = "售价")
+    private BigDecimal sellingPrice;
+    /**适用人群*/
+    @Excel(name = "适用人群", width = 15)
+    @Schema(description = "适用人群")
+    private String fitPeople;
+    /**服务详情*/
+    @Excel(name = "服务详情", width = 15)
+    @Schema(description = "服务详情")
+    private String details;
+    /**开始时间*/
+    @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 Integer limitNum;
     /**提示/须知*/
+    @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;
-    /**好评*/
-    @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;
+    /**好评率*/
+    @Excel(name = "好评率", width = 15)
+    @Schema(description = "好评率")
+    private BigDecimal goodRate;
+    /**课程进展状态*/
+    @Excel(name = "课程进展状态", width = 15)
+    @Schema(description = "课程进展状态")
+    private Integer coursesStatus;
 }

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

@@ -25,6 +25,6 @@ import java.util.List;
 @Schema(description="课程课时入参DTO")
 public class AppCoursesDTO {
     private AppCoursesCuDTO courses;
-    @ArraySchema(schema = @Schema(implementation = AppCoursesPriceRules.class), minItems = 1)
+    @ArraySchema(schema = @Schema(implementation = AppCoursesRuleDTO.class), minItems = 1)
     private List<AppCoursesRuleDTO> priceRulesList;
 }

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

@@ -24,6 +24,10 @@ import java.util.Date;
 @NoArgsConstructor
 @Schema(description="课时表入参DTO")
 public class AppCoursesRuleDTO {
+    @Schema(description = "id")
+    private String id;
+    @Schema(description = "课程id")
+    private String coursesId;
     /**名称*/
     @Excel(name = "名称", width = 15)
     @Schema(description = "名称")

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

@@ -1,5 +1,6 @@
 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;
@@ -7,6 +8,10 @@ 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.math.BigDecimal;
+import java.util.Date;
 
 /**
  * @author DM
@@ -22,65 +27,80 @@ import org.jeecgframework.poi.excel.annotation.Excel;
 public class AppSiteCuDTO {
     @Schema(description = "id")
     private String id;
-    /**部门id*/
-    @Schema(description = "部门id")
+    /**部门编码*/
+    @Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
     private String orgCode;
-    /**商户id;场馆/主办单位/学校等场地*/
-    @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 address;
-    /**类型;0学校 1体育馆*/
-    @Excel(name = "类型;0学校 1体育馆 ", width = 15)
-    @Schema(description = "类型;0学校 1体育馆 ")
+    /**0学校 1体育馆*/
+    @Excel(name = "0学校 1体育馆", width = 15)
+    @Schema(description = "0学校 1体育馆")
     private Integer type;
+    /**经营状态0营业 1休息*/
+    @Excel(name = "经营状态0营业 1休息", width = 15)
+    @Schema(description = "经营状态0营业 1休息")
+    private Integer runStatus;
+    /**开始营业时间 时间为空则全天*/
+    @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 phone;
     /**运动类目id;多个用逗号分割*/
+    @Excel(name = "运动类目id;多个用逗号分割", width = 15)
     @Schema(description = "运动类目id;多个用逗号分割")
     private String categoryId;
-    /**保险id;可能有多个险种*/
-    @Schema(description = "保险id;可能有多个险种")
-    private String insureIds;
-    /**封面*/
-    @Schema(description = "封面")
-    private String cover;
-    /**退款类型;0可退/到期自动退 1限时退 2不可退*/
-    @Schema(description = "退款类型;0可退/到期自动退 1限时退 2不可退")
-    private Integer refundType;
-    @Schema(description = "体育馆包场提前退款时间;单位:分钟")
-    private Integer earlyRefundTime;
-    /**有效期;单位:天 仅无固定场*/
-    @Schema(description = "有效期;单位:天 仅无固定场")
-    private Integer indate;
-    /**提前预约时间;单位:时 0面预约*/
-    @Schema(description = "提前预约时间;单位:时 0面预约")
-    private Integer advanceTime;
-    /**适用人数*/
-    @Schema(description = "适用人数")
-    private Integer usableCount;
-    /**不可用时间 星期*/
-    @Schema(description = "不可用时间 星期")
-    private String downTime;
-    /**购买限制*/
-    @Schema(description = "购买限制")
-    private Integer buyLimit;
-    /**设施/信息*/
-    @Schema(description = "设施/信息")
+    /**信息/设施*/
+    @Excel(name = "信息/设施", width = 15)
+    @Schema(description = "信息/设施")
     private String facility;
-    /**教学日开放时段*/
-    @Schema(description = "教学日开放时段")
-    private String teachingDay;
-    /**非教学日开放时段*/
-    @Schema(description = "非教学日开放时段")
-    private String noTeachingDay;
-    /**提示/须知*/
-    @Schema(description = "提示/须知")
-    private String reminder;
+    /**图片*/
+    @Excel(name = "图片", width = 15)
+    @Schema(description = "图片")
+    private String cover;
+    /**视频*/
+    @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 BigDecimal latitude;
+    /**经度*/
+    @Excel(name = "经度", width = 15)
+    @Schema(description = "经度")
+    private BigDecimal longitude;
     /**排序*/
+    @Excel(name = "排序", width = 15)
     @Schema(description = "排序")
     private Integer sort;
+    /**vr图JSON数据*/
+    @Excel(name = "vr图JSON数据", width = 15)
+    @Schema(description = "vr图JSON数据")
+    private String vr;
 
 }

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

@@ -24,6 +24,7 @@ import java.util.List;
 @NoArgsConstructor
 @Schema(description="场地入参DTO")
 public class AppSiteDTO {
+    @Schema(description = "场地主信息")
     private AppSiteCuDTO site;
     @ArraySchema(schema = @Schema(implementation = AppSiteRuleDTO.class),  minItems = 1)
     private List<AppSiteRuleDTO> priceRulesList;

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

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import javax.validation.constraints.NotNull;
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -28,47 +29,37 @@ public class AppSiteRuleDTO {
     @Schema(description = "id")
     private String id;
     /**场地*/
-    @Excel(name = "场地", width = 15)
     @Schema(description = "场地")
     private String siteId;
     /**运动类型*/
-    @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 dayOfWeek;
-    /**原价*/
-    @Excel(name = "原价", width = 15)
     @Schema(description = "原价")
     private BigDecimal originalPrice;
     /**售价*/
-    @Excel(name = "售价", width = 15)
+    @NotNull(message = "售价不允许为空")
     @Schema(description = "售价")
     private BigDecimal sellingPrice;
     /**库存/票数*/
-    @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不是")
     private Integer isTeaching;
 }

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

@@ -30,124 +30,133 @@ import java.util.Date;
 public class AppCourses implements Serializable {
     private static final long serialVersionUID = 1L;
 
-	/**id*/
-	@TableId(type = IdType.ASSIGN_ID)
+    /**id*/
+    @TableId(type = IdType.ASSIGN_ID)
     @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)
-    @Schema(description = "商户/场地id;场馆/学校等场地")
-    private String tenantId;
-	/**产品名称*/
-	@Excel(name = "产品名称", width = 15)
+    private java.lang.String id;
+    /**部门编码*/
+    @Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
+    private java.lang.String orgCode;
+    /**教练id(关联用户表)*/
+    @Excel(name = "教练id(关联用户表)", width = 15)
+    @Schema(description = "教练id(关联用户表)")
+    private java.lang.String userId;
+    /**关联部门id*/
+    @Excel(name = "关联部门id", width = 15)
+    @Schema(description = "关联部门id")
+    private java.lang.String tenantId;
+    /**产品名称*/
+    @Excel(name = "产品名称", width = 15)
     @Schema(description = "产品名称")
-    private String name;
-	/**类目;0足球 1篮球 2羽毛球 3跑步...仅包场*/
-	@Excel(name = "类目;0足球 1篮球 2羽毛球 3跑步...仅包场", width = 15)
+    private java.lang.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)
+    private java.lang.String categoryId;
+    /**费用类型;0 精品 1免费 仅课程*/
+    @Excel(name = "费用类型;0 精品 1免费 仅课程", width = 15)
     @Schema(description = "费用类型;0 精品 1免费 仅课程")
-    private Integer priceType;
+    private java.lang.Integer priceType;
+    /**上课场地*/
+    @Excel(name = "上课场地", width = 15)
+    @Schema(description = "上课场地")
+    private java.lang.String siteId;
+    /**保险id;可能有多个险种*/
+    @Excel(name = "保险id;可能有多个险种", width = 15)
+    @Schema(description = "保险id;可能有多个险种")
+    private java.lang.String insureIds;
+    /**封面*/
+    @Excel(name = "封面", width = 15)
+    @Schema(description = "封面")
+    private java.lang.String cover;
+    /**背景图;可能数组*/
+    @Excel(name = "背景图;可能数组", width = 15)
+    @Schema(description = "背景图;可能数组")
+    private java.lang.String backgroundImage;
     /**原价*/
     @Excel(name = "原价", width = 15)
     @Schema(description = "原价")
-    private BigDecimal originalPrice;
+    private java.math.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)
+    private java.math.BigDecimal sellingPrice;
+    /**适用人群*/
+    @Excel(name = "适用人群", width = 15)
+    @Schema(description = "适用人群")
+    private java.lang.String fitPeople;
+    /**服务详情*/
+    @Excel(name = "服务详情", width = 15)
+    @Schema(description = "服务详情")
+    private java.lang.String details;
+    /**开始时间*/
+    @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 java.util.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 java.util.Date endTime;
+    /**限购次数*/
+    @Excel(name = "限购次数", width = 15)
+    @Schema(description = "限购次数")
+    private java.lang.Integer limitNum;
+    /**提示/须知*/
+    @Excel(name = "提示/须知", width = 15)
     @Schema(description = "提示/须知")
-    private String reminder;
-	/**上架状态;0上架 1下架*/
-	@Excel(name = "上架状态;0上架 1下架", width = 15)
+    private java.lang.String reminder;
+    /**上架状态;0上架 1下架*/
+    @Excel(name = "上架状态;0上架 1下架", width = 15)
     @Schema(description = "上架状态;0上架 1下架")
-    private Integer rackingStatus;
-	/**视频*/
-	@Excel(name = "视频", width = 15)
+    private java.lang.Integer rackingStatus;
+    /**视频*/
+    @Excel(name = "视频", width = 15)
     @Schema(description = "视频")
-    private String video;
-	/**好评*/
-	@Excel(name = "好评", width = 15)
-    @Schema(description = "好评")
-    private BigDecimal goodRate;
-	/**排序*/
-	@Excel(name = "排序", width = 15)
+    private java.lang.String video;
+    /**排序*/
+    @Excel(name = "排序", width = 15)
     @Schema(description = "排序")
-    private Integer sort;
-	/**限购次数*/
-	@Excel(name = "限购次数", width = 15)
-    @Schema(description = "限购次数")
-    private Integer limitNum;
-	/**服务详情*/
-	@Excel(name = "服务详情", width = 15)
-    @Schema(description = "服务详情")
-    private Integer details;
-	/**适用人群*/
-	@Excel(name = "适用人群", width = 15)
-    @Schema(description = "适用人群")
-    private Integer fitPeople;
-	/**开始时间*/
-	@Excel(name = "开始时间", width = 15)
-    @Schema(description = "开始时间")
-    private Integer startTime;
-	/**结束时间*/
-	@Excel(name = "结束时间", width = 15)
-    @Schema(description = "结束时间")
-    private Integer endTime;
-	/**系统状态;状态(0-正常,1-冻结)*/
-	@Excel(name = "系统状态;状态(0-正常,1-冻结)", width = 15)
+    private java.lang.Integer sort;
+    /**好评率*/
+    @Excel(name = "好评率", width = 15)
+    @Schema(description = "好评率")
+    private java.math.BigDecimal goodRate;
+    /**课程进展状态*/
+    @Excel(name = "课程进展状态", width = 15)
+    @Schema(description = "课程进展状态")
+    private java.lang.Integer coursesStatus;
+    /**系统状态;状态(0-正常,1-冻结)*/
+    @Excel(name = "系统状态;状态(0-正常,1-冻结)", width = 15)
     @Schema(description = "系统状态;状态(0-正常,1-冻结)")
-    private Integer status;
-	/**删除标志;删除状态(0-正常,1-已删除)*/
-	@Excel(name = "删除标志;删除状态(0-正常,1-已删除)", width = 15)
+    private java.lang.Integer status;
+    /**删除标志;删除状态(0-正常,1-已删除)*/
+    @Excel(name = "删除标志;删除状态(0-正常,1-已删除)", width = 15)
     @Schema(description = "删除标志;删除状态(0-正常,1-已删除)")
     @TableLogic
-    private Integer delFlag;
-	/**乐观锁*/
-	@Excel(name = "乐观锁", width = 15)
+    private java.lang.Integer delFlag;
+    /**乐观锁*/
+    @Excel(name = "乐观锁", width = 15)
     @Schema(description = "乐观锁")
-    private Integer revision;
-	/**创建人;创建人*/
+    private java.lang.Integer revision;
+    /**创建人;创建人*/
     @Schema(description = "创建人;创建人")
-    private String createBy;
-	/**创建时间;创建时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    private java.lang.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;
-	/**更新人;更新人*/
+    private java.util.Date createTime;
+    /**更新人;更新人*/
     @Schema(description = "更新人;更新人")
-    private String updateBy;
-	/**更新时间;更新时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    private java.lang.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;
+    private java.util.Date updateTime;
 }

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

@@ -53,6 +53,10 @@ public class AppCoursesPriceRules implements Serializable {
 	@Excel(name = "名称", width = 15)
     @Schema(description = "名称")
     private String name;
+    /**排序*/
+    @Excel(name = "排序", width = 15)
+    @Schema(description = "排序")
+    private Integer sort;
 	/**开始时间*/
 	@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

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

@@ -20,16 +20,16 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 /**
- * @Description: 场地
+ * @Description: 门店信息拓展
  * @Author: jeecg-boot
- * @Date:   2025-07-03
+ * @Date:   2025-07-09
  * @Version: V1.0
  */
 @Data
 @TableName("nm_site")
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = false)
-@Schema(description="场地表")
+@Schema(description="门店信息拓展表")
 public class AppSite implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -37,13 +37,13 @@ public class AppSite 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)
@@ -53,78 +53,66 @@ public class AppSite implements Serializable {
 	@Excel(name = "地址", width = 15)
     @Schema(description = "地址")
     private String address;
-	/**经度*/
-	@Excel(name = "经度", width = 15)
-    @Schema(description = "经度")
-    private BigDecimal longitude;
-	/**纬度*/
-	@Excel(name = "纬度", width = 15)
-    @Schema(description = "纬度")
-    private BigDecimal latitude;
-	/**类型;0学校 1体育馆*/
-	@Excel(name = "类型;0学校 1体育馆 ", width = 15)
-    @Schema(description = "类型;0学校 1体育馆 ")
+	/**0学校 1体育馆*/
+	@Excel(name = "0学校 1体育馆", width = 15)
+    @Schema(description = "0学校 1体育馆")
     private Integer type;
+	/**经营状态0营业 1休息*/
+	@Excel(name = "经营状态0营业 1休息", width = 15)
+    @Schema(description = "经营状态0营业 1休息")
+    private Integer runStatus;
+    /**开始营业时间 时间为空则全天*/
+    @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 phone;
 	/**运动类目id;多个用逗号分割*/
 	@Excel(name = "运动类目id;多个用逗号分割", width = 15)
     @Schema(description = "运动类目id;多个用逗号分割")
     private String categoryId;
-	/**保险id;可能有多个险种*/
-	@Excel(name = "保险id;可能有多个险种", width = 15)
-    @Schema(description = "保险id;可能有多个险种")
-    private String insureIds;
-	/**封面*/
-	@Excel(name = "封面", width = 15)
-    @Schema(description = "封面")
-    private String cover;
-	/**退款类型;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 = "有效期;单位:天 仅无固定场")
-    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 downTime;
-	/**购买限制*/
-	@Excel(name = "购买限制", width = 15)
-    @Schema(description = "购买限制")
-    private Integer buyLimit;
- 	/**设施/信息*/
-	@Excel(name = "设施/信息", width = 15)
-    @Schema(description = "设施/信息")
+	/**信息/设施*/
+	@Excel(name = "信息/设施", width = 15)
+    @Schema(description = "信息/设施")
     private String facility;
- 	/**教学日开放时段*/
-	@Excel(name = "教学日开放时段", width = 15)
-    @Schema(description = "教学日开放时段")
-    private String teachingDay;
- 	/**非教学日开放时段*/
-	@Excel(name = "非教学日开放时段", width = 15)
-    @Schema(description = "非教学日开放时段")
-    private String noTeachingDay;
- 	/**提示/须知*/
-	@Excel(name = "提示/须知", width = 15)
-    @Schema(description = "提示/须知")
-    private String reminder;
+	/**图片*/
+	@Excel(name = "图片", width = 15)
+    @Schema(description = "图片")
+    private String cover;
+	/**视频*/
+	@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 BigDecimal latitude;
+	/**经度*/
+	@Excel(name = "经度", width = 15)
+    @Schema(description = "经度")
+    private BigDecimal longitude;
 	/**排序*/
 	@Excel(name = "排序", width = 15)
     @Schema(description = "排序")
     private Integer sort;
+	/**vr图JSON数据*/
+	@Excel(name = "vr图JSON数据", width = 15)
+    @Schema(description = "vr图JSON数据")
+    private String vr;
 	/**系统状态;状态(0-正常,1-冻结)*/
 	@Excel(name = "系统状态;状态(0-正常,1-冻结)", width = 15)
     @Schema(description = "系统状态;状态(0-正常,1-冻结)")

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

@@ -0,0 +1,117 @@
+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-09
+ * @Version: V1.0
+ */
+@Data
+@TableName("nm_site_place")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="商户场所表")
+public class AppSitePlace implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @Schema(description = "id")
+    private String id;
+	/**部门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 Integer revision;
+	/**创建人;创建人*/
+    @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;
+	/**封面*/
+	@Excel(name = "封面", width = 15)
+    @Schema(description = "封面")
+    private String cover;
+	/**保险id,逗号分割*/
+	@Excel(name = "保险id,逗号分割", width = 15)
+    @Schema(description = "保险id,逗号分割")
+    private String insureIds;
+	/**退款类型;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 = "适用人数")
+    private Integer usableCount;
+	/**提示/须知*/
+	@Excel(name = "提示/须知", width = 15)
+    @Schema(description = "提示/须知")
+    private String reminder;
+	/**不可用日期;多个逗号分割*/
+	@Excel(name = "不可用日期;多个逗号分割", width = 15)
+    @Schema(description = "不可用日期;多个逗号分割")
+    private String downTime;
+	/**提前预约时间:0免预约 单位:时*/
+	@Excel(name = "提前预约时间:0免预约 单位:时", width = 15)
+    @Schema(description = "提前预约时间:0免预约 单位:时")
+    private Integer advanceTime;
+	/**购买限制*/
+	@Excel(name = "购买限制", width = 15)
+    @Schema(description = "购买限制")
+    private Integer buyLimit;
+	/**有效期;单位:天*/
+	@Excel(name = "有效期;单位:天", width = 15)
+    @Schema(description = "有效期;单位:天")
+    private Integer indate;
+}

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

@@ -29,88 +29,116 @@ import lombok.experimental.Accessors;
 public class AppSitePriceRules implements Serializable {
     private static final long serialVersionUID = 1L;
 
-	/**id*/
-	@TableId(type = IdType.ASSIGN_ID)
+    /**id*/
+    @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)
+    /**场地*/
+    @Excel(name = "场地", width = 15)
     @Schema(description = "场地")
     private String siteId;
-	/**运动类型*/
-	@Excel(name = "运动类型", width = 15)
+    /**运动类型*/
+    @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")
+    /**0学校 1体育馆包场 2体育馆不固定场*/
+    @Excel(name = "0学校 1体育馆包场 2体育馆不固定场", width = 15)
+    @Schema(description = "0学校 1体育馆包场 2体育馆不固定场")
+    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 startTime;
-	/**结束时间*/
-	@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    /**结束时间*/
+    @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)
+    /**星期几*/
+    @Excel(name = "星期几", width = 15)
     @Schema(description = "星期几")
     private String dayOfWeek;
-	/**原价*/
-	@Excel(name = "原价", width = 15)
+    /**原价*/
+    @Excel(name = "原价", width = 15)
     @Schema(description = "原价")
     private BigDecimal originalPrice;
-	/**售价*/
-	@Excel(name = "售价", width = 15)
+    /**售价*/
+    @Excel(name = "售价", width = 15)
     @Schema(description = "售价")
     private BigDecimal sellingPrice;
     /**库存/票数*/
-    @Excel(name = "库存", width = 15)
-    @Schema(description = "库存")
+    @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不是")
     private Integer isTeaching;
-	/**乐观锁*/
-	@Excel(name = "乐观锁", width = 15)
+    /**展示状态(0正常,1已定,2过期)*/
+    @Excel(name = "展示状态(0正常,1已定,2过期)", width = 15)
+    @Schema(description = "展示状态(0正常,1已定,2过期)")
+    private Integer viewStatus;
+    /**退款类型;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 = "适用人数")
+    private Integer usableCount;
+    /**提示/须知*/
+    @Excel(name = "提示/须知", width = 15)
+    @Schema(description = "提示/须知")
+    private String reminder;
+    /**不可用日期;多个逗号分割*/
+    @Excel(name = "不可用日期;多个逗号分割", width = 15)
+    @Schema(description = "不可用日期;多个逗号分割")
+    private String downTime;
+    /**提前预约时间:0免预约 单位:时*/
+    @Excel(name = "提前预约时间:0免预约 单位:时", width = 15)
+    @Schema(description = "提前预约时间:0免预约 单位:时")
+    private Integer advanceTime;
+    /**乐观锁*/
+    @Excel(name = "乐观锁", width = 15)
     @Schema(description = "乐观锁")
     private Integer revision;
-	/**创建人;创建人*/
+    /**创建人;创建人*/
     @Schema(description = "创建人;创建人")
     private String createBy;
-	/**创建时间;创建时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "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 createTime;
-	/**更新人;更新人*/
+    /**更新人;更新人*/
     @Schema(description = "更新人;更新人")
     private String updateBy;
-	/**更新时间;更新时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "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 updateTime;
-	/**系统状态;状态(0-正常,1-冻结)*/
-	@Excel(name = "系统状态;状态(0-正常,1-冻结)", width = 15)
+    /**系统状态;状态(0-正常,1-冻结)*/
+    @Excel(name = "系统状态;状态(0-正常,1-冻结)", width = 15)
     @Schema(description = "系统状态;状态(0-正常,1-冻结)")
     private Integer status;
-	/**删除标志;删除状态(0-正常,1-已删除)*/
-	@Excel(name = "删除标志;删除状态(0-正常,1-已删除)", width = 15)
+    /**删除标志;删除状态(0-正常,1-已删除)*/
+    @Excel(name = "删除标志;删除状态(0-正常,1-已删除)", width = 15)
     @Schema(description = "删除标志;删除状态(0-正常,1-已删除)")
     @TableLogic
     private Integer delFlag;

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

@@ -0,0 +1,16 @@
+package org.jeecg.modules.system.app.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.system.app.entity.AppSitePlace;
+
+/**
+ * @Description: 商户场所表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-09
+ * @Version: V1.0
+ */
+public interface AppSitePlaceMapper extends BaseMapper<AppSitePlace> {
+
+}

+ 5 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppSitePlaceMapper.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.AppSitePlaceMapper">
+
+</mapper>

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

@@ -1,6 +1,7 @@
 package org.jeecg.modules.system.app.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.jeecg.modules.system.app.dto.AppCoursesCuDTO;
 import org.jeecg.modules.system.app.dto.AppCoursesDTO;
 import org.jeecg.modules.system.app.dto.AppCoursesPageDTO;
 import org.jeecg.modules.system.app.entity.AppCourses;
@@ -24,7 +25,7 @@ public interface IAppCoureseService extends IService<AppCourses> {
      * @param appCoursesDTO
      * @return
      */
-    Boolean editWitchPriceRules(AppCoursesDTO appCoursesDTO);
+    Boolean editWitchPriceRules(AppCoursesCuDTO appCoursesDTO);
     /**
      * 通过id查询课程
      * @param id
@@ -38,6 +39,6 @@ public interface IAppCoureseService extends IService<AppCourses> {
      */
     Boolean deleteWitchPriceRulesById(String id);
 
-    IPage<AppCoursesDTO> queryWitchPriceRulesPage(AppCoursesPageDTO dto);
+    IPage<AppCoursesCuDTO> queryWitchPriceRulesPage(AppCoursesPageDTO dto);
 
 }

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

@@ -1,8 +1,11 @@
 package org.jeecg.modules.system.app.service;
 
+import org.jeecg.modules.system.app.dto.AppCoursesRuleDTO;
 import org.jeecg.modules.system.app.entity.AppCoursesPriceRules;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * @Description: 课程价格规则表
  * @Author: jeecg-boot
@@ -11,4 +14,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IAppCoursesPriceRulesService extends IService<AppCoursesPriceRules> {
 
+List<AppCoursesRuleDTO> queryCoursesPriceRulesList(String courseId);
+Boolean saveWitchPriceRules(List<AppCoursesRuleDTO> dtoList);
 }

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.system.app.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.system.app.entity.AppSitePlace;
+
+/**
+ * @Description: 商户场所表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-09
+ * @Version: V1.0
+ */
+public interface IAppSitePlaceService extends IService<AppSitePlace> {
+
+}

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

@@ -1,14 +1,43 @@
 package org.jeecg.modules.system.app.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.jeecg.modules.system.app.dto.AppSiteDTO;
+import org.jeecg.modules.system.app.dto.AppSitePageDTO;
 import org.jeecg.modules.system.app.entity.AppSitePriceRules;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 /**
- * @Description: 场地价格规则
+ * @Description: 场地表
  * @Author: jeecg-boot
  * @Date:   2025-07-03
  * @Version: V1.0
  */
 public interface IAppSitePriceRulesService extends IService<AppSitePriceRules> {
+    /**
+     *新增包场
+     * @param appSiteDTO
+     * @return
+     */
+    Boolean saveWitchPriceRules(AppSiteDTO appSiteDTO);
+    /**
+     * 修改场地表
+     * @param appSiteDTO
+     * @return
+     */
+    Boolean editWitchPriceRules(AppSiteDTO appSiteDTO);
+    /**
+     * 通过id查询场地表
+     * @param id
+     * @return
+     */
+    AppSiteDTO queryWitchPriceRulesById(String id);
+    /**
+     * 删除场地表
+     * @param id
+     * @return
+     */
+    Boolean deleteWitchPriceRulesById(String id);
+
+    IPage<AppSiteDTO> queryWitchPriceRulesPage(AppSitePageDTO dto);
 
 }

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

@@ -1,44 +1,45 @@
 package org.jeecg.modules.system.app.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.jeecg.modules.system.app.dto.AppSiteCuDTO;
 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;
 
 /**
- * @Description: 场地
+ * @Description: 商户
  * @Author: jeecg-boot
  * @Date: 2025-07-03
  * @Version: V1.0
  */
 public interface IAppSiteService extends IService<AppSite> {
 
-    /**
-     * 保存场地表
-     * @param appSiteDTO
-     * @return
-     */
-    Boolean saveWitchPriceRules(AppSiteDTO appSiteDTO);
-    /**
-     * 修改场地表
-     * @param appSiteDTO
-     * @return
-     */
-    Boolean editWitchPriceRules(AppSiteDTO appSiteDTO);
-    /**
-     * 通过id查询场地表
-     * @param id
-     * @return
-     */
-    AppSiteDTO queryWitchPriceRulesById(String id);
-    /**
-     * 删除场地表
-     * @param id
-     * @return
-     */
-    Boolean deleteWitchPriceRulesById(String id);
-
-    IPage<AppSiteDTO> queryWitchPriceRulesPage(AppSitePageDTO dto);
+//    /**
+//     *商户新增
+//     * @param appSiteDTO
+//     * @return
+//     */
+//    Boolean saveWitchPriceRules(AppSiteCuDTO appSiteDTO);
+//    /**
+//     * 商户修改
+//     * @param appSiteDTO
+//     * @return
+//     */
+//    Boolean editWitchPriceRules(AppSiteDTO appSiteDTO);
+//    /**
+//     * 通过id查询商户
+//     * @param id
+//     * @return
+//     */
+//    AppSiteDTO queryWitchPriceRulesById(String id);
+//    /**
+//     * 删除商户
+//     * @param id
+//     * @return
+//     */
+//    Boolean deleteWitchPriceRulesById(String id);
+//
+//    IPage<AppSiteDTO> queryWitchPriceRulesPage(AppSitePageDTO dto);
 
 }

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

@@ -21,6 +21,7 @@ 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;
@@ -40,6 +41,7 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
     AppCoursesPriceRulesMapper priceRulesMapper;
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public Boolean saveWitchPriceRules(AppCoursesDTO appCoursesDTO) {
         AppCoursesCuDTO coursesCuDTO = appCoursesDTO.getCourses();
         if (null == coursesCuDTO.getCategoryId()) throw new JeecgBootException("请选择课程类别");
@@ -48,6 +50,7 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
         BeanUtils.copyProperties(coursesCuDTO, appCourses);
         appCourses.setOrgCode(loginUser.getOrgCode());
         appCourses.setTenantId(loginUser.getOrgId());
+        appCourses.setUserId(loginUser.getId());
         int saveCourseResult = baseMapper.insert(appCourses);
         if (saveCourseResult < 1) {
             throw new JeecgBootException("课程信息保存失败");
@@ -68,8 +71,8 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
     }
 
     @Override
-    public Boolean editWitchPriceRules(AppCoursesDTO appCoursesDTO) {
-        AppCoursesCuDTO coursesCuDTO = appCoursesDTO.getCourses();
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean editWitchPriceRules(AppCoursesCuDTO coursesCuDTO) {
         if (null == coursesCuDTO.getCategoryId()) throw new JeecgBootException("请选择课程类别");
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         AppCourses dbCourse = baseMapper.selectById(coursesCuDTO.getId());
@@ -78,22 +81,11 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
         BeanUtils.copyProperties(coursesCuDTO, course);
         course.setOrgCode(loginUser.getOrgCode());
         course.setTenantId(loginUser.getOrgId());
+        course.setUserId(loginUser.getId());
         int updateCourseResult = baseMapper.updateById(course);
         if (updateCourseResult < 1) {
             throw new JeecgBootException("课程信息保存失败");
         }
-        List<AppCoursesRuleDTO> appCoursesRuleDTOS = appCoursesDTO.getPriceRulesList();
-        for (AppCoursesRuleDTO rule : appCoursesRuleDTOS) {
-            AppCoursesPriceRules appCoursesPriceRules = new AppCoursesPriceRules();
-            BeanUtils.copyProperties(rule, appCoursesPriceRules);
-            appCoursesPriceRules.setCoursesId(course.getId());
-            appCoursesPriceRules.setOrgCode(course.getOrgCode());
-            appCoursesPriceRules.setTenantId(course.getTenantId());
-            int savePriceResult = priceRulesMapper.updateById(appCoursesPriceRules);
-            if (savePriceResult < 1) {
-                throw new JeecgBootException("课程价格规则保存失败");
-            }
-        }
         return Boolean.TRUE;
     }
 
@@ -118,6 +110,7 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public Boolean deleteWitchPriceRulesById(String id) {
         AppCourses dbCourse = baseMapper.selectById(id);
         if (null==dbCourse) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
@@ -133,7 +126,7 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
     }
 
     @Override
-    public IPage<AppCoursesDTO> queryWitchPriceRulesPage(AppCoursesPageDTO dto) {
+    public IPage<AppCoursesCuDTO> 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());
@@ -141,15 +134,8 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
         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);
+            BeanUtils.copyProperties(record,cuDTO);
+            return cuDTO;
         });
     }
 

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

@@ -1,19 +1,79 @@
 package org.jeecg.modules.system.app.service.impl;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.jeecg.common.exception.JeecgBootException;
+import org.jeecg.modules.system.app.dto.AppCoursesRuleDTO;
+import org.jeecg.modules.system.app.dto.AppSiteRuleDTO;
 import org.jeecg.modules.system.app.entity.AppCoursesPriceRules;
+import org.jeecg.modules.system.app.entity.AppSitePriceRules;
 import org.jeecg.modules.system.app.mapper.AppCoursesPriceRulesMapper;
 import org.jeecg.modules.system.app.service.IAppCoursesPriceRulesService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @Description: 课程价格规则表
  * @Author: jeecg-boot
- * @Date:   2025-07-03
+ * @Date: 2025-07-03
  * @Version: V1.0
  */
 @Service
 public class AppCoursesPriceRulesServiceImpl extends ServiceImpl<AppCoursesPriceRulesMapper, AppCoursesPriceRules> implements IAppCoursesPriceRulesService {
 
+    @Override
+    public List<AppCoursesRuleDTO> queryCoursesPriceRulesList(String courseId) {
+        List<AppCoursesRuleDTO> ruleDTOS = new ArrayList<>();
+        baseMapper.selectList(Wrappers.<AppCoursesPriceRules>lambdaQuery().eq(AppCoursesPriceRules::getCoursesId, courseId))
+                .forEach(appCourses -> {
+                    AppCoursesRuleDTO appCoursesRuleDTO = new AppCoursesRuleDTO();
+                    BeanUtils.copyProperties(appCourses, appCoursesRuleDTO);
+                });
+        return ruleDTOS;
+    }
+
+    @Override
+    public Boolean saveWitchPriceRules(List<AppCoursesRuleDTO> dtoList) {
+        if (dtoList.isEmpty()) throw new JeecgBootException("课时列表不能为空");
+
+//        List<AppCoursesRuleDTO> dtoList = dto.getPriceRulesList();
+//        List<AppSitePriceRules> dbRules = baseMapper.getBySiteId(siteId);
+//
+//// 1. 找出需删除的(db中有,new中没有)
+//        List<String> newIds = dtoList.stream().map(AppSiteRuleDTO::getId).collect(Collectors.toList());
+//        List<AppSiteRuleEntity> toDelete = dbRules.stream()
+//                .filter(e -> !newIds.contains(e.getId()))
+//                .collect(Collectors.toList());
+//
+//// 2. 找出需更新的(db中有,new中也有)
+//        List<AppSiteRuleDTO> toUpdate = dtoList.stream()
+//                .filter(r -> r.getId() != null && dbRules.stream().anyMatch(e -> e.getId().equals(r.getId())))
+//                .collect(Collectors.toList());
+//
+//// 3. 找出需新增的(new中有,db中没有)
+//        List<AppSiteRuleDTO> toInsert = dtoList.stream()
+//                .filter(r -> r.getId() == null || dbRules.stream().noneMatch(e -> e.getId().equals(r.getId())))
+//                .collect(Collectors.toList());
+//
+//// 分别执行 delete/update/insert
+//
+//        for (AppCoursesRuleDTO rule : dtoList) {
+//            AppCoursesPriceRules appCoursesPriceRules = new AppCoursesPriceRules();
+//            BeanUtils.copyProperties(rule, appCoursesPriceRules);
+//            if (rule.getId() != null){
+//                baseMapper.insert( rule)
+//            }
+//
+//            int savePriceResult = baseMapper.(appCoursesPriceRules);
+//            if (savePriceResult < 1) {
+//                throw new JeecgBootException("课时保存失败");
+//            }
+//        }
+        return true;
+    }
+
 }

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

@@ -0,0 +1,19 @@
+package org.jeecg.modules.system.app.service.impl;
+
+import org.jeecg.modules.system.app.entity.AppSitePlace;
+import org.jeecg.modules.system.app.mapper.AppSitePlaceMapper;
+import org.jeecg.modules.system.app.service.IAppSitePlaceService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 商户场所表
+ * @Author: jeecg-boot
+ * @Date:   2025-07-09
+ * @Version: V1.0
+ */
+@Service
+public class AppSitePlaceServiceImpl extends ServiceImpl<AppSitePlaceMapper, AppSitePlace> implements IAppSitePlaceService {
+
+}

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

@@ -1,5 +1,8 @@
 package org.jeecg.modules.system.app.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.jeecg.modules.system.app.dto.AppSiteDTO;
+import org.jeecg.modules.system.app.dto.AppSitePageDTO;
 import org.jeecg.modules.system.app.entity.AppSitePriceRules;
 import org.jeecg.modules.system.app.mapper.AppSitePriceRulesMapper;
 import org.jeecg.modules.system.app.service.IAppSitePriceRulesService;
@@ -16,4 +19,28 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 @Service
 public class AppSitePriceRulesServiceImpl extends ServiceImpl<AppSitePriceRulesMapper, AppSitePriceRules> implements IAppSitePriceRulesService {
 
+    @Override
+    public Boolean saveWitchPriceRules(AppSiteDTO appSiteDTO) {
+        return null;
+    }
+
+    @Override
+    public Boolean editWitchPriceRules(AppSiteDTO appSiteDTO) {
+        return null;
+    }
+
+    @Override
+    public AppSiteDTO queryWitchPriceRulesById(String id) {
+        return null;
+    }
+
+    @Override
+    public Boolean deleteWitchPriceRulesById(String id) {
+        return null;
+    }
+
+    @Override
+    public IPage<AppSiteDTO> queryWitchPriceRulesPage(AppSitePageDTO dto) {
+        return null;
+    }
 }

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

@@ -35,144 +35,144 @@ import static org.jeecg.common.constant.CommonConstant.SC_INTERNAL_SERVER_ERROR_
  */
 @Service
 public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> implements IAppSiteService {
-    @Resource
-    private AppSitePriceRulesMapper priceRulesMapper;
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Boolean saveWitchPriceRules(AppSiteDTO appSiteDTO) {
-        AppSiteCuDTO siteCuDTO = appSiteDTO.getSite();
-        if (null == siteCuDTO.getType()) throw new JeecgBootException("场地类型不能为空", SC_INTERNAL_SERVER_ERROR_500);
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        AppSite site = new AppSite();
-        BeanUtils.copyProperties(siteCuDTO, site);
-        site.setOrgCode(sysUser.getOrgCode());//部门默认登录用户部门
-        site.setTenantId(sysUser.getOrgId());
-        int saveSiteResult = baseMapper.insert(site);
-        // 如果插入失败,抛出自定义异常提示“场地信息保存失败”
-        if (saveSiteResult < 1) {
-            throw new JeecgBootException("场地信息保存失败", SC_INTERNAL_SERVER_ERROR_500);
-        }
-
-        // 获取价格规则列表
-        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());
-            appSitePriceRules.setOrgCode(site.getOrgCode());
-            appSitePriceRules.setTenantId(site.getTenantId());
-            // 调用 priceRulesMapper 插入价格规则
-            int savePriceResult = priceRulesMapper.insert(appSitePriceRules);
-            // 如果插入失败,抛出自定义异常提示“场地价格规则保存失败”
-            if (savePriceResult < 1) {
-                throw new JeecgBootException("场地价格规则保存失败", SC_INTERNAL_SERVER_ERROR_500);
-            }
-        }
-
-        // 所有操作成功完成后返回 true
-        return Boolean.TRUE;
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Boolean editWitchPriceRules(AppSiteDTO appSiteDTO) {
-        AppSiteCuDTO siteCuDTO = appSiteDTO.getSite();
-        AppSite site = new AppSite();
-        BeanUtils.copyProperties(siteCuDTO, site);
-        if (null == site.getType()) throw new JeecgBootException("场地类型不能为空", SC_INTERNAL_SERVER_ERROR_500);
-        AppSite dbSite = baseMapper.selectById(site.getId());
-        if (null==dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        checkPermission(dbSite,sysUser);
-        site.setOrgCode(sysUser.getOrgCode());//部门默认登录用户部门
-        site.setTenantId(sysUser.getOrgId());
-        int updateSiteResult = baseMapper.updateById(site);
-        if (updateSiteResult < 1) {
-            throw new JeecgBootException("场地信息保存失败", SC_INTERNAL_SERVER_ERROR_500);
-        }
-
-        List<AppSiteRuleDTO> priceRulesList = appSiteDTO.getPriceRulesList();
-        for (AppSiteRuleDTO rule : priceRulesList) {
-            AppSitePriceRules appSitePriceRules = new AppSitePriceRules();
-            BeanUtils.copyProperties(rule, appSitePriceRules);
-            appSitePriceRules.setSiteId(site.getId());
-            appSitePriceRules.setOrgCode(site.getOrgCode());
-            appSitePriceRules.setTenantId(site.getTenantId());
-            int savePriceResult = priceRulesMapper.updateById(appSitePriceRules); // 保证每个操作都在事务中
-            if (savePriceResult < 1) {
-                throw new JeecgBootException("场地价格规则保存失败", SC_INTERNAL_SERVER_ERROR_500);
-            }
-        }
-
-        return Boolean.TRUE;
-    }
-
-    @Override
-    public AppSiteDTO queryWitchPriceRulesById(String id) {
-        AppSite dbSite = baseMapper.selectById(id);
-        if (null==dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
-        AppSiteCuDTO appSiteCuDTO = new AppSiteCuDTO();
-        BeanUtils.copyProperties(dbSite, appSiteCuDTO);
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        checkPermission(dbSite,sysUser);
-        List<AppSitePriceRules> priceRulesList = priceRulesMapper.selectList(Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSiteId, id));
-        List<AppSiteRuleDTO> priceRulesDTOList = new ArrayList<>();
-        priceRulesList.forEach(rule-> {
-            AppSiteRuleDTO appSiteRuleDTO = new AppSiteRuleDTO();
-            BeanUtils.copyProperties(rule, appSiteRuleDTO);
-            priceRulesDTOList.add(appSiteRuleDTO);
-        });
-        return new AppSiteDTO(appSiteCuDTO,priceRulesDTOList);
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Boolean deleteWitchPriceRulesById(String id) {
-        AppSite dbSite = baseMapper.selectById(id);
-        if (null==dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-//        checkPermission(dbSite,sysUser);
-        int deleteSiteResult = baseMapper.deleteById(id);
-        if (deleteSiteResult>0){
-            int deletePriceResult = priceRulesMapper.delete(Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSiteId, id));
-            if (deletePriceResult<1) throw new JeecgBootException("场地价格规则删除失败", SC_INTERNAL_SERVER_ERROR_500);
-        }else{
-            throw new JeecgBootException("场地信息删除失败", SC_INTERNAL_SERVER_ERROR_500);
-        }
-        return Boolean.TRUE;
-    }
-
-    @Override
-    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());
-        IPage<AppSite> resultPage = baseMapper.selectPage(page, wrapper);
-
-        return resultPage.convert(record -> {
-            AppSiteCuDTO cuDTO = new AppSiteCuDTO();
-            BeanUtils.copyProperties(record, cuDTO);
-            List<AppSitePriceRules> priceRulesList = priceRulesMapper.selectList(
-                    Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSiteId, record.getId()));
-            List<AppSiteRuleDTO> priceRulesDTOList = new ArrayList<>();
-            priceRulesList.forEach(rule-> {
-                AppSiteRuleDTO appSiteRuleDTO = new AppSiteRuleDTO();
-                BeanUtils.copyProperties(rule, appSiteRuleDTO);
-                priceRulesDTOList.add(appSiteRuleDTO);
-            });
-
-            return new AppSiteDTO(cuDTO, priceRulesDTOList);
-        });
-    }
-
-    /**
-     * 权限校验
-     * @param site
-     * @param sysUser
-     */
-    private void checkPermission(AppSite site,LoginUser sysUser ){
-        if (!sysUser.getOrgCode().equals(site.getOrgCode())) throw new JeecgBootException("无权限操作", SC_INTERNAL_SERVER_ERROR_500);
-    }
+//    @Resource
+//    private AppSitePriceRulesMapper priceRulesMapper;
+//
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Boolean saveWitchPriceRules(AppSiteCuDTO appSiteDTO) {
+//        if (null == appSiteDTO.getType()) throw new JeecgBootException("商户类型不能为空", SC_INTERNAL_SERVER_ERROR_500);
+//        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+//        AppSite site = new AppSite();
+//        BeanUtils.copyProperties(siteCuDTO, site);
+//        site.setOrgCode(sysUser.getOrgCode());//部门默认登录用户部门
+//        site.setTenantId(sysUser.getOrgId());
+//        int saveSiteResult = baseMapper.insert(site);
+//        // 如果插入失败,抛出自定义异常提示“场地信息保存失败”
+//        if (saveSiteResult < 1) {
+//            throw new JeecgBootException("场地信息保存失败", SC_INTERNAL_SERVER_ERROR_500);
+//        }
+//
+////        // 获取价格规则列表
+////        List<AppSiteRuleDTO> priceRulesList = appSiteDTO.getPriceRulesList();
+////        for (AppSiteRuleDTO rule : priceRulesList) {
+////            if (rule.getSellingPrice().compareTo(BigDecimal.ZERO)<=0)throw new JeecgBootException("保存失败:价格不能为0", SC_INTERNAL_SERVER_ERROR_500);
+////            // 设置当前规则对应的场地 ID
+////            AppSitePriceRules appSitePriceRules = new AppSitePriceRules();
+////            BeanUtils.copyProperties(rule, appSitePriceRules);
+////            appSitePriceRules.setSiteId(site.getId());
+////            appSitePriceRules.setOrgCode(site.getOrgCode());
+////            appSitePriceRules.setTenantId(site.getTenantId());
+////            // 调用 priceRulesMapper 插入价格规则
+////            int savePriceResult = priceRulesMapper.insert(appSitePriceRules);
+////            // 如果插入失败,抛出自定义异常提示“场地价格规则保存失败”
+////            if (savePriceResult < 1) {
+////                throw new JeecgBootException("场地价格规则保存失败", SC_INTERNAL_SERVER_ERROR_500);
+////            }
+////        }
+//
+//        // 所有操作成功完成后返回 true
+//        return Boolean.TRUE;
+//    }
+//
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Boolean editWitchPriceRules(AppSiteDTO appSiteDTO) {
+//        AppSiteCuDTO siteCuDTO = appSiteDTO.getSite();
+//        AppSite site = new AppSite();
+//        BeanUtils.copyProperties(siteCuDTO, site);
+//        if (null == site.getType()) throw new JeecgBootException("场地类型不能为空", SC_INTERNAL_SERVER_ERROR_500);
+//        AppSite dbSite = baseMapper.selectById(site.getId());
+//        if (null==dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
+//        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+////        checkPermission(dbSite,sysUser);
+//        site.setOrgCode(sysUser.getOrgCode());//部门默认登录用户部门
+//        site.setTenantId(sysUser.getOrgId());
+//        int updateSiteResult = baseMapper.updateById(site);
+//        if (updateSiteResult < 1) {
+//            throw new JeecgBootException("场地信息保存失败", SC_INTERNAL_SERVER_ERROR_500);
+//        }
+//
+//        List<AppSiteRuleDTO> priceRulesList = appSiteDTO.getPriceRulesList();
+//        for (AppSiteRuleDTO rule : priceRulesList) {
+//            AppSitePriceRules appSitePriceRules = new AppSitePriceRules();
+//            BeanUtils.copyProperties(rule, appSitePriceRules);
+//            appSitePriceRules.setSiteId(site.getId());
+//            appSitePriceRules.setOrgCode(site.getOrgCode());
+//            appSitePriceRules.setTenantId(site.getTenantId());
+//            int savePriceResult = priceRulesMapper.updateById(appSitePriceRules); // 保证每个操作都在事务中
+//            if (savePriceResult < 1) {
+//                throw new JeecgBootException("场地价格规则保存失败", SC_INTERNAL_SERVER_ERROR_500);
+//            }
+//        }
+//
+//        return Boolean.TRUE;
+//    }
+//
+//    @Override
+//    public AppSiteDTO queryWitchPriceRulesById(String id) {
+//        AppSite dbSite = baseMapper.selectById(id);
+//        if (null==dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
+//        AppSiteCuDTO appSiteCuDTO = new AppSiteCuDTO();
+//        BeanUtils.copyProperties(dbSite, appSiteCuDTO);
+//        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+////        checkPermission(dbSite,sysUser);
+//        List<AppSitePriceRules> priceRulesList = priceRulesMapper.selectList(Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSiteId, id));
+//        List<AppSiteRuleDTO> priceRulesDTOList = new ArrayList<>();
+//        priceRulesList.forEach(rule-> {
+//            AppSiteRuleDTO appSiteRuleDTO = new AppSiteRuleDTO();
+//            BeanUtils.copyProperties(rule, appSiteRuleDTO);
+//            priceRulesDTOList.add(appSiteRuleDTO);
+//        });
+//        return new AppSiteDTO(appSiteCuDTO,priceRulesDTOList);
+//    }
+//
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Boolean deleteWitchPriceRulesById(String id) {
+//        AppSite dbSite = baseMapper.selectById(id);
+//        if (null==dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
+//        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+////        checkPermission(dbSite,sysUser);
+//        int deleteSiteResult = baseMapper.deleteById(id);
+//        if (deleteSiteResult>0){
+//            int deletePriceResult = priceRulesMapper.delete(Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSiteId, id));
+//            if (deletePriceResult<1) throw new JeecgBootException("场地价格规则删除失败", SC_INTERNAL_SERVER_ERROR_500);
+//        }else{
+//            throw new JeecgBootException("场地信息删除失败", SC_INTERNAL_SERVER_ERROR_500);
+//        }
+//        return Boolean.TRUE;
+//    }
+//
+//    @Override
+//    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());
+//        IPage<AppSite> resultPage = baseMapper.selectPage(page, wrapper);
+//
+//        return resultPage.convert(record -> {
+//            AppSiteCuDTO cuDTO = new AppSiteCuDTO();
+//            BeanUtils.copyProperties(record, cuDTO);
+//            List<AppSitePriceRules> priceRulesList = priceRulesMapper.selectList(
+//                    Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSiteId, record.getId()));
+//            List<AppSiteRuleDTO> priceRulesDTOList = new ArrayList<>();
+//            priceRulesList.forEach(rule-> {
+//                AppSiteRuleDTO appSiteRuleDTO = new AppSiteRuleDTO();
+//                BeanUtils.copyProperties(rule, appSiteRuleDTO);
+//                priceRulesDTOList.add(appSiteRuleDTO);
+//            });
+//
+//            return new AppSiteDTO(cuDTO, priceRulesDTOList);
+//        });
+//    }
+//
+//    /**
+//     * 权限校验
+//     * @param site
+//     * @param sysUser
+//     */
+//    private void checkPermission(AppSite site,LoginUser sysUser ){
+//        if (!sysUser.getOrgCode().equals(site.getOrgCode())) throw new JeecgBootException("无权限操作", SC_INTERNAL_SERVER_ERROR_500);
+//    }
 }