Authored by mlge

种草 审核管理 --修改

... ... @@ -10,10 +10,7 @@ import com.yohobuy.platform.common.exception.PlatformException;
import com.yohobuy.platform.common.helper.ImagesHelper;
import com.yohobuy.platform.common.util.DateUtil;
import com.yohobuy.platform.dal.grass.*;
import com.yohobuy.platform.dal.grass.model.GrassArticle;
import com.yohobuy.platform.dal.grass.model.GrassArticleBlock;
import com.yohobuy.platform.dal.grass.model.GrassArticleProduct;
import com.yohobuy.platform.dal.grass.model.GrassTopic;
import com.yohobuy.platform.dal.grass.model.*;
import com.yohobuy.platform.grass.service.IGrassArticleService;
import com.yohobuy.platform.model.common.PageResponseVO;
import com.yohobuy.platform.model.grass.request.GrassArticleReq;
... ... @@ -50,6 +47,9 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
@Resource
private IGrassTopicDAO grassTopicDAO;
@Resource
private IGrassArticleLabelDao grassArticleLabelDao;
@Autowired
private ServiceCaller serviceCaller;
... ... @@ -310,13 +310,19 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
//审核 通过--不通过
if(type == 2){
Integer authStatus = req.getAuthStatus();;
Integer authStatus = req.getAuthStatus();
Integer articleId = req.getArticleId();
GrassArticle grassArticle = new GrassArticle();
grassArticle.setId(req.getArticleId());
grassArticle.setId(articleId);
grassArticle.setAuthStatus(authStatus);
grassArticle.setAuthorizeAccount(req.getAuthorizeAccount());
grassArticle.setAuthTime(System.currentTimeMillis());
grassArticleDao.updateByPrimaryKeySelective(grassArticle);
//审核通过 或者不通过 需要修改article_label表--便于前台标签相关的文章 分页查询
GrassArticleLabel grassArticleLabel = new GrassArticleLabel();
grassArticleLabel.setArticleId(articleId);
grassArticleLabel.setAuthStatus(authStatus);//审核状态
grassArticleLabelDao.updateByPrimaryKeySelective(grassArticleLabel);
logger.info("updateArticle changeAuthStatus success! req={}",req);
}
... ...
... ... @@ -346,6 +346,8 @@ datasources:
- com.yohobuy.platform.dal.grass.IGrassGoodsCommentDao
- com.yohobuy.platform.dal.grass.IGrassArticleCommentDao
- com.yohobuy.platform.dal.grass.IGrassUserAchieveDAO
- com.yohobuy.platform.dal.grass.IGrassArticleLabelDao
... ...
... ... @@ -344,6 +344,7 @@ datasources:
- com.yohobuy.platform.dal.grass.IGrassGoodsCommentDao
- com.yohobuy.platform.dal.grass.IGrassArticleCommentDao
- com.yohobuy.platform.dal.grass.IGrassUserAchieveDAO
- com.yohobuy.platform.dal.grass.IGrassArticleLabelDao
yhb_promotion:
servers:
- ${jdbc.mysql.yhbpromotion.master}
... ...
... ... @@ -248,6 +248,12 @@
str += "<a role='switchR' class='btn-success' dataId='"+rowData.articleId+"' status='1' style='margin-left:10px'>审核通过</a>";
str += "<a role='switchR' class='btn-success' dataId='"+rowData.articleId+"' status='2' style='margin-left:10px'>不通过</a>";
}
if(rowData.authStatus==1){//审核通过了--允许驳回
str += "<a role='switchR' class='btn-success' dataId='"+rowData.articleId+"' status='2' style='margin-left:10px'>不通过</a>";
}
if(rowData.authStatus==2){//审核不通过的--允许通过
str += "<a role='switchR' class='btn-success' dataId='"+rowData.articleId+"' status='1' style='margin-left:10px'>审核通过</a>";
}
//还有一个编辑按钮
return str;
}
... ...