|
@@ -3,6 +3,8 @@ package com.ym.mec.web.controller;
|
|
|
import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
|
import com.ym.mec.biz.dal.entity.VipGroupCategory;
|
|
|
import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice;
|
|
|
+import com.ym.mec.biz.service.EmployeeService;
|
|
|
+import com.ym.mec.biz.service.OrganizationService;
|
|
|
import com.ym.mec.biz.service.VipGroupCategoryService;
|
|
|
import com.ym.mec.biz.service.VipGroupDefaultClassesUnitPriceService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
@@ -30,6 +32,8 @@ import java.util.stream.Collectors;
|
|
|
public class VipGroupCategoryController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
+ private OrganizationService organizationService;
|
|
|
+ @Autowired
|
|
|
private VipGroupCategoryService vipGroupCategoryService;
|
|
|
@Autowired
|
|
|
private VipGroupDefaultClassesUnitPriceService vipGroupDefaultClassesUnitPriceService;
|
|
@@ -47,12 +51,13 @@ public class VipGroupCategoryController extends BaseController {
|
|
|
@ApiImplicitParam(name = "groupType", value = "课程类型", dataType = "String", paramType = "query", defaultValue = "VIP"),
|
|
|
|
|
|
})
|
|
|
+
|
|
|
@GetMapping(value = "/queryAll")
|
|
|
@PreAuthorize("@pcs.hasPermissions('vipGroupCategory/queryAll')")
|
|
|
public Object queryAll(String organId,@RequestParam(defaultValue = "VIP") String groupType) {
|
|
|
// 直播课强制转换为
|
|
|
- if (CourseSchedule.CourseScheduleType.LIVE.getCode().equals(groupType)) {
|
|
|
- organId = String.valueOf(TenantContextHolder.getTenantId());
|
|
|
+ if ("live".equals(groupType)) {
|
|
|
+ organId = organizationService.getEmployeeOrgan(null);
|
|
|
}
|
|
|
return succeed(vipGroupCategoryService.findAllByOrgan(organId, groupType));
|
|
|
}
|