|
@@ -0,0 +1,114 @@
|
|
|
+package com.ym.mec.student.controller;
|
|
|
+
|
|
|
+import com.ym.mec.biz.dal.dto.TempLittleArtistTrainingCampDto;
|
|
|
+import com.ym.mec.biz.dal.entity.ImGroup;
|
|
|
+import com.ym.mec.biz.dal.entity.TempLittleArtistTrainingCamp;
|
|
|
+import com.ym.mec.biz.dal.vo.TempCampUserTrainingDetailVo;
|
|
|
+import com.ym.mec.biz.dal.vo.TempCampUserVo;
|
|
|
+import com.ym.mec.biz.dal.vo.TempUserTrainingTimeDetailVo;
|
|
|
+import com.ym.mec.biz.service.TempLittleArtistTrainingCampService;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
+import io.swagger.annotations.*;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 小小艺术家训练营活动(TempLittleArtistTrainingCamp)表控制层
|
|
|
+ *
|
|
|
+ * @author hgw
|
|
|
+ * @since 2022-05-17 20:56:22
|
|
|
+ */
|
|
|
+@Api(tags = "小小艺术家训练营活动")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/tempLittleArtistTrainingCamp")
|
|
|
+public class TempLittleArtistTrainingCampController extends BaseController {
|
|
|
+ /**
|
|
|
+ * 服务对象
|
|
|
+ */
|
|
|
+ @Resource
|
|
|
+ private TempLittleArtistTrainingCampService tempLittleArtistTrainingCampService;
|
|
|
+
|
|
|
+ @ApiOperation("添加训练营")
|
|
|
+ @PostMapping(value = "/add")
|
|
|
+ public HttpResponseResult<Object> add(@Valid @RequestBody TempLittleArtistTrainingCampDto dto) {
|
|
|
+ tempLittleArtistTrainingCampService.add(dto);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("修改训练营")
|
|
|
+ @PostMapping(value = "/update")
|
|
|
+ public HttpResponseResult<Object> update(@Valid @RequestBody TempLittleArtistTrainingCampDto dto) {
|
|
|
+ tempLittleArtistTrainingCampService.update(dto);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("修改机构启用停用状态")
|
|
|
+ @GetMapping(value = "/delete/{id}")
|
|
|
+ public HttpResponseResult<Object> opsState(@ApiParam(value = "训练营ID", required = true) @PathVariable("id") Integer id) {
|
|
|
+ tempLittleArtistTrainingCampService.delete(id);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "name", dataType = "String", value = "训练营标题-模糊搜索"),
|
|
|
+ @ApiImplicitParam(name = "state", dataType = "String", value = "筹备中 READY,报名中 APPLY,未开始 NOT_START,进行中 ING,已结束 END"),
|
|
|
+ @ApiImplicitParam(name = "applyStartDate", dataType = "String", value = "申请报名登记开始日期-年月日"),
|
|
|
+ @ApiImplicitParam(name = "applyEndDate", dataType = "String", value = "申请报名登记结束日期-年月日"),
|
|
|
+ @ApiImplicitParam(name = "trainStartDate", dataType = "String", value = "训练开始日期-年月日"),
|
|
|
+ @ApiImplicitParam(name = "trainEndDate", dataType = "String", value = "训练结束日期-年月日"),
|
|
|
+ @ApiImplicitParam(name = "page", dataType = "Integer", required = true, value = "页数"),
|
|
|
+ @ApiImplicitParam(name = "rows", dataType = "Integer", required = true, value = "每页数量"),
|
|
|
+ })
|
|
|
+ @ApiOperation("分页查询-训练营列表")
|
|
|
+ @PostMapping(value = "/queryPageTrainingCamp")
|
|
|
+ public HttpResponseResult<PageInfo<TempLittleArtistTrainingCamp>> queryPageTrainingCamp(@RequestBody Map<String, Object> param) {
|
|
|
+ return succeed(tempLittleArtistTrainingCampService.queryPageTrainingCamp(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "search", dataType = "String", value = "学员姓名/手机号/编号-模糊搜索"),
|
|
|
+ @ApiImplicitParam(name = "state", dataType = "String", value = "状态:未报名NOT_APPLY ,已报名 APPLY"),
|
|
|
+ @ApiImplicitParam(name = "page", dataType = "Integer", required = true, value = "页数"),
|
|
|
+ @ApiImplicitParam(name = "rows", dataType = "Integer", required = true, value = "每页数量"),
|
|
|
+ })
|
|
|
+ @ApiOperation("分页查询-参与名单")
|
|
|
+ @PostMapping(value = "/queryPageTrainingCampUser")
|
|
|
+ public HttpResponseResult<PageInfo<TempCampUserVo>> queryPageTrainingCampUser(@RequestBody Map<String, Object> param) {
|
|
|
+ return succeed(tempLittleArtistTrainingCampService.queryPageTrainingCampUser(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "userId", dataType = "Integer", required = true, value = "用户id"),
|
|
|
+ })
|
|
|
+ @ApiOperation("查询指定学生-训练营每日训练时长")
|
|
|
+ @PostMapping(value = "/queryUserTrainingTime")
|
|
|
+ public HttpResponseResult<List<TempUserTrainingTimeDetailVo>> queryUserTrainingTime(@RequestBody Map<String, Object> param) {
|
|
|
+ return succeed(tempLittleArtistTrainingCampService.queryUserTrainingTime(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "search", dataType = "String", value = "学员姓名/手机号/编号-模糊搜索"),
|
|
|
+ @ApiImplicitParam(name = "imGroupId", dataType = "Integer", value = "所在群组Id"),
|
|
|
+ @ApiImplicitParam(name = "page", dataType = "Integer", required = true, value = "页数"),
|
|
|
+ @ApiImplicitParam(name = "rows", dataType = "Integer", required = true, value = "每页数量"),
|
|
|
+ })
|
|
|
+ @ApiOperation("分页查询-训练营详情")
|
|
|
+ @PostMapping(value = "/queryUserTrainingDetail")
|
|
|
+ public HttpResponseResult<PageInfo<TempCampUserTrainingDetailVo>> queryUserTrainingDetail(@RequestBody Map<String, Object> param){
|
|
|
+ return succeed(tempLittleArtistTrainingCampService.queryUserTrainingDetail(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("根据群组Id查询群组信息")
|
|
|
+ @GetMapping(value = "/queryCampImGroup")
|
|
|
+ public HttpResponseResult<List<ImGroup>> queryCampImGroup(@ApiParam(value = "群组id,多个用逗号隔开 imGroupIds", required = true) String imGroupIds){
|
|
|
+ return succeed(tempLittleArtistTrainingCampService.queryCampImGroup(imGroupIds));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|