|
@@ -199,7 +199,7 @@ public class NewsController {
|
|
|
|
|
|
@PutMapping("/reply")
|
|
|
@ApiOperation(value = "新闻回复")
|
|
|
- public R reply(@RequestParam("id") String id, @RequestParam("replyContent") String replyContent) throws Exception {
|
|
|
+ public R reply(@RequestBody String id, @RequestBody String replyContent) throws Exception {
|
|
|
NewsRelation newsRelation = newsRelationService.getOne(
|
|
|
Wrappers.<NewsRelation>query().lambda()
|
|
|
.eq(NewsRelation::getNewsId,id)
|
|
@@ -208,7 +208,7 @@ public class NewsController {
|
|
|
throw new Exception("参数异常");
|
|
|
}
|
|
|
|
|
|
- if (newsRelation.getReadMark() == 0) {
|
|
|
+ if (newsRelation.getReadMark()==null || newsRelation.getReadMark() == 0) {
|
|
|
newsRelation.setReadMark(1);
|
|
|
newsRelation.setReadDate(LocalDateTime.now());
|
|
|
}
|