Commit 22560772 by jcm

2022.9.2

parent 18e92d1b
......@@ -134,7 +134,7 @@ public class PrizeController {
return ResultVo.success();
}
// @ApiOperation("获取抽奖记录")
// @ApiOperation("获取抽奖记录")
// @PostMapping(value = "/getLotteryRecList")
// public ResultVo<PageVo<LotteryRec>> getLotteryRecList(@RequestBody LotteryRecFindVo vo) {
// return ResultVo.success(prizeService.getLotteryRecList(vo));
......
......@@ -126,7 +126,6 @@ PrizeService {
return prizeDao.selectById(prizeId);
}
// todo 抽奖模块尚未修改
public LotteryRecFindVo luckDraw(String userId, LotteryInfoVo infoVo) {
// List<Prize> prizeList = prizeDao.getLuckDrawPrize();
// 当期活动奖品列表
......
......@@ -85,18 +85,21 @@ public class QuestionService {
}
public void editQuestion(Question vo) {
Question question = questionDao.selectById(vo.getId());
AssertUtils.notNull(question, "题目不存在");
question.setSubject(vo.getSubject());
question.setContent(vo.getContent());
question.setAnalysis(vo.getAnalysis());
question.setAnswer(vo.getAnswer());
question.setQuestionTypeId(vo.getQuestionTypeId());
question.setLotteryInfoName(lotteryInfoDao.selectById(vo.getLotteryId()).getLotteryInfoName());
question.setLotteryId(vo.getLotteryId());
questionDao.updateById(question);
AssertUtils.notNull(questionDao.selectById(vo.getId()) == null, "题目不存在");
// Question question = questionDao.selectById(vo.getId());
//
// question.setSubject(vo.getSubject());
// question.setContent(vo.getContent());
// question.setAnalysis(vo.getAnalysis());
// question.setAnswer(vo.getAnswer());
// question.setQuestionTypeId(vo.getQuestionTypeId());
// question.setLotteryInfoName(lotteryInfoDao.selectById(vo.getLotteryId()).getLotteryInfoName());
// question.setLotteryId(vo.getLotteryId());
if (vo.getLotteryId() != null) {
vo.setLotteryInfoName(lotteryInfoDao.selectById(vo.getLotteryId()).getLotteryInfoName());
vo.setLotteryId(vo.getLotteryId());
}
questionDao.updateById(vo);
}
public void delQuestion(Set<String> ids) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment