Authored by liangyi.chen@yoho.cn

增加AT用户校验

... ... @@ -826,6 +826,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
grassArticleLabelDao.updateByPrimaryKeySelective(grassArticleLabel);
clearArticleNewCache(articleId);
logger.info("updateArticle updateByPrimaryKeySelective success! type={}", type);
//后台文章发布成功需要给被at的用户发送站内信通知
sendInBoxForAtUsers(articleId,grassArticle.getAuthorUid(),false);
}
}
... ... @@ -1253,6 +1255,12 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
}else {
timerArticlePushJob.removeTimerArticleJob(articleId);
}
if(type == 2){
//后台文章发布成功需要给被at的用户发送站内信通知
sendInBoxForAtUsers(articleId,req.getAuthorUid(),false);
}
clearArticleNewCache(articleId);
}
... ...
... ... @@ -86,6 +86,17 @@
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<a id="verifyUserBotton" class="btn btn-small" style="font-size: 18px; " >@用户信息查看</a>
</td>
</tr>
<tr>
<td style="width:100%; word-wrap:break-word;">
<div id="atUserInfo" style="float: left;margin-left: 30px;"></div></td>
</tr>
<tr style="height: 60px">
<td>
<label style="font-size: 14px;">选择标签</label> <br>
<input id="labelId" name="labelId" class="easyui-combobox" style="width:600px; "/><br>
... ... @@ -307,6 +318,47 @@
}
});
$("#verifyUserBotton").linkbutton({
iconCls : "icon-search",
onClick : function() {
//发送请求
$.ajax({
type: "POST",
url: serverContextPath + "/grassArticle/verifyAtUser", //提交到后端的url
dataType: 'json',
data:{
content : $("#content").val()
},
success: function (result) {
if(result.code == 200) {
var userList = result.data;
if(userList !=null && userList.length > 0){
var html = '';
for (i = 0; i < userList.length; i++) {
var userInfo = userList[i];
var headIco = userInfo.headIco.substring(0, userInfo.headIco.indexOf("?"));
html += "<span style='font-size: 15px;'>&nbsp&nbsp<label>"+userInfo.uid+"</label></span>&nbsp&nbsp&nbsp&nbsp";
html += "<span style='font-size: 15px;'>&nbsp&nbsp<label>"+userInfo.nickName+"</label></span>&nbsp&nbsp&nbsp&nbsp";
html += "<span style='font-size: 18px;'>&nbsp&nbsp<img src='"+headIco+"' width='60px;' height='60px;'></span><br>";
}
$("#atUserInfo").html(html);
}else{
var html = '<span style="color:red;font-size: 15px;">没有查到有效的用户信息</span>';
$("#atUserInfo").html(html);
}
}
else {
var html = '<span style="color:red;font-size: 15px;">获取用户信息失败,请稍后重试</span>';
$("#atUserInfo").html(html);
}
}
});
}
});
/*字数限制*/
// $("#content").on("input propertychange", function() {
// debugger
... ...
... ... @@ -86,6 +86,18 @@
<!--<div style="clear: both;"> <span id="content-count">0</span>/500</div>-->
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<a id="verifyUserBotton" class="btn btn-small" style="font-size: 18px; " >@用户信息查看</a>
</td>
</tr>
<tr>
<td style="width:100%; word-wrap:break-word;">
<div id="atUserInfo" style="float: left;margin-left: 30px;"></div></td>
</tr>
<tr style="height: 155px">
<td style="width:100%;">
<span style="color:red">*</span><label style="font-size: 14px;">上传视频</label> <br>
... ... @@ -271,6 +283,47 @@
}
});
$("#verifyUserBotton").linkbutton({
iconCls : "icon-search",
onClick : function() {
//发送请求
$.ajax({
type: "POST",
url: serverContextPath + "/grassArticle/verifyAtUser", //提交到后端的url
dataType: 'json',
data:{
content : $("#content").val()
},
success: function (result) {
if(result.code == 200) {
var userList = result.data;
if(userList !=null && userList.length > 0){
var html = '';
for (i = 0; i < userList.length; i++) {
var userInfo = userList[i];
var headIco = userInfo.headIco.substring(0, userInfo.headIco.indexOf("?"));
html += "<span style='font-size: 15px;'>&nbsp&nbsp<label>"+userInfo.uid+"</label></span>&nbsp&nbsp&nbsp&nbsp";
html += "<span style='font-size: 15px;'>&nbsp&nbsp<label>"+userInfo.nickName+"</label></span>&nbsp&nbsp&nbsp&nbsp";
html += "<span style='font-size: 18px;'>&nbsp&nbsp<img src='"+headIco+"' width='60px;' height='60px;'></span><br>";
}
$("#atUserInfo").html(html);
}else{
var html = '<span style="color:red;font-size: 15px;">没有查到有效的用户信息</span>';
$("#atUserInfo").html(html);
}
}
else {
var html = '<span style="color:red;font-size: 15px;">获取用户信息失败,请稍后重试</span>';
$("#atUserInfo").html(html);
}
}
});
}
});
$("#timerBotton").linkbutton({
iconCls : "icon-search",
onClick : function() {
... ...
... ... @@ -87,6 +87,17 @@
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<a id="verifyUserBotton" class="btn btn-small" style="font-size: 18px; " >@用户信息查看</a>
</td>
</tr>
<tr>
<td style="width:100%; word-wrap:break-word;">
<div id="atUserInfo" style="float: left;margin-left: 30px;"></div></td>
</tr>
<tr style="height: 60px">
<td>
<label style="font-size: 14px;">选择标签</label> <br>
<input id="labelId" name="labelId" class="easyui-combobox" style="width:600px; "/><br>
... ... @@ -254,6 +265,47 @@
}
});
$("#verifyUserBotton").linkbutton({
iconCls : "icon-search",
onClick : function() {
//发送请求
$.ajax({
type: "POST",
url: serverContextPath + "/grassArticle/verifyAtUser", //提交到后端的url
dataType: 'json',
data:{
content : $("#content").val()
},
success: function (result) {
if(result.code == 200) {
var userList = result.data;
if(userList !=null && userList.length > 0){
var html = '';
for (i = 0; i < userList.length; i++) {
var userInfo = userList[i];
var headIco = userInfo.headIco.substring(0, userInfo.headIco.indexOf("?"));
html += "<span style='font-size: 15px;'>&nbsp&nbsp<label>"+userInfo.uid+"</label></span>&nbsp&nbsp&nbsp&nbsp";
html += "<span style='font-size: 15px;'>&nbsp&nbsp<label>"+userInfo.nickName+"</label></span>&nbsp&nbsp&nbsp&nbsp";
html += "<span style='font-size: 18px;'>&nbsp&nbsp<img src='"+headIco+"' width='60px;' height='60px;'></span><br>";
}
$("#atUserInfo").html(html);
}else{
var html = '<span style="color:red;font-size: 15px;">没有查到有效的用户信息</span>';
$("#atUserInfo").html(html);
}
}
else {
var html = '<span style="color:red;font-size: 15px;">获取用户信息失败,请稍后重试</span>';
$("#atUserInfo").html(html);
}
}
});
}
});
$("#articleUid").textbox({
required: true,
missingMessage: "发布用户不能为空",
... ...