|
@@ -20,6 +20,7 @@ import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.authority.entity.DataAuth;
|
|
|
import com.xjrsoft.module.oa.dto.AddNewsDto;
|
|
|
import com.xjrsoft.module.oa.dto.NewsPageDto;
|
|
|
+import com.xjrsoft.module.oa.dto.NewsReplyDto;
|
|
|
import com.xjrsoft.module.oa.dto.UpdateNewsDto;
|
|
|
import com.xjrsoft.module.oa.entity.Message;
|
|
|
import com.xjrsoft.module.oa.entity.News;
|
|
@@ -199,12 +200,12 @@ public class NewsController {
|
|
|
|
|
|
@PutMapping("/reply")
|
|
|
@ApiOperation(value = "新闻回复")
|
|
|
- public R reply(@RequestBody String id, @RequestBody String replyContent) throws Exception {
|
|
|
+ public R reply(@RequestBody NewsReplyDto newsReplyDto) throws Exception {
|
|
|
NewsRelation newsRelation = newsRelationService.getOne(
|
|
|
Wrappers.<NewsRelation>query().lambda()
|
|
|
- .eq(NewsRelation::getNewsId,id)
|
|
|
+ .eq(NewsRelation::getNewsId,newsReplyDto.getId())
|
|
|
.eq(NewsRelation::getUserId,StpUtil.getLoginIdAsLong()));
|
|
|
- if (replyContent == null || newsRelation == null) {
|
|
|
+ if (newsReplyDto.getReplyContent() == null || newsRelation == null) {
|
|
|
throw new Exception("参数异常");
|
|
|
}
|
|
|
|
|
@@ -212,7 +213,7 @@ public class NewsController {
|
|
|
newsRelation.setReadMark(1);
|
|
|
newsRelation.setReadDate(LocalDateTime.now());
|
|
|
}
|
|
|
- newsRelation.setReplyContent(replyContent);
|
|
|
+ newsRelation.setReplyContent(newsReplyDto.getReplyContent());
|
|
|
return R.ok(newsRelationService.updateById(newsRelation));
|
|
|
}
|
|
|
}
|