|
@@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -77,11 +78,25 @@ public class VipGroupCategoryController extends BaseController {
|
|
|
@ApiOperation("新增")
|
|
|
@PostMapping(value = "/add")
|
|
|
public Object add(VipGroupCategory vipGroupCategory) {
|
|
|
+
|
|
|
+ // 设置默认值
|
|
|
+ if (StringUtils.isBlank(vipGroupCategory.getGroupType())) {
|
|
|
+ vipGroupCategory.setGroupType("VIP");
|
|
|
+ }
|
|
|
+
|
|
|
Date date = new Date();
|
|
|
vipGroupCategory.setCreateTime(date);
|
|
|
vipGroupCategory.setUpdateTime(date);
|
|
|
vipGroupCategory.setDelFlag("0");
|
|
|
- vipGroupCategoryService.insert(vipGroupCategory);
|
|
|
+
|
|
|
+ // 课程分类编号
|
|
|
+ long vipCategoryId = vipGroupCategoryService.insert(vipGroupCategory);
|
|
|
+
|
|
|
+ // 直播流程,主动添加购买价格
|
|
|
+ if (CourseSchedule.CourseScheduleType.LIVE.getCode().equals(vipGroupCategory.getGroupType())) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return succeed();
|
|
|
}
|
|
|
|