Merge branch 'test6.9.5' of http://git.yoho.cn/yoho30/yoho-sns into test6.9.5
Showing
4 changed files
with
25 additions
and
13 deletions
@@ -8,6 +8,7 @@ import com.yohobuy.platform.model.grass.request.TblCrawlerInfoQueryReq; | @@ -8,6 +8,7 @@ import com.yohobuy.platform.model.grass.request.TblCrawlerInfoQueryReq; | ||
8 | import com.yohobuy.platform.model.grass.request.TbleCrawlerAddToGrassReq; | 8 | import com.yohobuy.platform.model.grass.request.TbleCrawlerAddToGrassReq; |
9 | import org.slf4j.Logger; | 9 | import org.slf4j.Logger; |
10 | import org.slf4j.LoggerFactory; | 10 | import org.slf4j.LoggerFactory; |
11 | +import org.springframework.web.bind.annotation.RequestBody; | ||
11 | import org.springframework.web.bind.annotation.RequestMapping; | 12 | import org.springframework.web.bind.annotation.RequestMapping; |
12 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
13 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
@@ -24,7 +25,7 @@ public class TblCrawlerArticleController { | @@ -24,7 +25,7 @@ public class TblCrawlerArticleController { | ||
24 | ITblCrawlerInfoService tblCrawlerInfoService; | 25 | ITblCrawlerInfoService tblCrawlerInfoService; |
25 | 26 | ||
26 | @RequestMapping("/publishCrawlerArticle") | 27 | @RequestMapping("/publishCrawlerArticle") |
27 | - public ApiResponse publishCrawlerArticle(TbleCrawlerAddToGrassReq req){ | 28 | + public ApiResponse publishCrawlerArticle(@RequestBody TbleCrawlerAddToGrassReq req){ |
28 | logger.info("tblCrawlerArticle publishCrawlerArticle begin, req is {}", req); | 29 | logger.info("tblCrawlerArticle publishCrawlerArticle begin, req is {}", req); |
29 | try { | 30 | try { |
30 | //默认审核通过 | 31 | //默认审核通过 |
@@ -37,7 +38,7 @@ public class TblCrawlerArticleController { | @@ -37,7 +38,7 @@ public class TblCrawlerArticleController { | ||
37 | } | 38 | } |
38 | 39 | ||
39 | @RequestMapping("/tblTimerPublish") | 40 | @RequestMapping("/tblTimerPublish") |
40 | - public ApiResponse tblTimerPublish(TbleCrawlerAddToGrassReq req){ | 41 | + public ApiResponse tblTimerPublish(@RequestBody TbleCrawlerAddToGrassReq req){ |
41 | logger.info("tblCrawlerArticle timerPublish begin, req is {}",req); | 42 | logger.info("tblCrawlerArticle timerPublish begin, req is {}",req); |
42 | try { | 43 | try { |
43 | tblCrawlerInfoService.timerPublishToGrass(req); | 44 | tblCrawlerInfoService.timerPublishToGrass(req); |
@@ -48,7 +49,7 @@ public class TblCrawlerArticleController { | @@ -48,7 +49,7 @@ public class TblCrawlerArticleController { | ||
48 | } | 49 | } |
49 | 50 | ||
50 | @RequestMapping("/saveTblArticleDraft") | 51 | @RequestMapping("/saveTblArticleDraft") |
51 | - public ApiResponse saveTblArticleDraft(TbleCrawlerAddToGrassReq req){ | 52 | + public ApiResponse saveTblArticleDraft(@RequestBody TbleCrawlerAddToGrassReq req){ |
52 | logger.info("tblCrawlerArticle saveTblArticleDraft begin, req is {}", req); | 53 | logger.info("tblCrawlerArticle saveTblArticleDraft begin, req is {}", req); |
53 | try { | 54 | try { |
54 | req.setAuthStatus(9); | 55 | req.setAuthStatus(9); |
@@ -20,6 +20,7 @@ import com.yohobuy.platform.dal.pcms.model.TblCrawlerUidRelation; | @@ -20,6 +20,7 @@ import com.yohobuy.platform.dal.pcms.model.TblCrawlerUidRelation; | ||
20 | import com.yohobuy.platform.grass.service.IGrassArticleService; | 20 | import com.yohobuy.platform.grass.service.IGrassArticleService; |
21 | import com.yohobuy.platform.grass.service.ITblCrawlerInfoService; | 21 | import com.yohobuy.platform.grass.service.ITblCrawlerInfoService; |
22 | import com.yohobuy.platform.model.common.PageResponseVO; | 22 | import com.yohobuy.platform.model.common.PageResponseVO; |
23 | +import com.yohobuy.platform.model.grass.request.GrassArticleReq; | ||
23 | import com.yohobuy.platform.model.grass.request.TblCrawlerInfoQueryReq; | 24 | import com.yohobuy.platform.model.grass.request.TblCrawlerInfoQueryReq; |
24 | import com.yohobuy.platform.model.grass.request.TbleCrawlerAddToGrassReq; | 25 | import com.yohobuy.platform.model.grass.request.TbleCrawlerAddToGrassReq; |
25 | import com.yohobuy.platform.model.grass.response.TblCrawlerInfoQueryRsp; | 26 | import com.yohobuy.platform.model.grass.response.TblCrawlerInfoQueryRsp; |
@@ -27,6 +28,7 @@ import org.apache.commons.collections.CollectionUtils; | @@ -27,6 +28,7 @@ import org.apache.commons.collections.CollectionUtils; | ||
27 | import org.apache.commons.lang3.StringUtils; | 28 | import org.apache.commons.lang3.StringUtils; |
28 | import org.slf4j.Logger; | 29 | import org.slf4j.Logger; |
29 | import org.slf4j.LoggerFactory; | 30 | import org.slf4j.LoggerFactory; |
31 | +import org.springframework.beans.BeanUtils; | ||
30 | import org.springframework.beans.factory.annotation.Value; | 32 | import org.springframework.beans.factory.annotation.Value; |
31 | import org.springframework.stereotype.Service; | 33 | import org.springframework.stereotype.Service; |
32 | 34 | ||
@@ -64,7 +66,7 @@ public class TblCrawlerInfoServiceImpl implements ITblCrawlerInfoService { | @@ -64,7 +66,7 @@ public class TblCrawlerInfoServiceImpl implements ITblCrawlerInfoService { | ||
64 | //根据种草文id查询 | 66 | //根据种草文id查询 |
65 | if(req.getArticleId() != null){ | 67 | if(req.getArticleId() != null){ |
66 | List<TblCrawlerArticleRelation> tblCrawlerArticleRelationList = tblCrawlerArticleRelationDao. | 68 | List<TblCrawlerArticleRelation> tblCrawlerArticleRelationList = tblCrawlerArticleRelationDao. |
67 | - selectByRelateIdAndArticleType(req.getArticleId() , ArticleTypeEnum.NORMAL.getValue()); | 69 | + selectByRelateIdAndArticleType(req.getArticleId() , ArticleTypeEnum.TBLCRAWLER.getValue()); |
68 | if(!tblCrawlerArticleRelationList.isEmpty()){ | 70 | if(!tblCrawlerArticleRelationList.isEmpty()){ |
69 | List<Integer> crawlerIds = tblCrawlerArticleRelationList.stream().map(TblCrawlerArticleRelation::getCrawlerId) | 71 | List<Integer> crawlerIds = tblCrawlerArticleRelationList.stream().map(TblCrawlerArticleRelation::getCrawlerId) |
70 | .collect(Collectors.toList()); | 72 | .collect(Collectors.toList()); |
@@ -227,7 +229,9 @@ public class TblCrawlerInfoServiceImpl implements ITblCrawlerInfoService { | @@ -227,7 +229,9 @@ public class TblCrawlerInfoServiceImpl implements ITblCrawlerInfoService { | ||
227 | req.setArticleType(ArticleTypeEnum.TBLCRAWLER.getValue()); | 229 | req.setArticleType(ArticleTypeEnum.TBLCRAWLER.getValue()); |
228 | //文章版权类型为第三方授权 | 230 | //文章版权类型为第三方授权 |
229 | req.setCopyright(2); | 231 | req.setCopyright(2); |
230 | - Integer articleId = grassArticleService.publishArticle(req); | 232 | + GrassArticleReq grassArticleReq = new GrassArticleReq(); |
233 | + BeanUtils.copyProperties(req, grassArticleReq); | ||
234 | + Integer articleId = grassArticleService.publishArticle(grassArticleReq); | ||
231 | //维护爬虫数据和种草文章关联关系 | 235 | //维护爬虫数据和种草文章关联关系 |
232 | TblCrawlerArticleRelation tblCrawlerArticleRelation = new TblCrawlerArticleRelation(); | 236 | TblCrawlerArticleRelation tblCrawlerArticleRelation = new TblCrawlerArticleRelation(); |
233 | tblCrawlerArticleRelation.setRelateId(articleId); | 237 | tblCrawlerArticleRelation.setRelateId(articleId); |
@@ -253,7 +257,9 @@ public class TblCrawlerInfoServiceImpl implements ITblCrawlerInfoService { | @@ -253,7 +257,9 @@ public class TblCrawlerInfoServiceImpl implements ITblCrawlerInfoService { | ||
253 | req.setArticleType(ArticleTypeEnum.TBLCRAWLER.getValue()); | 257 | req.setArticleType(ArticleTypeEnum.TBLCRAWLER.getValue()); |
254 | //文章版权类型为第三方授权 | 258 | //文章版权类型为第三方授权 |
255 | req.setCopyright(2); | 259 | req.setCopyright(2); |
256 | - Integer articleId = grassArticleService.timerPublish(req); | 260 | + GrassArticleReq grassArticleReq = new GrassArticleReq(); |
261 | + BeanUtils.copyProperties(req, grassArticleReq); | ||
262 | + Integer articleId = grassArticleService.timerPublish(grassArticleReq); | ||
257 | //维护爬虫数据和种草文章关联关系 | 263 | //维护爬虫数据和种草文章关联关系 |
258 | TblCrawlerArticleRelation tblCrawlerArticleRelation = new TblCrawlerArticleRelation(); | 264 | TblCrawlerArticleRelation tblCrawlerArticleRelation = new TblCrawlerArticleRelation(); |
259 | tblCrawlerArticleRelation.setRelateId(articleId); | 265 | tblCrawlerArticleRelation.setRelateId(articleId); |
@@ -95,7 +95,7 @@ | @@ -95,7 +95,7 @@ | ||
95 | <td style="width:100% "> | 95 | <td style="width:100% "> |
96 | <label style="font-size: 14px;">正文内容</label> <br> | 96 | <label style="font-size: 14px;">正文内容</label> <br> |
97 | <div style="float: left;width:700px;" > | 97 | <div style="float: left;width:700px;" > |
98 | - <script id="content" name="content" type="text/plain" style="width:1024px;height:500px;"></script> | 98 | + <textarea id="content" name="content" type="text/plain" style="width:1024px;height:500px;"></textarea> |
99 | </div> | 99 | </div> |
100 | </td> | 100 | </td> |
101 | </tr> | 101 | </tr> |
@@ -175,8 +175,9 @@ | @@ -175,8 +175,9 @@ | ||
175 | initialFrameHeight: 200, | 175 | initialFrameHeight: 200, |
176 | initialFrameWidth : "90%", | 176 | initialFrameWidth : "90%", |
177 | initialFrameHeight : 350, | 177 | initialFrameHeight : 350, |
178 | + removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var,h1,h2,h3,h4,h5', | ||
178 | toolbars: [[ | 179 | toolbars: [[ |
179 | - 'source', '|', 'undo', 'redo', '|', | 180 | + 'source', '|', 'undo', 'redo', '|','formatmatch','removeformat', |
180 | 'bold', 'italic', 'underline','strikethrough','horizontal','|','paragraph', 'rowspacingtop', | 181 | 'bold', 'italic', 'underline','strikethrough','horizontal','|','paragraph', 'rowspacingtop', |
181 | 'rowspacingbottom', '|', | 182 | 'rowspacingbottom', '|', |
182 | 'insertorderedlist', 'insertunorderedlist', 'blockquote','|', | 183 | 'insertorderedlist', 'insertunorderedlist', 'blockquote','|', |
@@ -184,8 +185,11 @@ | @@ -184,8 +185,11 @@ | ||
184 | 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'simpleupload', 'insertimage', 'help','fullscreen' | 185 | 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'simpleupload', 'insertimage', 'help','fullscreen' |
185 | ]], | 186 | ]], |
186 | elementPathEnabled : false, | 187 | elementPathEnabled : false, |
188 | + catchRemoteImageEnable:false, | ||
189 | + enableAutoSave:false, | ||
190 | + enableContextMenu: false, | ||
191 | + retainOnlyLabelPasted:true, | ||
187 | maximumWords:100000, | 192 | maximumWords:100000, |
188 | - autoFloatEnabled:false | ||
189 | }); | 193 | }); |
190 | UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl; | 194 | UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl; |
191 | UE.Editor.prototype.getActionUrl = function(action) { | 195 | UE.Editor.prototype.getActionUrl = function(action) { |
@@ -659,7 +663,7 @@ | @@ -659,7 +663,7 @@ | ||
659 | }); | 663 | }); |
660 | $("#title").textbox("setValue",data.title); | 664 | $("#title").textbox("setValue",data.title); |
661 | $("#copyright").combobox("setValue",2); | 665 | $("#copyright").combobox("setValue",2); |
662 | - $("#sort").val(1); | 666 | + $("#sort").val(2); |
663 | var labelIds = []; | 667 | var labelIds = []; |
664 | if(data.labelList!=null && data.labelList.length>0){ | 668 | if(data.labelList!=null && data.labelList.length>0){ |
665 | for (var i=0;i<data.labelList.length;i++){ | 669 | for (var i=0;i<data.labelList.length;i++){ |
@@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
60 | <table id="activityListTable" ></table> | 60 | <table id="activityListTable" ></table> |
61 | </div> | 61 | </div> |
62 | <div region="center" id="articleEditer" style="margin-left: 20px" > | 62 | <div region="center" id="articleEditer" style="margin-left: 20px" > |
63 | - | 63 | +</div> |
64 | </body> | 64 | </body> |
65 | 65 | ||
66 | <script> | 66 | <script> |
@@ -197,7 +197,7 @@ | @@ -197,7 +197,7 @@ | ||
197 | str = str + ' <img style="width:60px; height: 60px;margin-left: 3px" src="'+ imgList[0]+'" >' ; | 197 | str = str + ' <img style="width:60px; height: 60px;margin-left: 3px" src="'+ imgList[0]+'" >' ; |
198 | } | 198 | } |
199 | 199 | ||
200 | - str = str + "<a href= "+sourceUrl+" style='margin-left:10px'>查看详情</a>"; | 200 | + str = str + "<a role='linkDetail' target='_blank' style='margin-left:10px' href="+sourceUrl+">查看详情</a>" |
201 | str =str + '</p>'; | 201 | str =str + '</p>'; |
202 | str = str + '</div>'; | 202 | str = str + '</div>'; |
203 | return str; | 203 | return str; |
@@ -329,6 +329,7 @@ | @@ -329,6 +329,7 @@ | ||
329 | $(this).datagrid("getPanel").find("a[role='updateStatus']").linkbutton({ | 329 | $(this).datagrid("getPanel").find("a[role='updateStatus']").linkbutton({ |
330 | iconCls : "icon-edit", | 330 | iconCls : "icon-edit", |
331 | onClick: function () { | 331 | onClick: function () { |
332 | + debugger; | ||
332 | var checkStatus = $(this).attr("dataAuthStatus"); | 333 | var checkStatus = $(this).attr("dataAuthStatus"); |
333 | var dataId = $(this).attr("dataId"); | 334 | var dataId = $(this).attr("dataId"); |
334 | index = $(this).attr("index"); | 335 | index = $(this).attr("index"); |
@@ -367,10 +368,10 @@ | @@ -367,10 +368,10 @@ | ||
367 | } | 368 | } |
368 | }); | 369 | }); |
369 | 370 | ||
371 | + | ||
370 | } | 372 | } |
371 | }); | 373 | }); |
372 | 374 | ||
373 | - | ||
374 | function switchRecommend(id, status) { | 375 | function switchRecommend(id, status) { |
375 | $.post(serverContextPath + "/tblCrawlerArticle/modifyTblCrawlerArticleStatus?id=" + id + "&checkStatus=" + status, function (data) { | 376 | $.post(serverContextPath + "/tblCrawlerArticle/modifyTblCrawlerArticleStatus?id=" + id + "&checkStatus=" + status, function (data) { |
376 | if(data.code != 200){ | 377 | if(data.code != 200){ |
-
Please register or login to post a comment