Authored by chenly5

文章发布新增分发渠道

... ... @@ -206,6 +206,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
article.setSort(sort);
article.setCopyright(req.getCopyright());
article.setArticleTitle(req.getTitle());
article.setFlowType(req.getFlowType());
article.setDispatchChannel(req.getDispatchChannel());
try {
grassArticleDao.insertArticleSeletive(article);
logger.info("insert grass article success, uid is {}, ariticle id is {}", article.getAuthorUid(), article.getId());
... ... @@ -495,13 +497,13 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
int size = req.getSize();
logger.info("start getArticleList: grassArticleDao.getArticleCount ");
int total = grassArticleDao.selectArticleCount(articleId, source, authStatus, authorUids, isRecommend, isTop, startTimeInt, endTimeInt,
recommendSort, auditSort,isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods());
recommendSort, auditSort,isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods(),req.getDispatchChannel());
logger.info("end getArticleList: grassArticleDao.getArticleCount, total is {}", total);
int offset = (page - 1) * size;
logger.info("start getArticleList: grassArticleDao.selectArticleList , offset is {}, limit is {}", offset, size);
List<GrassArticle> articleList = grassArticleDao.selectArticleList(articleId, source, authStatus, authorUids, isRecommend, isTop, startTimeInt, endTimeInt,
offset, size, recommendSort,auditSort, isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods());
offset, size, recommendSort,auditSort, isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods(),req.getDispatchChannel());
logger.info("end getArticleList: grassArticleDao.selectArticleList , offset is {}, limit is {}", offset, size);
rsp.setList(buildArticleDetail(articleList, false));
... ... @@ -644,6 +646,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
grassArticle.setSort(sort);
grassArticle.setCopyright(req.getCopyright());
grassArticle.setArticleTitle(req.getTitle());
grassArticle.setDispatchChannel(req.getDispatchChannel());
grassArticleDao.updateByPrimaryKeySelective(grassArticle);
//文章内容
... ... @@ -1148,11 +1151,11 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
int page = req.getPage();
int size = req.getSize();
logger.info("begin grassArticleDao.selectDraftArticleCount");
int total = grassArticleDao.selectDraftArticleCount(articleId, authorUids, isPublished, System.currentTimeMillis(), startTimeInt, endTimeInt, isExclude, userType,sort);
int total = grassArticleDao.selectDraftArticleCount(articleId, authorUids, isPublished, System.currentTimeMillis(), startTimeInt, endTimeInt, isExclude, userType,sort,req.getDispatchChannel());
logger.info("end grassArticleDao.selectDraftArticleCount: total is {}", total);
int offset = (page - 1) * size;
logger.info("begin grassArticleDao.selectDraftArticleList,offset is {}, limit is {} ", offset, size);
List<GrassArticle> articleList = grassArticleDao.selectDraftArticleList(articleId, authorUids, isPublished, System.currentTimeMillis(), startTimeInt, endTimeInt, offset, size, isExclude, userType,sort);
List<GrassArticle> articleList = grassArticleDao.selectDraftArticleList(articleId, authorUids, isPublished, System.currentTimeMillis(), startTimeInt, endTimeInt, offset, size, isExclude, userType,sort,req.getDispatchChannel());
logger.info("end grassArticleDao.selectDraftArticleCount: offset is {}, limit is {} ", offset, size);
PageResponseVO rsp = new PageResponseVO();
rsp.setList(buildArticleDetail(articleList, true));
... ... @@ -1221,6 +1224,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
grassArticle.setArticleSubtitle(req.getSubtitle());
grassArticle.setSort(sort);
grassArticle.setCopyright(req.getCopyright());
grassArticle.setDispatchChannel(req.getDispatchChannel());
if (type == 3) {
time = Long.valueOf(publishTime) + new Random().nextInt(999);
grassArticle.setIsRecommend(1);
... ... @@ -1395,6 +1399,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
article.setSort(sort);
article.setCopyright(req.getCopyright());
article.setArticleTitle(req.getTitle());
article.setFlowType(req.getFlowType());
article.setDispatchChannel(req.getDispatchChannel());
try {
grassArticleDao.insertArticleSeletive(article);
logger.info("insert grass article success, uid is {}, ariticle id is {}", article.getAuthorUid(), article.getId());
... ... @@ -1811,6 +1817,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
rspBo.setMarkFlag(article.getMarkFlag());
//是否打标到发现好货 0-否 1-是
rspBo.setMarkFindgoods(article.getMarkFindgoods());
//文章分发渠道
rspBo.setDispatchChannel(article.getDispatchChannel());
rspBoList.add(rspBo);
});
return rspBoList;
... ...
... ... @@ -24,7 +24,7 @@
<dependency>
<groupId>com.yoho.service.platform.model</groupId>
<artifactId>platform-service-model</artifactId>
<version>1.2.3-6.9.18-SNAPSHOT</version>
<version>1.2.3-6.9.22-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yoho.dsf.yhplatform</groupId>
... ... @@ -59,12 +59,12 @@
<dependency>
<groupId>com.yohobuy.platform</groupId>
<artifactId>platform-common</artifactId>
<version>1.0.3-6.9.17-SNAPSHOT</version>
<version>1.0.3-6.9.22-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yohobuy.platform</groupId>
<artifactId>platform-dal</artifactId>
<version>1.0.3-6.9.18-SNAPSHOT</version>
<version>1.0.3-6.9.22-SNAPSHOT</version>
</dependency>
... ...
... ... @@ -52,6 +52,8 @@
</input>
<input class="easyui-combobox" id="userType">
</input>
<input class="easyui-combobox" id="dispatchChannel">
</input>
<!--<input id="startTimeStr" name="startTimeStr" class="easyui-datetimebox" data-options="prompt:'开始时间'"/>-->
<!--<input id="endTimeStr" name="endTimeStr" class="easyui-datetimebox" data-options="prompt:'结束时间'"/>-->
... ... @@ -89,6 +91,7 @@
$("#isPublished").combobox("setValue","");
$("#authorId").textbox("setValue","");
$("#userType").combobox("setValue","");
$("#dispatchChannel").combobox("setValue","");
$("#activityListTable").datagrid("load", {
});
... ... @@ -126,6 +129,15 @@
data:[{text:"全部",value:"8"},{text:"待发布",value:"0"},{text:"未发布",value:"1"}]
});
$("#dispatchChannel").combobox({
valueField : "value",
textField : "text",
required:false,
editable:false,
prompt: "分发渠道",
data:[{text:"全部",value:"-1"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
$("#userType").combobox({
valueField: "id",
... ... @@ -168,7 +180,8 @@
userType: $("#userType").combobox("getValue"),
isPublished: $("#isPublished").combobox("getValue"),
authorUid: $("#authorId").textbox("getValue"),
sort:$("#sortParam").combobox("getValue")
sort:$("#sortParam").combobox("getValue"),
dispatchChannel: $("#dispatchChannel").combobox("getValue")
});
}
});
... ... @@ -327,6 +340,25 @@
},
{
title: "分发渠道",
field: "dispatchChannel",
width: 25,
align: "left",
formatter: function (value, rowData, rowIndex) {
var str = '';
if(rowData.dispatchChannel == '-1'){
str = "全部";
}
else if(rowData.dispatchChannel == '1'){
str = "社区";
}else if(rowData.dispatchChannel == '2'){
str = "导购";
}
return str;
}
},
{
title: "状态",
field: "isPublished",
width: 25,
... ...
... ... @@ -62,6 +62,15 @@
</tr>
<tr style="height: 60px">
<td style="width:100%;">
<div style="float: left;width:700px;" >
<span style="color:red">*</span><label style="font-size: 14px;">选择分发渠道</label> <br>
<input class="easyui-combobox" id="dispatchChannelExt" name="dispatchChannel" style="width:600px ">
</div>
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<label style="font-size: 14px;">标题</label> <br>
... ... @@ -330,6 +339,14 @@
}
});
$("#dispatchChannelExt").combobox({
valueField : "value",
textField : "text",
required:true,
prompt: "选择分发渠道",
data:[{text:"全部",value:"0"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
$("#articleUid").textbox({
required: true,
missingMessage: "发布用户不能为空",
... ... @@ -648,6 +665,10 @@
if (data){
$("#articleUid").textbox("setValue", data.authorUid);
//分发渠道
if(data.dispatchChannel !=null && data.dispatchChannel!=null){
$("#dispatchChannelExt").combobox('setValue',data.dispatchChannel);
}
$("#title").textbox("setValue",data.articleTitle);
// $("#content").val(data.articleContent);
$("#content").emojioneArea()[0].emojioneArea.setText(data.articleContent);
... ...
... ... @@ -74,6 +74,15 @@
</tr>
<tr style="height: 60px">
<td style="width:100%;">
<div style="float: left;width:700px;" >
<span style="color:red">*</span><label style="font-size: 14px;">选择分发渠道</label> <br>
<input class="easyui-combobox" id="dispatchChannel" name="dispatchChannel" style="width:600px ">
</div>
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<label style="font-size: 14px;">标题</label> <br>
... ... @@ -353,6 +362,14 @@
// }
// });
$("#dispatchChannel").combobox({
valueField : "value",
textField : "text",
required:true,
prompt: "选择分发渠道",
data:[{text:"全部",value:"0"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
$("#articleUid").textbox({
required: true,
missingMessage: "发布用户不能为空",
... ...
... ... @@ -80,6 +80,8 @@
</input>
<input class="easyui-combobox" id="markFlag">
</input>
<input class="easyui-combobox" id="dispatchChannel">
</input>
<a id="searchBtn" class="btn-info">筛选</a>
<!--<a id="addActivityBtn" class="btn-success">新增</a>-->
<a id="allBtn" class="btn-info">全部 </a>
... ... @@ -111,6 +113,9 @@
$("#startTimeStr").datetimebox('setValue',"");
$("#endTimeStr").datetimebox('setValue',"");
$("#authStatus").combobox("setValue","-1");
$("#dispatchChannel").combobox("setValue","");
$("#markFlag").combobox("setValue","");
$("#markType").combobox("setValue","");
$("#activityListTable").datagrid("load", {
authStatus: "1"
});
... ... @@ -235,6 +240,15 @@
prompt: "标记类型",
data:[{text:"全部",value:"-1"},{text:"达人搭配",value:"1"},{text:"发现好货",value:"2"}]
});
$("#dispatchChannel").combobox({
valueField : "value",
textField : "text",
required:false,
editable:false,
prompt: "分发渠道",
data:[{text:"全部",value:"-1"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
UE.Editor.prototype.getActionUrl = function(action) {
... ... @@ -283,7 +297,8 @@
endTimeStr:endTime,
sort:$("#sortParam").combobox("getValue"),
markFlag:markFlag,
markFindgoods:markFindgoods
markFindgoods:markFindgoods,
dispatchChannel: $("#dispatchChannel").combobox("getValue")
});
}
});
... ... @@ -520,6 +535,24 @@
}
},
{
title: "分发渠道",
field: "dispatchChannel",
width: 25,
align: "left",
formatter: function (value, rowData, rowIndex) {
var str = '';
if(rowData.dispatchChannel == '-1'){
str = "全部";
}
else if(rowData.dispatchChannel == '1'){
str = "社区";
}else if(rowData.dispatchChannel == '2'){
str = "导购";
}
return str;
}
},
{
title: "操作",
field: "ddg",
width: 50,
... ...
... ... @@ -94,6 +94,15 @@
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%;">
<div style="float: left;width:700px;" >
<span style="color:red">*</span><label style="font-size: 14px;">选择分发渠道</label> <br>
<input class="easyui-combobox" id="dispatchChannelExt" name="dispatchChannel" style="width:600px ">
</div>
</td>
</tr>
<tr style="height: 60px" id = "contentTR">
<td style="width:100% ">
<label style="font-size: 14px;">正文内容</label> <br>
... ... @@ -338,6 +347,14 @@
}
});
$("#dispatchChannelExt").combobox({
valueField : "value",
textField : "text",
required:true,
prompt: "选择分发渠道",
data:[{text:"全部",value:"0"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
$("#actionUrl").textbox({
required: false,
prompt: "APP内容链接",
... ... @@ -833,9 +850,13 @@
debugger;
var data = paramObject.mkData;
if (data){
//分发渠道
if(data.dispatchChannel !=null && data.dispatchChannel!=null){
$("#dispatchChannelExt").combobox('setValue',data.dispatchChannel);
}
$("#articleUid").textbox("setValue", data.authorUid);
$("#draftArticleId").val(data.articleId);
// $("#content").val(data.articleContent);
... ...
... ... @@ -115,6 +115,15 @@
</tr>
<tr style="height: 60px">
<td style="width:100%;">
<div style="float: left;width:700px;" >
<span style="color:red">*</span><label style="font-size: 14px;">选择分发渠道</label> <br>
<input class="easyui-combobox" id="dispatchChannel" name="dispatchChannel" style="width:600px ">
</div>
</td>
</tr>
<tr style="height: 60px">
<td style="width:100% ">
<label style="font-size: 14px;">正文内容</label> <br>
<div style="float: left;width:700px;" >
... ... @@ -295,6 +304,14 @@
{text: "其他", value: "4"}]
});
$("#dispatchChannel").combobox({
valueField : "value",
textField : "text",
required:true,
prompt: "选择分发渠道",
data:[{text:"全部",value:"0"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
$("#userBotton").linkbutton({
iconCls : "icon-search",
... ...
... ... @@ -78,6 +78,15 @@
</tr>
<tr style="height: 60px">
<td style="width:100%;">
<div style="float: left;width:700px;" >
<span style="color:red">*</span><label style="font-size: 14px;">选择分发渠道</label> <br>
<input class="easyui-combobox" id="dispatchChannel" name="dispatchChannel" style="width:600px ">
</div>
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<label style="font-size: 14px;">标题</label> <br>
... ... @@ -353,6 +362,14 @@
}
});
$("#dispatchChannel").combobox({
valueField : "value",
textField : "text",
required:true,
prompt: "选择分发渠道",
data:[{text:"全部",value:"0"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
$("#topicId").combobox({
prompt: "选择话题",
required: false,
... ...
... ... @@ -64,6 +64,15 @@
</tr>
<tr style="height: 60px">
<td style="width:100%;">
<div style="float: left;width:700px;" >
<span style="color:red">*</span><label style="font-size: 14px;">选择分发渠道</label> <br>
<input class="easyui-combobox" id="dispatchChannelExt" name="dispatchChannel" style="width:600px ">
</div>
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<label style="font-size: 14px;">标题</label> <br>
... ... @@ -361,6 +370,14 @@
$("#content-count").text(count);
});
$("#dispatchChannelExt").combobox({
valueField : "value",
textField : "text",
required:true,
prompt: "选择分发渠道",
data:[{text:"全部",value:"0"},{text:"社区",value:"1"},{text:"导购",value:"2"}]
});
$("#labelId").combobox({
prompt: "请选择标签",
required: false,
... ... @@ -737,6 +754,11 @@
$("#articleUid").textbox("setValue", data.yhUid);
$("#draftArticleId").val(data.articleId);
//分发渠道
if(data.dispatchChannel !=null && data.dispatchChannel !=-1){
$("#dispatchChannelExt").combobox('setValue',data.dispatchChannel);
}
var context = data.contentText;
if(context == null || context == '' || context == undefined){
context = data.articleContent;
... ...