|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.jingcheng.cms.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.jingcheng.cms.constants.Constants;
|
|
|
|
|
import com.jingcheng.cms.mapper.ArticleMapper;
|
|
|
|
@ -143,5 +144,25 @@ public class ArticleSerivceImpl implements ArticleSerive {
|
|
|
|
|
return pageJson;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public AjaxResult delArticleList(JSONObject jsonObject) {
|
|
|
|
|
AjaxResult ajaxResult = new AjaxResult();
|
|
|
|
|
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
|
|
|
|
if (null == jsonArray || jsonArray.size() == 0 ){
|
|
|
|
|
ajaxResult.setRetmsg("id列表不可为空");
|
|
|
|
|
return ajaxResult;
|
|
|
|
|
}
|
|
|
|
|
List<Long> idList = JSONObject.parseArray(jsonArray.toJSONString(), Long.class);
|
|
|
|
|
for (Long id : idList){
|
|
|
|
|
Article article = articleMapper.selectByPrimaryKey(id);
|
|
|
|
|
if (null == article){
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
article.setState(Constants.DISABLE);
|
|
|
|
|
articleMapper.updateByPrimaryKeySelective(article);
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|