Merge remote-tracking branch 'origin/5.2' into 5.2

This commit is contained in:
sgjj 2020-10-31 11:18:03 +08:00
commit 1e6ebdcc4a
2 changed files with 5 additions and 9 deletions

View File

@ -1,9 +1,4 @@
ALTER TABLE `mdiy_model`
CHANGE COLUMN `model_app_id` `app_id` int(11) NULL DEFAULT NULL COMMENT '应用编号' AFTER `model_json`;
ALTER TABLE `mdiy_dict`
ADD COLUMN `dict_enable` varchar(11) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '1' COMMENT '启用状态' AFTER `is_child`;

ALTER TABLE `cms_category` ADD COLUMN `leaf` bigint(1) NULL DEFAULT NULL COMMENT '是否是叶子节点' AFTER `category_pinyin`;
ALTER TABLE `cms_category` ADD COLUMN `top_id` bigint(20) NULL DEFAULT NULL COMMENT '顶级id' AFTER `leaf`;
ALTER TABLE `cms_category` MODIFY COLUMN `id` bigint(20) UNSIGNED NOT NULL FIRST ;

View File

@ -22,6 +22,7 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@ -183,11 +184,11 @@ public class ContentAction extends BaseAction {
@LogAnn(title = "删除文章", businessType = BusinessTypeEnum.DELETE)
@RequiresPermissions("cms:content:del")
public ResultData delete(@RequestBody List<ContentEntity> contents, HttpServletResponse response, HttpServletRequest request) {
int[] ids = new int[contents.size()];
List<String> ids = new ArrayList<>();
for(int i = 0;i<contents.size();i++){
ids[i] =Integer.parseInt(contents.get(i).getId()) ;
ids.add(contents.get(i).getId());
}
contentBiz.delete(ids);
contentBiz.removeByIds(ids);
return ResultData.build().success();
}
/**