|
@@ -89,7 +89,7 @@ public class TopicServiceImpl implements ITopicService { |
|
@@ -89,7 +89,7 @@ public class TopicServiceImpl implements ITopicService { |
89
|
record.setIsOfficial(req.getIsOfficial() == null ? 0 : req.getIsOfficial());
|
89
|
record.setIsOfficial(req.getIsOfficial() == null ? 0 : req.getIsOfficial());
|
90
|
record.setAllowAttention(req.getAllowAttention()== null ? 0 : req.getAllowAttention());
|
90
|
record.setAllowAttention(req.getAllowAttention()== null ? 0 : req.getAllowAttention());
|
91
|
record.setShowAttAmount(req.getShowAttAmount()== null ? 0 : req.getShowAttAmount());
|
91
|
record.setShowAttAmount(req.getShowAttAmount()== null ? 0 : req.getShowAttAmount());
|
92
|
- if(req.getId() == null){
|
92
|
+ if(req.getId() == null){//新增
|
93
|
record.setArticleAmount(0);
|
93
|
record.setArticleAmount(0);
|
94
|
record.setAttAmount(0);
|
94
|
record.setAttAmount(0);
|
95
|
record.setStatus(3);//待上架
|
95
|
record.setStatus(3);//待上架
|
|
@@ -97,7 +97,7 @@ public class TopicServiceImpl implements ITopicService { |
|
@@ -97,7 +97,7 @@ public class TopicServiceImpl implements ITopicService { |
97
|
topicGroupDAO.updateTopicNum(req.getRelatedGroup(),true);
|
97
|
topicGroupDAO.updateTopicNum(req.getRelatedGroup(),true);
|
98
|
grassTopicDAO.insert(record);
|
98
|
grassTopicDAO.insert(record);
|
99
|
logger.info("addUpGrassTopic add success! req={}",req);
|
99
|
logger.info("addUpGrassTopic add success! req={}",req);
|
100
|
- }else{
|
100
|
+ }else{//修改
|
101
|
record.setUpdateTime(DateUtil.getCurrentTimeSeconds());
|
101
|
record.setUpdateTime(DateUtil.getCurrentTimeSeconds());
|
102
|
GrassTopic grassTopic = grassTopicDAO.selectByPrimaryKey(req.getId());
|
102
|
GrassTopic grassTopic = grassTopicDAO.selectByPrimaryKey(req.getId());
|
103
|
//更改分组
|
103
|
//更改分组
|