Commit 7482187a by zhiwj

修改sql

parent 2b7da693
......@@ -147,9 +147,17 @@ public class ProblemOutApiServiceImpl implements ProblemOutApiService {
if (CollectionUtils.isNotEmpty(problemList)) {
List<Integer> problemIdList = problemList.stream().map(ProblemDTO::getProblemId).collect(Collectors.toList());
Map<Integer, String> firstReply = problemReplyService.firstReplyByProblemId(problemIdList);
ServiceResponse<Void> resp = this.ensure(problemList.get(0).getEnterpriseId(), ecuId);
for (ProblemDTO problemDTO : problemList) {
problemDTO.setProblemCount(problemDTO.getProblemCount() == null ? 1 : (problemDTO.getProblemCount() + 1));
problemDTO.setReplyContent(firstReply.get(problemDTO.getProblemId()));
if (!resp.isSuccess()) {
// 恶意评价 不能提交
problemDTO.setProblemStatus(2);
}
}
}
return EnterpriseServiceResponse.success(problemList);
......
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