|
@@ -14,10 +14,8 @@ import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.jeecg.modules.app.form.ClassPostponeForm;
|
|
|
import org.jeecg.modules.app.form.CourseQueryUsersForm;
|
|
|
-import org.jeecg.modules.app.vo.FamilyUserVO;
|
|
|
-import org.jeecg.modules.app.vo.ScanCodeQueryOrderVO;
|
|
|
-import org.jeecg.modules.app.vo.VerifyCourseInfoVO;
|
|
|
-import org.jeecg.modules.system.app.entity.AppCourses;
|
|
|
+import org.jeecg.modules.app.service.IAppIsinService;
|
|
|
+import org.jeecg.modules.app.vo.*;
|
|
|
import org.jeecg.modules.system.app.entity.AppCoursesPriceRules;
|
|
|
import org.jeecg.modules.system.app.entity.AppCoursesVerificationRecord;
|
|
|
import org.jeecg.modules.system.app.entity.FamilyMembers;
|
|
@@ -44,6 +42,8 @@ public class CommercialController {
|
|
|
|
|
|
private final IFamilyMembersService familyMembersService;
|
|
|
|
|
|
+ private final IAppIsinService appIsinService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询部门下的课程
|
|
|
*
|
|
@@ -54,11 +54,18 @@ public class CommercialController {
|
|
|
*/
|
|
|
@Operation(summary = "查询部门下的课程 ")
|
|
|
@GetMapping("/getPageCourse")
|
|
|
- public Result<IPage<AppCourses>> getPageCourse(@Schema(description = "部门编号") @RequestParam(name = "orgCode") String orgCode,
|
|
|
- @Schema(description = "页数") @RequestParam(name = "pageNo") Integer pageNo,
|
|
|
- @Schema(description = "条数") @RequestParam(name = "pageSize") Integer pageSize) {
|
|
|
- Page<AppCourses> page = new Page<AppCourses>(pageNo, pageSize);
|
|
|
- IPage<AppCourses> pageList = appCoureseService.page(page, Wrappers.<AppCourses>lambdaQuery().eq(AppCourses::getOrgCode, orgCode));
|
|
|
+ public Result<IPage<AppCoursesPageVO>> getPageCourse(@Schema(description = "部门编号") @RequestParam(name = "orgCode") String orgCode,
|
|
|
+ @Schema(description = "页数") @RequestParam(name = "pageNo") Integer pageNo,
|
|
|
+ @Schema(description = "条数") @RequestParam(name = "pageSize") Integer pageSize) {
|
|
|
+ LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ String userId = null;
|
|
|
+ //如果是教练
|
|
|
+ String roleCode = loginUser.getRoleCode();
|
|
|
+ if (roleCode.contains("instructor")) {
|
|
|
+ userId = loginUser.getId();
|
|
|
+ }
|
|
|
+ Page<AppCoursesPageVO> page = new Page<>(pageNo, pageSize);
|
|
|
+ IPage<AppCoursesPageVO> pageList = appCoureseService.getPageCourse(page,orgCode,userId);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
|
|
@@ -125,7 +132,7 @@ public class CommercialController {
|
|
|
* @return
|
|
|
*/
|
|
|
@Operation(summary = "临时约课")
|
|
|
- @GetMapping("/temporaryCourse")
|
|
|
+ @PutMapping("/temporaryCourse")
|
|
|
public Result<Boolean> temporaryCourse(@Schema(description = "课时ID") @RequestParam(name = "coursePriceRulesId") String coursePriceRulesId,
|
|
|
@Schema(description = "学生ID") @RequestParam(name = "userId") String userId) {
|
|
|
return Result.OK(appCoureseService.temporaryCourse(coursePriceRulesId, userId));
|
|
@@ -174,7 +181,7 @@ public class CommercialController {
|
|
|
* @return
|
|
|
*/
|
|
|
@Operation(summary = "扫码核销确认")
|
|
|
- @GetMapping("/scanCodeVerification")
|
|
|
+ @PutMapping("/scanCodeVerification")
|
|
|
public Result<Boolean> scanCodeVerification(@RequestBody List<String> orderProInfoIds) {
|
|
|
return Result.OK(appOrderService.scanCodeVerification(orderProInfoIds));
|
|
|
}
|
|
@@ -187,7 +194,39 @@ public class CommercialController {
|
|
|
@GetMapping("/queryMakeUpClassTable")
|
|
|
public Result<List<AppCoursesPriceRules>> queryMakeUpClassTable() {
|
|
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
- List<AppCoursesPriceRules> list = appCoursesPriceRulesService.list(Wrappers.<AppCoursesPriceRules>lambdaQuery().eq(AppCoursesPriceRules::getCoursesType, 1).eq(AppCoursesPriceRules::getOrgCode, loginUser.getOrgCode()));
|
|
|
+ List<AppCoursesPriceRules> list = appCoursesPriceRulesService.list(Wrappers.<AppCoursesPriceRules>lambdaQuery()
|
|
|
+ .eq(AppCoursesPriceRules::getCoursesType, 1)
|
|
|
+ .eq(AppCoursesPriceRules::getOrgCode, loginUser.getOrgCode()));
|
|
|
return Result.OK(list);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询部门下的核销记录
|
|
|
+ *
|
|
|
+ * @param pageNo
|
|
|
+ * @param pageSize
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Operation(summary = "查询部门下的使用核销记录 ")
|
|
|
+ @GetMapping("/pageAppIsinVerifyRecords")
|
|
|
+ public Result<IPage<AppIsinVerifyVO>> pageAppIsinVerifyRecords(@Schema(description = "页数") @RequestParam(name = "pageNo") Integer pageNo,
|
|
|
+ @Schema(description = "条数") @RequestParam(name = "pageSize") Integer pageSize) {
|
|
|
+ LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ String orgCode = loginUser.getOrgCode();
|
|
|
+ Page<AppIsinVerifyVO> page = new Page<>(pageNo, pageSize);
|
|
|
+ Page<AppIsinVerifyVO> pageList = appIsinService.pageAppIsinVerifyRecords(page, orgCode);
|
|
|
+ return Result.OK(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 使用核销记录撤销
|
|
|
+ *
|
|
|
+ * @param appIsinId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Operation(summary = "使用核销记录撤销 ")
|
|
|
+ @PutMapping("/repealVerifyRecord")
|
|
|
+ public Result<String> repealVerifyRecord(@Schema(description = "appIsinId") @RequestParam(name = "appIsinId") String appIsinId) {
|
|
|
+ return Result.OK(appIsinService.repealVerifyRecord(appIsinId));
|
|
|
+ }
|
|
|
}
|