Authored by chaogeng

Merge branch 'test6.9.3' of http://git.yoho.cn/platform/platform-cms into test6.9.3

# Conflicts:
#	grass/src/main/java/com/yohobuy/platform/grass/restapi/CMSHtmlController.java
... ... @@ -42,8 +42,11 @@ public class CMSHtmlController {
response.setContentType("application/json; charset=UTF-8");
try{
//取context下的html文件转成文件流
String filePath = request.getServletContext().getRealPath(url);
fis = new FileInputStream(filePath);
String filePath = request.getServletContext().getRealPath("/");
logger.info("getContentHtml: filePath is {}", filePath);
File f = new File(filePath + url);
logger.info("getContentHtml: file is {}, file path is {}", f, f.getPath());
fis = new FileInputStream(filePath + url);
os = new BufferedOutputStream(response.getOutputStream());
ByteArrayOutputStream swapStream = new ByteArrayOutputStream();
... ...
... ... @@ -828,7 +828,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
grassArticleTopic.setCreateTime(time);
grassArticleTopicDao.insertArticleTopic(grassArticleTopic);
if(type == 2){ //2 编辑后直接发布
//后期增加(清缓存)
//后期增加(清理话题缓存)
GrassCacheReq cacheReq = new GrassCacheReq();
cacheReq.setClearCode(1005);
cacheReq.setTopicId(topicId);
... ... @@ -856,9 +856,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
grassArticleDeleteLogDao.insertByGrassArticleDeleteLog(grassArticleDeleteLog);
//删除文章关联数据
grassArticleBlockDao.deleteRealByArticleId(articleId);
grassArticleCommentDao.deleteByDestIdAndColumnType(articleId,GrassArticleComment.ColumnType.ARTICLE.getValue());
grassArticlePraiseDao.deleteByArticleId(articleId);
userFavoriteArticleDao.deleteByArticleId(articleId);
//前台展示消息盒子的时候存在问题,所以不执行以下操作
// grassArticleCommentDao.deleteByDestIdAndColumnType(articleId,GrassArticleComment.ColumnType.ARTICLE.getValue());
// grassArticlePraiseDao.deleteByArticleId(articleId);
// userFavoriteArticleDao.deleteByArticleId(articleId);
grassArticleLabelDao.deleteByArticleId(articleId);
grassArticleProductDao.deleteRealByArticleId(articleId);
... ...
... ... @@ -34,16 +34,19 @@ public class GrassRefreshCacheServiceImpl implements IGrassRefreshCacheService{
if(reqVO == null || reqVO.getClearCode() == 0){
return;
}
logger.info("refreshGrassCache: param is {}", reqVO);
executorService.execute(new Runnable() {
@Override
public void run() {
String elementId = reqVO.getElementId();
int clearCode = reqVO.getClearCode();
int uid = reqVO.getUid();
Integer topicId = reqVO.getTopicId();
Integer topicId = reqVO.getTopicId() ;
try{
String url = apiUrl + "?method=clear.grass.cache&elementId=" + elementId + "&clearCode=" + clearCode + "&uid=" + uid+"&userType=" +reqVO.getUserType()
+ "&topicId=" + topicId;
String url = apiUrl + "?method=clear.grass.cache&elementId=" + elementId + "&clearCode=" + clearCode + "&uid=" + uid+"&userType=" +reqVO.getUserType();
if(topicId != null){
url += "&topicId=" + topicId;
}
logger.info("before refreshGrassCache, url is: {}, reqVo is {}", url, reqVO);
serviceCaller.get("app.clearGrassCache", url, null, String.class, null);
}catch (Exception e){
... ...
... ... @@ -302,7 +302,7 @@ public class GrassUserServiceImpl implements IGrassUserService{
Integer groupId = user.getGroupId() == null ? 0 : user.getGroupId();//默认分组
bo.setGroupName(groupNameMap.get(groupId) == null ? "" : groupNameMap.get(groupId));
bo.setAuthStatus(user.getAuthStatus());
bo.setSkillsDesc(user.getSkillsDesc());
bo.setSkillsDesc(user.getSkillsDesc() == null ? "" : user.getSkillsDesc() );
bo.setId(user.getId());
result.add(bo);
}
... ...
... ... @@ -261,9 +261,9 @@ public class GrassUserVirtualImpl implements IGrassVirtualService{
private void sendMessage(List<GrassInBoxAddReq> reqList) {
//(调sns接口,批量发送站内信)
try{
String url = apiUrl + "?method=app.grass.addBatchInBoxNew";
String url = apiUrl + "/guang/api/addBatchInBoxNew?client_type=h5";
logger.info("before addBatchInBoxNew, url is: {}, req is {}", url, reqList);
serviceCaller.post("app.clearGrassCache", url, reqList, String.class, null);
serviceCaller.post("gateway.addBatchInBoxNew", url, reqList, String.class, null);
}catch (Exception e){
logger.info("failed refreshGrassCache, req is {}, error is {}", reqList , e);
}
... ...
... ... @@ -49,9 +49,9 @@
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>擅长领域</label> <br>
<span style="color:red"></span><label>擅长领域</label> <br>
<textarea id="skillsDesc" name="skillsDesc" style="width: 380px;" rows="6" placeholder=""
required="true" maxlength="500"></textarea>
maxlength="500"></textarea>
<br>
<label>100字以内,案例:美食生活、数码电子、时尚穿搭</label>
</td>
... ... @@ -177,7 +177,7 @@
//图片
$("#imageUpload").imageUpload('setValue', data.headIcon);
$("#signature").html(data.signature);
$("#skillsDesc").html(data.skillsDesc);
$("#skillsDesc").html(data.skillsDesc== null ? "":data.skillsDesc);
//所属分组
$("#groupId").combobox('setValue', data.groupId);
$("input[name='authStatus'][value='" + data.authStatus + "']").attr("checked", "checked").parent().addClass('checked');
... ...
... ... @@ -269,7 +269,7 @@
var str = "";
str += "<a role='edit' dataId='" + rowData.id + "' style='margin-left:10px;background-color: #31b0d5' index='" + rowIndex + "'>编辑</a>";
str += "<a role='close' style='margin-left:10px;background-color: #ffa951' dataId='"+ rowData.id +"' index='"+ rowIndex +"'>踢除</a>";
if(rowData.groupId == 1){//是普通马甲,才提供启用、停用功能(在马甲增粉、点赞时该字段起作用)
if(rowData.groupId == 1 || rowData.groupId == 4 || rowData.groupId == 6 ){//是普通马甲,普通马甲 社区大号 外部刷评论马甲 才提供启用、停用功能(在马甲增粉、点赞时该字段起作用)
if(rowData.status == 1){
str += "<a role='changeStatus' style='margin-left:10px;background-color: #5374ff' changedStatus='0' dataId='" + rowData.id + "' index='" + rowIndex + "'>停用</a>";
}else{
... ... @@ -416,12 +416,11 @@
return false;
}
var skillsDesc = $("#skillsDesc").val();
/* var skillsDesc = $("#skillsDesc").val();
if(skillsDesc == null || skillsDesc == ""){
$.messager.alert("失败", "请输入擅长领域", "info");
return false;
}
}*/
$.messager.progress({
... ...