|
@@ -31,6 +31,9 @@ public class ReplyController extends BaseController {
|
|
|
@Autowired
|
|
|
private ReplyService replyService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private UserService userService;
|
|
|
+
|
|
|
@PostMapping("/publishReply")
|
|
|
@ApiOperation(value = "发布回答和修改状态", notes = "ReplyEntity对象")
|
|
|
public Result publishReply(@RequestBody String json) {
|
|
@@ -56,6 +59,12 @@ public class ReplyController extends BaseController {
|
|
|
@ApiOperation(value = "回答内容列表查询", notes = "参数包括:beginNum:页码,pageSize:每页条数,taskId:任务Id,searchKey:搜索信息")
|
|
|
public Result findReplyList(String taskId, String searchKey,int beginNum, int pageSize) {
|
|
|
Page<ReplyEntity> replyEntities = this.replyService.findReplyByTaskId(taskId, searchKey, beginNum, pageSize);
|
|
|
+ UserEntity userEntity;
|
|
|
+ for (int i = 0; i < replyEntities.getContent().size(); i++) {
|
|
|
+ userEntity = this.userService.findById(replyEntities.getContent().get(i).getUserId());
|
|
|
+ replyEntities.getContent().get(i).setAvatar(userEntity.getAvatar());
|
|
|
+ replyEntities.getContent().get(i).setUserName(userEntity.getUserName());
|
|
|
+ }
|
|
|
return success(replyEntities);
|
|
|
}
|
|
|
|