|
@@ -9,6 +9,7 @@ import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.biz.dal.dto.AuthOperaDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.AuthOperaDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.RealnameAuthDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.RealnameAuthDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.TeacherApplyDetailDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.TeacherApplyDetailDto;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.req.TeacherAuthEntryRecordSearch;
|
|
import com.yonge.cooleshow.biz.dal.support.Condition;
|
|
import com.yonge.cooleshow.biz.dal.support.Condition;
|
|
import com.yonge.cooleshow.biz.dal.support.Query;
|
|
import com.yonge.cooleshow.biz.dal.support.Query;
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo;
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo;
|
|
@@ -22,15 +23,14 @@ import com.yonge.toolset.utils.string.StringUtil;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
-import lombok.AllArgsConstructor;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord;
|
|
|
|
import com.yonge.cooleshow.biz.dal.service.TeacherAuthEntryRecordService;
|
|
import com.yonge.cooleshow.biz.dal.service.TeacherAuthEntryRecordService;
|
|
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
+
|
|
@RestController
|
|
@RestController
|
|
-@AllArgsConstructor
|
|
|
|
@RequestMapping("/TeacherAuthEntryRecord")
|
|
@RequestMapping("/TeacherAuthEntryRecord")
|
|
@Api(value = "老师入驻审核表", tags = "老师入驻审核表")
|
|
@Api(value = "老师入驻审核表", tags = "老师入驻审核表")
|
|
public class TeacherAuthEntryRecordController extends BaseController {
|
|
public class TeacherAuthEntryRecordController extends BaseController {
|
|
@@ -44,7 +44,7 @@ public class TeacherAuthEntryRecordController extends BaseController {
|
|
@PostMapping("/realnameAuth")
|
|
@PostMapping("/realnameAuth")
|
|
@ApiOperation(value = "实名认证", notes = "传入realnameAuthDto")
|
|
@ApiOperation(value = "实名认证", notes = "传入realnameAuthDto")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- public HttpResponseResult<IdcardInfoExtractor> realnameAuth(@RequestBody RealnameAuthDto realnameAuthDto) {
|
|
|
|
|
|
+ public HttpResponseResult<IdcardInfoExtractor> realnameAuth(@Valid @RequestBody RealnameAuthDto realnameAuthDto) {
|
|
IdcardValidator idcardValidator = new IdcardValidator();
|
|
IdcardValidator idcardValidator = new IdcardValidator();
|
|
//验证身份证号合法性
|
|
//验证身份证号合法性
|
|
boolean validatedAllIdcard = idcardValidator.isValidatedAllIdcard(realnameAuthDto.getIdcardNo());
|
|
boolean validatedAllIdcard = idcardValidator.isValidatedAllIdcard(realnameAuthDto.getIdcardNo());
|
|
@@ -63,7 +63,7 @@ public class TeacherAuthEntryRecordController extends BaseController {
|
|
|
|
|
|
@PostMapping("/doApply")
|
|
@PostMapping("/doApply")
|
|
@ApiOperation(value = "提交申请", notes = "传入teacherAuthEntryRecord")
|
|
@ApiOperation(value = "提交申请", notes = "传入teacherAuthEntryRecord")
|
|
- public HttpResponseResult<Boolean> doApply(TeacherApplyDetailDto teacherApplyDetailDto) throws Exception{
|
|
|
|
|
|
+ public HttpResponseResult<Boolean> doApply(@Valid @RequestBody TeacherApplyDetailDto teacherApplyDetailDto) throws Exception{
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
//处理老师申请逻辑
|
|
//处理老师申请逻辑
|
|
return teacherAuthEntryRecordService.doApply(teacherApplyDetailDto, sysUser);
|
|
return teacherAuthEntryRecordService.doApply(teacherApplyDetailDto, sysUser);
|
|
@@ -74,8 +74,8 @@ public class TeacherAuthEntryRecordController extends BaseController {
|
|
*/
|
|
*/
|
|
@GetMapping("/page")
|
|
@GetMapping("/page")
|
|
@ApiOperation(value = "查询分页", notes = "传入teacherAuthEntryRecord")
|
|
@ApiOperation(value = "查询分页", notes = "传入teacherAuthEntryRecord")
|
|
- public HttpResponseResult<PageInfo<TeacherAuthEntryRecordVo>> page(TeacherAuthEntryRecord teacherAuthEntryRecord, Query query) {
|
|
|
|
- IPage<TeacherAuthEntryRecordVo> pages = teacherAuthEntryRecordService.selectPage(Condition.getPage(query), teacherAuthEntryRecord);
|
|
|
|
|
|
+ public HttpResponseResult<PageInfo<TeacherAuthEntryRecordVo>> page(TeacherAuthEntryRecordSearch search, Query query) {
|
|
|
|
+ IPage<TeacherAuthEntryRecordVo> pages = teacherAuthEntryRecordService.selectPage(Condition.getPage(query), search);
|
|
return succeed(Condition.pageInfo(pages));
|
|
return succeed(Condition.pageInfo(pages));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -92,7 +92,7 @@ public class TeacherAuthEntryRecordController extends BaseController {
|
|
|
|
|
|
@PostMapping("/doAuth")
|
|
@PostMapping("/doAuth")
|
|
@ApiOperation(value = "审核", notes = "传入authOperaDto")
|
|
@ApiOperation(value = "审核", notes = "传入authOperaDto")
|
|
- public HttpResponseResult<Boolean> doAuth(AuthOperaDto authOperaDto) throws Exception{
|
|
|
|
|
|
+ public HttpResponseResult<Boolean> doAuth(@Valid AuthOperaDto authOperaDto) throws Exception{
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
return teacherAuthEntryRecordService.doAuth(authOperaDto, sysUser);
|
|
return teacherAuthEntryRecordService.doAuth(authOperaDto, sysUser);
|
|
}
|
|
}
|
|
@@ -108,4 +108,6 @@ public class TeacherAuthEntryRecordController extends BaseController {
|
|
}
|
|
}
|
|
return status(teacherAuthEntryRecordService.removeByIds(StringUtil.toLongList(ids)));
|
|
return status(teacherAuthEntryRecordService.removeByIds(StringUtil.toLongList(ids)));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|