|
@@ -6,6 +6,7 @@ import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice;
|
|
|
import com.ym.mec.biz.service.VipGroupCategoryService;
|
|
|
import com.ym.mec.biz.service.VipGroupDefaultClassesUnitPriceService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.tenant.TenantContextHolder;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -46,6 +47,12 @@ public class VipGroupCategoryController extends BaseController {
|
|
|
@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());
|
|
|
+ }
|
|
|
+
|
|
|
return succeed(vipGroupCategoryService.findAllByOrgan(organId, groupType));
|
|
|
}
|
|
|
|
|
@@ -84,7 +91,7 @@ public class VipGroupCategoryController extends BaseController {
|
|
|
if (CourseSchedule.CourseScheduleType.LIVE.getCode().equals(vipGroupCategory.getGroupType())) {
|
|
|
|
|
|
VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = new VipGroupDefaultClassesUnitPrice();
|
|
|
- vipGroupDefaultClassesUnitPrice.setOrganId(-1);
|
|
|
+ vipGroupDefaultClassesUnitPrice.setOrganId(vipGroupCategory.getTenantId());
|
|
|
vipGroupDefaultClassesUnitPrice.setVipGroupCategoryId(vipGroupCategory.getId());
|
|
|
vipGroupDefaultClassesUnitPrice.setGroupType(vipGroupCategory.getGroupType());
|
|
|
vipGroupDefaultClassesUnitPrice.setCreateTime(DateTime.now().toDate());
|