|
|
@ -18,8 +18,10 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@Api(description = "伴宠师-伴宠师考核") |
|
|
|
@RestController |
|
|
@ -77,14 +79,14 @@ public class ApiAppletExaminationController { |
|
|
|
return AjaxResult.success("题目列表数据",questionList); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-根据题目id查询题目答案") |
|
|
|
@GetMapping("/insertUser") |
|
|
|
public AjaxResult answerListByQuestionId(long questionId){ |
|
|
|
AppletAnswer appletAnswer = new AppletAnswer(); |
|
|
|
appletAnswer.setQuestionId(questionId); |
|
|
|
List<AppletAnswer> answerList = appletAnswerService.selectAppletAnswerList(appletAnswer); |
|
|
|
return AjaxResult.success("答案列表数据",answerList); |
|
|
|
} |
|
|
|
// @ApiOperation("伴宠师工作台-根据题目id查询题目答案") |
|
|
|
// @GetMapping("/insertUser") |
|
|
|
// public AjaxResult answerListByQuestionId(long questionId){ |
|
|
|
// AppletAnswer appletAnswer = new AppletAnswer(); |
|
|
|
// appletAnswer.setQuestionId(questionId); |
|
|
|
// List<AppletAnswer> answerList = appletAnswerService.selectAppletAnswerList(appletAnswer); |
|
|
|
// return AjaxResult.success("答案列表数据",answerList); |
|
|
|
// } |
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-查询宠物类型列表") |
|
|
|
@GetMapping("/petTypeList") |
|
|
@ -100,12 +102,12 @@ public class ApiAppletExaminationController { |
|
|
|
return AjaxResult.success("专业执照列表数据",licenseList); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-查询用户基本考核答案列表") |
|
|
|
@PostMapping("/answerBaseList") |
|
|
|
public AjaxResult answerBaseList(@RequestBody AppletAnswerBase answerBase){ |
|
|
|
List<AppletAnswerBase> answerBaseList = appletAnswerBaseService.selectAppletAnswerBaseList(answerBase); |
|
|
|
return AjaxResult.success("用户基本考核答案列表数据",answerBaseList); |
|
|
|
} |
|
|
|
// @ApiOperation("伴宠师工作台-查询用户基本考核答案列表") |
|
|
|
// @PostMapping("/answerBaseList") |
|
|
|
// public AjaxResult answerBaseList(@RequestBody AppletAnswerBase answerBase){ |
|
|
|
// List<AppletAnswerBase> answerBaseList = appletAnswerBaseService.selectAppletAnswerBaseList(answerBase); |
|
|
|
// return AjaxResult.success("用户基本考核答案列表数据",answerBaseList); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -133,26 +135,41 @@ public class ApiAppletExaminationController { |
|
|
|
// } |
|
|
|
|
|
|
|
//查询基本考核是否完成 |
|
|
|
@ApiOperation("伴宠师工作台-查询用户基本考核是否完成【废弃】") |
|
|
|
@GetMapping("/answeBaseIsFinish") |
|
|
|
public AjaxResult answeBaseIsFinish(Long userId){ |
|
|
|
AppletAnswerBase answerBase = new AppletAnswerBase(); |
|
|
|
answerBase.setUserId(userId); |
|
|
|
List<AppletAnswerBase> answerBaseList = appletAnswerBaseService.selectAppletAnswerBaseList(answerBase); |
|
|
|
if(answerBaseList.size() > 0){ |
|
|
|
return AjaxResult.success("用户基本考核已完成"); |
|
|
|
} |
|
|
|
return AjaxResult.error("用户基本考核未完成"); |
|
|
|
} |
|
|
|
// @ApiOperation("伴宠师工作台-查询用户基本考核是否完成【废弃】") |
|
|
|
// @GetMapping("/answeBaseIsFinish") |
|
|
|
// public AjaxResult answeBaseIsFinish(Long userId){ |
|
|
|
// AppletAnswerBase answerBase = new AppletAnswerBase(); |
|
|
|
// answerBase.setUserId(userId); |
|
|
|
// List<AppletAnswerBase> answerBaseList = appletAnswerBaseService.selectAppletAnswerBaseList(answerBase); |
|
|
|
// if(answerBaseList.size() > 0){ |
|
|
|
// return AjaxResult.success("用户基本考核已完成"); |
|
|
|
// } |
|
|
|
// return AjaxResult.error("用户基本考核未完成"); |
|
|
|
// } |
|
|
|
|
|
|
|
//查询基本考核是否完成 |
|
|
|
@ApiOperation("伴宠师工作台-查询用户基本考核是否完成") |
|
|
|
@GetMapping("/answeBaseIsFinishV2") |
|
|
|
public AjaxResult answeBaseIsFinishV2(Long userId){ |
|
|
|
AppletAnswerBase answerBase = new AppletAnswerBase(); |
|
|
|
answerBase.setUserId(userId); |
|
|
|
List<AppletAnswerBase> answerBaseList = appletAnswerBaseService.selectAppletAnswerBaseList(answerBase); |
|
|
|
if(answerBaseList.size() > 0){ |
|
|
|
|
|
|
|
List<Long> ids = appletQuestionService.lambdaQuery() |
|
|
|
.eq(AppletQuestion::getType, "基本") |
|
|
|
.select(AppletQuestion::getId) |
|
|
|
.list() |
|
|
|
.stream().map(n -> n.getId()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
Integer count = appletAnswerBaseService.lambdaQuery() |
|
|
|
.in(AppletAnswerBase::getQuestionId, ids) |
|
|
|
.eq(AppletAnswerBase::getUserId, userId) |
|
|
|
.count(); |
|
|
|
|
|
|
|
Integer count1 = appletAnswerTrainService.lambdaQuery() |
|
|
|
.in(AppletAnswerTrain::getQuestionId, ids) |
|
|
|
.eq(AppletAnswerTrain::getUserId, userId) |
|
|
|
.count(); |
|
|
|
|
|
|
|
if((count1 + count) > 0){ |
|
|
|
return AjaxResult.success(1); |
|
|
|
} |
|
|
|
return AjaxResult.success(0); |
|
|
@ -160,68 +177,84 @@ public class ApiAppletExaminationController { |
|
|
|
|
|
|
|
|
|
|
|
//查询培训考核是否完成 |
|
|
|
@ApiOperation("伴宠师工作台-查询用户培训考核是否完成【废弃】") |
|
|
|
@GetMapping("/answeTrainIsFinish") |
|
|
|
public AjaxResult answeTrainIsFinish(Long userId){ |
|
|
|
AppletAnswerTrain answerTrain = new AppletAnswerTrain(); |
|
|
|
answerTrain.setUserId(userId); |
|
|
|
List<AppletAnswerTrain> answerTrainList = appletAnswerTrainService.selectAppletAnswerTrainList(answerTrain); |
|
|
|
if(answerTrainList.size() > 0){ |
|
|
|
return AjaxResult.success("用户培训考核已完成"); |
|
|
|
} |
|
|
|
return AjaxResult.error("用户培训考核未完成"); |
|
|
|
} |
|
|
|
// @ApiOperation("伴宠师工作台-查询用户培训考核是否完成【废弃】") |
|
|
|
// @GetMapping("/answeTrainIsFinish") |
|
|
|
// public AjaxResult answeTrainIsFinish(Long userId){ |
|
|
|
// AppletAnswerTrain answerTrain = new AppletAnswerTrain(); |
|
|
|
// answerTrain.setUserId(userId); |
|
|
|
// List<AppletAnswerTrain> answerTrainList = appletAnswerTrainService.selectAppletAnswerTrainList(answerTrain); |
|
|
|
// if(answerTrainList.size() > 0){ |
|
|
|
// return AjaxResult.success("用户培训考核已完成"); |
|
|
|
// } |
|
|
|
// return AjaxResult.error("用户培训考核未完成"); |
|
|
|
// } |
|
|
|
//查询培训考核是否完成 |
|
|
|
@ApiOperation("伴宠师工作台-查询用户培训考核是否完成") |
|
|
|
@GetMapping("/answeTrainIsFinishV2") |
|
|
|
public AjaxResult answeTrainIsFinishV2(Long userId){ |
|
|
|
AppletAnswerTrain answerTrain = new AppletAnswerTrain(); |
|
|
|
answerTrain.setUserId(userId); |
|
|
|
List<AppletAnswerTrain> answerTrainList = appletAnswerTrainService.selectAppletAnswerTrainList(answerTrain); |
|
|
|
if(answerTrainList.size() > 0){ |
|
|
|
return AjaxResult.success(1); |
|
|
|
} |
|
|
|
return AjaxResult.success(0); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<Long> ids = appletQuestionService.lambdaQuery() |
|
|
|
.eq(AppletQuestion::getType, "培训") |
|
|
|
.select(AppletQuestion::getId) |
|
|
|
.list() |
|
|
|
.stream().map(n -> n.getId()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
Integer count = appletAnswerBaseService.lambdaQuery() |
|
|
|
.in(AppletAnswerBase::getQuestionId, ids) |
|
|
|
.eq(AppletAnswerBase::getUserId, userId) |
|
|
|
.count(); |
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-根据题目id查询基本考核答案") |
|
|
|
@GetMapping("/answeBaseByQuestionId") |
|
|
|
public AjaxResult answeBaseByQuestionId(Long questionId, Long userId){ |
|
|
|
AppletAnswerBase answerBase = new AppletAnswerBase(); |
|
|
|
answerBase.setQuestionId(questionId); |
|
|
|
answerBase.setUserId(userId); |
|
|
|
List<AppletAnswerBase> answerBaseList = appletAnswerBaseService.selectAppletAnswerBaseList(answerBase); |
|
|
|
Integer count1 = appletAnswerTrainService.lambdaQuery() |
|
|
|
.in(AppletAnswerTrain::getQuestionId, ids) |
|
|
|
.eq(AppletAnswerTrain::getUserId, userId) |
|
|
|
.count(); |
|
|
|
|
|
|
|
for (AppletAnswerBase appletAnswerBase : answerBaseList) { |
|
|
|
AppletAnswer answer = appletAnswerService.selectAppletAnswerById(appletAnswerBase.getAnswerId()); |
|
|
|
appletAnswerBase.setAnswer(answer); |
|
|
|
if((count1 + count) > 0){ |
|
|
|
return AjaxResult.success(1); |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success("用户基本考核答案列表数据",answerBaseList); |
|
|
|
return AjaxResult.success(0); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-添加用户基本考核答案") |
|
|
|
@PostMapping("/addBaseAnswer") |
|
|
|
public AjaxResult addBaseAnswer(@RequestBody AppletAnswerBase answerBase){ |
|
|
|
|
|
|
|
if(answerBase.getUserId() == null){ |
|
|
|
return AjaxResult.error("userId用户信息标识不能为空"); |
|
|
|
} |
|
|
|
if(answerBase.getQuestionId() == null){ |
|
|
|
return AjaxResult.error("questionId标识不能为空"); |
|
|
|
} |
|
|
|
// //选删除之前的答案,再去添加新的 |
|
|
|
LambdaQueryWrapper<AppletAnswerBase> qw = Wrappers.<AppletAnswerBase>lambdaQuery() |
|
|
|
.eq(AppletAnswerBase::getUserId, answerBase.getUserId()) |
|
|
|
.eq(AppletAnswerBase::getQuestionId, answerBase.getQuestionId()); |
|
|
|
|
|
|
|
appletAnswerBaseService.remove(qw); |
|
|
|
|
|
|
|
return toAjax(appletAnswerBaseService.insertAppletAnswerBase(answerBase)); |
|
|
|
} |
|
|
|
// @ApiOperation("伴宠师工作台-根据题目id查询基本考核答案") |
|
|
|
// @GetMapping("/answeBaseByQuestionId") |
|
|
|
// public AjaxResult answeBaseByQuestionId(Long questionId, Long userId){ |
|
|
|
// AppletAnswerBase answerBase = new AppletAnswerBase(); |
|
|
|
// answerBase.setQuestionId(questionId); |
|
|
|
// answerBase.setUserId(userId); |
|
|
|
// List<AppletAnswerBase> answerBaseList = appletAnswerBaseService.selectAppletAnswerBaseList(answerBase); |
|
|
|
// |
|
|
|
// for (AppletAnswerBase appletAnswerBase : answerBaseList) { |
|
|
|
// AppletAnswer answer = appletAnswerService.selectAppletAnswerById(appletAnswerBase.getAnswerId()); |
|
|
|
// appletAnswerBase.setAnswer(answer); |
|
|
|
// } |
|
|
|
// |
|
|
|
// return AjaxResult.success("用户基本考核答案列表数据",answerBaseList); |
|
|
|
// } |
|
|
|
|
|
|
|
// @ApiOperation("伴宠师工作台-添加用户基本考核答案") |
|
|
|
// @PostMapping("/addBaseAnswer") |
|
|
|
// public AjaxResult addBaseAnswer(@RequestBody AppletAnswerBase answerBase){ |
|
|
|
// |
|
|
|
// if(answerBase.getUserId() == null){ |
|
|
|
// return AjaxResult.error("userId用户信息标识不能为空"); |
|
|
|
// } |
|
|
|
// if(answerBase.getQuestionId() == null){ |
|
|
|
// return AjaxResult.error("questionId标识不能为空"); |
|
|
|
// } |
|
|
|
//// //选删除之前的答案,再去添加新的 |
|
|
|
// LambdaQueryWrapper<AppletAnswerBase> qw = Wrappers.<AppletAnswerBase>lambdaQuery() |
|
|
|
// .eq(AppletAnswerBase::getUserId, answerBase.getUserId()) |
|
|
|
// .eq(AppletAnswerBase::getQuestionId, answerBase.getQuestionId()); |
|
|
|
// |
|
|
|
// appletAnswerBaseService.remove(qw); |
|
|
|
// |
|
|
|
// return toAjax(appletAnswerBaseService.insertAppletAnswerBase(answerBase)); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-添加用户基本考核答案V2") |
|
|
@ -231,35 +264,64 @@ public class ApiAppletExaminationController { |
|
|
|
|
|
|
|
Long userId = null; |
|
|
|
|
|
|
|
for (AppletAnswerBase appletAnswerBase : answerSubmitBo.getAnswerBase()) { |
|
|
|
if(appletAnswerBase.getUserId() == null){ |
|
|
|
return AjaxResult.error("userId用户信息标识不能为空"); |
|
|
|
} |
|
|
|
if(appletAnswerBase.getQuestionId() == null){ |
|
|
|
return AjaxResult.error("questionId标识不能为空"); |
|
|
|
if (answerSubmitBo.getAnswerBase() != null && answerSubmitBo.getAnswerBase().size() > 0){ |
|
|
|
List<Long> ids = new ArrayList<>(); |
|
|
|
for (AppletAnswerBase appletAnswerBase : answerSubmitBo.getAnswerBase()) { |
|
|
|
if(appletAnswerBase.getUserId() == null){ |
|
|
|
return AjaxResult.error("userId用户信息标识不能为空"); |
|
|
|
} |
|
|
|
if(appletAnswerBase.getQuestionId() == null){ |
|
|
|
return AjaxResult.error("questionId标识不能为空"); |
|
|
|
} |
|
|
|
ids.add(appletAnswerBase.getQuestionId()); |
|
|
|
userId = appletAnswerBase.getUserId(); |
|
|
|
} |
|
|
|
userId = appletAnswerBase.getUserId(); |
|
|
|
|
|
|
|
//选删除之前的答案,再去添加新的 |
|
|
|
LambdaQueryWrapper<AppletAnswerBase> qw = Wrappers.<AppletAnswerBase>lambdaQuery() |
|
|
|
.in(AppletAnswerBase::getQuestionId, ids) |
|
|
|
.eq(AppletAnswerBase::getUserId, userId); |
|
|
|
appletAnswerBaseService.remove(qw); |
|
|
|
|
|
|
|
appletAnswerBaseService.saveBatch(answerSubmitBo.getAnswerBase()); |
|
|
|
|
|
|
|
} |
|
|
|
if (answerSubmitBo.getAnswerTrains() != null && answerSubmitBo.getAnswerTrains().size() > 0) { |
|
|
|
List<Long> ids = new ArrayList<>(); |
|
|
|
for (AppletAnswerTrain appletAnswerTrain : answerSubmitBo.getAnswerTrains()) { |
|
|
|
if (appletAnswerTrain.getUserId() == null) { |
|
|
|
return AjaxResult.error("userId用户信息标识不能为空"); |
|
|
|
} |
|
|
|
if (appletAnswerTrain.getQuestionId() == null) { |
|
|
|
return AjaxResult.error("questionId标识不能为空"); |
|
|
|
} |
|
|
|
ids.add(appletAnswerTrain.getQuestionId()); |
|
|
|
userId = appletAnswerTrain.getUserId(); |
|
|
|
} |
|
|
|
|
|
|
|
//选删除之前的答案,再去添加新的 |
|
|
|
LambdaQueryWrapper<AppletAnswerTrain> qwt = Wrappers.<AppletAnswerTrain>lambdaQuery() |
|
|
|
.eq(AppletAnswerTrain::getUserId, userId) |
|
|
|
.in(AppletAnswerTrain::getQuestionId, ids); |
|
|
|
appletAnswerTrainMapper.delete(qwt); |
|
|
|
|
|
|
|
// //选删除之前的答案,再去添加新的 |
|
|
|
LambdaQueryWrapper<AppletAnswerBase> qw = Wrappers.<AppletAnswerBase>lambdaQuery() |
|
|
|
.eq(AppletAnswerBase::getUserId, userId); |
|
|
|
appletAnswerTrainService.saveBatch(answerSubmitBo.getAnswerTrains()); |
|
|
|
|
|
|
|
appletAnswerBaseService.remove(qw); |
|
|
|
} |
|
|
|
|
|
|
|
AppletUsersTeacher byId = appletUsersTeacherService.lambdaQuery() |
|
|
|
.eq(AppletUsersTeacher::getUserId, userId).one(); |
|
|
|
|
|
|
|
//累计考试次数 |
|
|
|
if (ObjectUtils.isNotEmpty(byId)){ |
|
|
|
if (ObjectUtils.isNotEmpty(byId) && answerSubmitBo.getType() == 0){ |
|
|
|
Integer examNumber = byId.getExamNumber() == null ? 0 : byId.getExamNumber(); |
|
|
|
byId.setExamNumber(examNumber + 1); |
|
|
|
byId.setExamTime(LocalDateTime.now()); |
|
|
|
appletUsersTeacherService.updateById(byId); |
|
|
|
} |
|
|
|
|
|
|
|
return toAjax(appletAnswerBaseService.saveBatch(answerSubmitBo.getAnswerBase())); |
|
|
|
|
|
|
|
return toAjax(true); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-查询考试结果对象") |
|
|
@ -271,55 +333,55 @@ public class ApiAppletExaminationController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-查询用户培训考核答案列表") |
|
|
|
@PostMapping("/answeTrainList") |
|
|
|
public AjaxResult answeTrainList(@RequestBody AppletAnswerTrain answerTrain){ |
|
|
|
List<AppletAnswerTrain> answerTrainList = appletAnswerTrainService.selectAppletAnswerTrainList(answerTrain); |
|
|
|
|
|
|
|
for (AppletAnswerTrain appletAnswerTrain : answerTrainList) { |
|
|
|
AppletQuestion question = appletQuestionService.selectAppletQuestionById(appletAnswerTrain.getQuestionId()); |
|
|
|
appletAnswerTrain.setQuestion(question); |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success("用户培训考核答案列表数据",answerTrainList); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @ApiOperation("伴宠师工作台-查询用户培训考核答案列表") |
|
|
|
// @PostMapping("/answeTrainList") |
|
|
|
// public AjaxResult answeTrainList(@RequestBody AppletAnswerTrain answerTrain){ |
|
|
|
// List<AppletAnswerTrain> answerTrainList = appletAnswerTrainService.selectAppletAnswerTrainList(answerTrain); |
|
|
|
// |
|
|
|
// for (AppletAnswerTrain appletAnswerTrain : answerTrainList) { |
|
|
|
// AppletQuestion question = appletQuestionService.selectAppletQuestionById(appletAnswerTrain.getQuestionId()); |
|
|
|
// appletAnswerTrain.setQuestion(question); |
|
|
|
// } |
|
|
|
// |
|
|
|
// return AjaxResult.success("用户培训考核答案列表数据",answerTrainList); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-根据题目id查询培训考核答案") |
|
|
|
@GetMapping("/answeTrainByQuestionId") |
|
|
|
public AjaxResult answeTrainByQuestionId(Long questionId, Long userId){ |
|
|
|
AppletAnswerTrain answerTrain = new AppletAnswerTrain(); |
|
|
|
answerTrain.setQuestionId(questionId); |
|
|
|
answerTrain.setUserId(userId); |
|
|
|
List<AppletAnswerTrain> answerTrainList = appletAnswerTrainService.selectAppletAnswerTrainList(answerTrain); |
|
|
|
|
|
|
|
return AjaxResult.success("用户培训考核答案列表数据",answerTrainList); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("伴宠师工作台-添加用户培训考核答案") |
|
|
|
@PostMapping("/addTrainAnswer") |
|
|
|
public AjaxResult addTrainAnswer(@RequestBody AppletAnswerTrain answerTrain){ |
|
|
|
if(answerTrain.getUserId() == null){ |
|
|
|
return AjaxResult.error("userId用户信息标识不能为空"); |
|
|
|
} |
|
|
|
if(answerTrain.getQuestionId() == null){ |
|
|
|
return AjaxResult.error("questionId标识不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
// //选删除之前的答案,再去添加新的 |
|
|
|
LambdaQueryWrapper<AppletAnswerTrain> qw = Wrappers.<AppletAnswerTrain>lambdaQuery() |
|
|
|
.eq(AppletAnswerTrain::getUserId, answerTrain.getUserId()) |
|
|
|
.eq(AppletAnswerTrain::getQuestionId, answerTrain.getQuestionId()); |
|
|
|
|
|
|
|
appletAnswerTrainMapper.delete(qw); |
|
|
|
// @ApiOperation("伴宠师工作台-根据题目id查询培训考核答案") |
|
|
|
// @GetMapping("/answeTrainByQuestionId") |
|
|
|
// public AjaxResult answeTrainByQuestionId(Long questionId, Long userId){ |
|
|
|
// AppletAnswerTrain answerTrain = new AppletAnswerTrain(); |
|
|
|
// answerTrain.setQuestionId(questionId); |
|
|
|
// answerTrain.setUserId(userId); |
|
|
|
// List<AppletAnswerTrain> answerTrainList = appletAnswerTrainService.selectAppletAnswerTrainList(answerTrain); |
|
|
|
// |
|
|
|
// return AjaxResult.success("用户培训考核答案列表数据",answerTrainList); |
|
|
|
// } |
|
|
|
|
|
|
|
return toAjax(appletAnswerTrainService.insertAppletAnswerTrain(answerTrain)); |
|
|
|
} |
|
|
|
// @ApiOperation("伴宠师工作台-添加用户培训考核答案") |
|
|
|
// @PostMapping("/addTrainAnswer") |
|
|
|
// public AjaxResult addTrainAnswer(@RequestBody AppletAnswerTrain answerTrain){ |
|
|
|
// if(answerTrain.getUserId() == null){ |
|
|
|
// return AjaxResult.error("userId用户信息标识不能为空"); |
|
|
|
// } |
|
|
|
// if(answerTrain.getQuestionId() == null){ |
|
|
|
// return AjaxResult.error("questionId标识不能为空"); |
|
|
|
// } |
|
|
|
// |
|
|
|
//// //选删除之前的答案,再去添加新的 |
|
|
|
// LambdaQueryWrapper<AppletAnswerTrain> qw = Wrappers.<AppletAnswerTrain>lambdaQuery() |
|
|
|
// .eq(AppletAnswerTrain::getUserId, answerTrain.getUserId()) |
|
|
|
// .eq(AppletAnswerTrain::getQuestionId, answerTrain.getQuestionId()); |
|
|
|
// |
|
|
|
// appletAnswerTrainMapper.delete(qw); |
|
|
|
// |
|
|
|
// return toAjax(appletAnswerTrainService.insertAppletAnswerTrain(answerTrain)); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
//查询培训考核是否完成 |
|
|
|