|
@@ -3,15 +3,9 @@ package com.ym.mec.student.controller;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
-import com.ym.mec.biz.dal.dto.ActivityPayParamDto;
|
|
|
-import com.ym.mec.biz.dal.dto.ActivityQueryDto;
|
|
|
-import com.ym.mec.biz.dal.dto.BuyDoubleEleven2022Dto;
|
|
|
-import com.ym.mec.biz.dal.dto.ConditionDto;
|
|
|
+import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
-import com.ym.mec.biz.service.MarketActivityService;
|
|
|
-import com.ym.mec.biz.service.SporadicChargeInfoService;
|
|
|
-import com.ym.mec.biz.service.SysUserService;
|
|
|
-import com.ym.mec.biz.service.VipGroupActivityService;
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
@@ -19,7 +13,10 @@ import com.yonge.log.model.AuditLogAnnotation;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -51,6 +48,10 @@ public class ActivityController extends BaseController {
|
|
|
private VipGroupDao vipGroupDao;
|
|
|
@Autowired
|
|
|
private VipGroupCategoryDao vipGroupCategoryDao;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupPlanMakingService musicGroupPlanMakingService;
|
|
|
+ @Autowired
|
|
|
+ private SubjectService subjectService;
|
|
|
|
|
|
@ApiOperation("活动购买")
|
|
|
@PostMapping(value = "/buy")
|
|
@@ -203,6 +204,25 @@ public class ActivityController extends BaseController {
|
|
|
return succeed(vipGroupActivity);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "查询乐团编制")
|
|
|
+ @GetMapping(value = "/querySubject", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
+ public HttpResponseResult<MusicGroupPlanMakingDto> query(Integer id) throws Exception {
|
|
|
+ MusicGroupPlanMaking pm = musicGroupPlanMakingService.get(id);
|
|
|
+
|
|
|
+ if (pm != null) {
|
|
|
+ MusicGroupPlanMakingDto dto = new MusicGroupPlanMakingDto();
|
|
|
+
|
|
|
+ BeanUtils.copyProperties(pm, dto);
|
|
|
+
|
|
|
+ List<Subject> subjectList = subjectService.findBySubjectByIdList(pm.getSubjectIdList());
|
|
|
+ if (subjectList != null) {
|
|
|
+ dto.setSubjectMap(subjectList.stream().collect(Collectors.toMap(Subject::getId, Subject::getName)));
|
|
|
+ }
|
|
|
+ return succeed(dto);
|
|
|
+ }
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "根据课程类型获取对应课程活动方案")
|
|
|
@GetMapping("/findByVipGroupCategory")
|
|
|
public HttpResponseResult<List<VipGroupActivity>> findByVipGroupCategory(){
|