|
@@ -0,0 +1,75 @@
|
|
|
+package com.yonge.cooleshow.admin.controller;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
+import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.req.AuthOperaReq;
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.search.AuthEntryRecordSearch;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.TeacherAuthMusicianRecord;
|
|
|
+import com.yonge.cooleshow.biz.dal.service.TeacherAuthMusicianRecordService;
|
|
|
+import com.yonge.cooleshow.biz.dal.support.Condition;
|
|
|
+import com.yonge.cooleshow.biz.dal.support.Query;
|
|
|
+import com.yonge.cooleshow.biz.dal.vo.MusicianAuthEntryRecordVo;
|
|
|
+import com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo;
|
|
|
+import com.yonge.cooleshow.common.controller.BaseController;
|
|
|
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
+import com.yonge.cooleshow.common.page.PageInfo;
|
|
|
+import com.yonge.toolset.utils.string.StringUtil;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/TeacherAuthMusicianRecord")
|
|
|
+@Api(value = "老师音乐人审核表", tags = "老师音乐人审核表")
|
|
|
+public class TeacherAuthMusicianRecordController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TeacherAuthMusicianRecordService teacherAuthMusicianRecordService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询分页
|
|
|
+ */
|
|
|
+ @GetMapping("/page")
|
|
|
+ @ApiOperation(value = "查询分页", notes = "传入AuthEntryRecordSearch")
|
|
|
+ public HttpResponseResult<PageInfo<MusicianAuthEntryRecordVo>> page(AuthEntryRecordSearch search, Query query) {
|
|
|
+ IPage<MusicianAuthEntryRecordVo> pages = teacherAuthMusicianRecordService.selectPage(Condition.getPage(query), search);
|
|
|
+ return succeed(Condition.pageInfo(pages));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询单条详情
|
|
|
+ */
|
|
|
+ @GetMapping("/detail")
|
|
|
+ @ApiOperation(value = "详情", notes = "传入teacherAuthEntryRecord")
|
|
|
+ public HttpResponseResult<MusicianAuthEntryRecordVo> detail(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
|
|
|
+ MusicianAuthEntryRecordVo detail = teacherAuthMusicianRecordService.detail(id);
|
|
|
+ return succeed(detail);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/doAuth")
|
|
|
+ @ApiOperation(value = "审核", notes = "传入authOperaDto")
|
|
|
+ public HttpResponseResult<Boolean> doAuth(@Valid @RequestBody AuthOperaReq authOperaReq) throws Exception {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ return teacherAuthMusicianRecordService.doAuth(authOperaReq, sysUser);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除
|
|
|
+ */
|
|
|
+ @PostMapping("/remove")
|
|
|
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
|
|
|
+ public HttpResponseResult remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
+ if (StringUtil.isEmpty(ids)) {
|
|
|
+ return failed("参数不能为空");
|
|
|
+ }
|
|
|
+ return status(teacherAuthMusicianRecordService.removeByIds(StringUtil.toLongList(ids)));
|
|
|
+ }
|
|
|
+}
|