|
|
|
@ -3,6 +3,7 @@ package com.sztzjy.fund_investment.controller.tea;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.sztzjy.fund_investment.annotation.AnonymousAccess;
|
|
|
|
|
import com.sztzjy.fund_investment.entity.QuestionAnswerExample;
|
|
|
|
|
import com.sztzjy.fund_investment.entity.QuestionAnswerWithBLOBs;
|
|
|
|
|
import com.sztzjy.fund_investment.entity.TopicsWithBLOBs;
|
|
|
|
|
import com.sztzjy.fund_investment.entity.dto.QuestionAnswerDto;
|
|
|
|
@ -111,7 +112,15 @@ public class TeaTopicManageController {
|
|
|
|
|
@GetMapping("/getQuestionById")
|
|
|
|
|
@ApiOperation("互动答疑/获取单条互动数据")
|
|
|
|
|
public ResultEntity<QuestionAnswerWithBLOBs> getQuestionById(@ApiParam("展示接口中的id字段") @RequestParam String questionId) {
|
|
|
|
|
return new ResultEntity<QuestionAnswerWithBLOBs>(questionAnswerMapper.selectByPrimaryKey(questionId));
|
|
|
|
|
// QuestionAnswerWithBLOBs questionAnswerWithBLOBs = questionAnswerMapper.selectByPrimaryKey(questionId);
|
|
|
|
|
QuestionAnswerExample answerExample = new QuestionAnswerExample();
|
|
|
|
|
answerExample.createCriteria().andIdEqualTo(questionId);
|
|
|
|
|
List<QuestionAnswerWithBLOBs> questionAnswerWithBLOBs = questionAnswerMapper.selectByExampleWithBLOBs(answerExample);
|
|
|
|
|
if (!questionAnswerWithBLOBs.isEmpty()){
|
|
|
|
|
QuestionAnswerWithBLOBs questionAnswerWithBLOBs1 = questionAnswerWithBLOBs.get(0);
|
|
|
|
|
return new ResultEntity<>(questionAnswerWithBLOBs1);
|
|
|
|
|
}
|
|
|
|
|
return new ResultEntity<>(new QuestionAnswerWithBLOBs());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|