zouxuan před 1 rokem
rodič
revize
7c62190f79

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupCategoryServiceImpl.java

@@ -28,7 +28,7 @@ public class VipGroupCategoryServiceImpl extends BaseServiceImpl<Integer, VipGro
 
 	@Override
 	public List<VipGroupCategory> findAllByOrgan(String organId, String groupType) {
-		if (CourseSchedule.CourseScheduleType.LIVE.getCode().equals(groupType)) {
+		if ("live".equals(groupType)) {
 			return vipGroupCategoryDao.findAllByOrgan1(organId, groupType);
 		}else {
 			return vipGroupCategoryDao.findAllByOrgan(groupType);

+ 7 - 2
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupCategoryController.java

@@ -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));
 	}