提交 6a5a47cb 作者: 张小凤

DynamicMapper.xml(update)

上级 dc92c252
...@@ -91,6 +91,9 @@ public class ForumDynamicDO extends BaseDO implements Serializable { ...@@ -91,6 +91,9 @@ public class ForumDynamicDO extends BaseDO implements Serializable {
@ApiModelProperty("话题列表") @ApiModelProperty("话题列表")
private List<ForumGambitDTO> gambitDTOList; private List<ForumGambitDTO> gambitDTOList;
@ApiModelProperty("")
private Integer transpond;
...@@ -121,6 +124,7 @@ public class ForumDynamicDO extends BaseDO implements Serializable { ...@@ -121,6 +124,7 @@ public class ForumDynamicDO extends BaseDO implements Serializable {
.gambitName(this.gambitName) .gambitName(this.gambitName)
.forumReviewVO(this.forumReviewVO) .forumReviewVO(this.forumReviewVO)
.forumGambitDTOList(this.gambitDTOList) .forumGambitDTOList(this.gambitDTOList)
.transpond(this.transpond)
.build(); .build();
} }
......
...@@ -115,7 +115,7 @@ public class GambitServiceImpl implements GambitService { ...@@ -115,7 +115,7 @@ public class GambitServiceImpl implements GambitService {
public ResultBody deleteGambit(Integer id) { public ResultBody deleteGambit(Integer id) {
int count= gambitDao.selectGambitAndDynamic(id); int count= gambitDao.selectGambitAndDynamic(id);
if (count==0){ if (count!=0){
return ResultBody.error("话题关联了动态无法删除"); return ResultBody.error("话题关联了动态无法删除");
} }
gambitDao.deleteGambit(id); gambitDao.deleteGambit(id);
...@@ -158,14 +158,16 @@ public class GambitServiceImpl implements GambitService { ...@@ -158,14 +158,16 @@ public class GambitServiceImpl implements GambitService {
} }
}else{ }else{
ForumAttentionDO forumAttentionDO = gambitDao.selectAttentionMessage(userAccountId, attentionUserAccountId); ForumAttentionDO forumAttentionDO = gambitDao.selectAttentionMessage(userAccountId, attentionUserAccountId);
if (forumAttentionDO.getMutualAttention().equals(false)){ if (forumAttentionDO!=null){
gambitDao.removeAttention(userAccountId,attentionUserAccountId); if (forumAttentionDO.getMutualAttention().equals(false)){
gambitDao.forumCountFansNO(userAccountId); gambitDao.removeAttention(userAccountId,attentionUserAccountId);
gambitDao.forumCountAttentionNO(attentionUserAccountId); gambitDao.forumCountFansNO(userAccountId);
}else{ gambitDao.forumCountAttentionNO(attentionUserAccountId);
gambitDao.updateAttentionExchange(userAccountId,attentionUserAccountId); }else{
gambitDao.forumCountFansNO(userAccountId); gambitDao.updateAttentionExchange(userAccountId,attentionUserAccountId);
gambitDao.forumCountAttentionNO(attentionUserAccountId); gambitDao.forumCountFansNO(userAccountId);
gambitDao.forumCountAttentionNO(attentionUserAccountId);
}
} }
} }
return ResultBody.success(); return ResultBody.success();
......
...@@ -369,7 +369,8 @@ ...@@ -369,7 +369,8 @@
likes_count, likes_count,
comments_count, comments_count,
create_time, create_time,
id AS dynamicId id AS dynamicId,
transpond
from forum_dynamic from forum_dynamic
where is_deleted = 0 where is_deleted = 0
and root_path is null and root_path is null
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论