Authored by mlge

种草--话题修改

@@ -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 //更改分组
@@ -192,7 +192,12 @@ @@ -192,7 +192,12 @@
192 width: 25, 192 width: 25,
193 align: "left", 193 align: "left",
194 formatter: function (value, rowData, rowIndex) { 194 formatter: function (value, rowData, rowIndex) {
195 - return '<a target="_blank" href="' + value + '"><img src="' + value + '" style="width: 120px;height: 120px;" /></a>'; 195 + if(value == null || value == ""){
  196 + return "";
  197 + }else{//由标签同步过来的话题 没有图
  198 + return '<a target="_blank" href="' + value + '"><img src="' + value + '" style="width: 120px;height: 120px;" /></a>';
  199 + }
  200 +
196 } 201 }
197 }, 202 },
198 { 203 {