mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 10:56:50 +08:00
Merge remote-tracking branch 'yx/master-0623-lyc' into test
This commit is contained in:
@@ -75,6 +75,7 @@ public class CommentsServiceImpl implements ICommentsService{
|
||||
c.setPraises(0);
|
||||
c.setFavorites(0);
|
||||
dao.save(c);
|
||||
callback.increase(BoedxResourceType.toEnum(c.getObjType()),c.getObjId(), BoedxHitsField.Comments);
|
||||
if(c.getParentRead()!=null && c.getParentRead()) {
|
||||
dao.updateMultiFieldById(c.getParentId(),
|
||||
UpdateBuilder.create("replys","replys+1",FieldUpdateType.EXPRESSION),
|
||||
@@ -87,9 +88,11 @@ public class CommentsServiceImpl implements ICommentsService{
|
||||
|
||||
@Override
|
||||
public void deleteReply(String id,String parentId) {
|
||||
|
||||
Comments comment=dao.get(id);
|
||||
dao.deleteById(id);
|
||||
dao.updateMultiFieldById(parentId, UpdateBuilder.create("replys","replys-1",FieldUpdateType.EXPRESSION));
|
||||
//需要同时回调处理,修改对应的内容的评论数量
|
||||
callback.reduce(BoedxResourceType.toEnum(comment.getObjType()),comment.getObjId(),BoedxHitsField.Comments);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user