22695-功能管理-菜单删除
parent
44c7ee028d
commit
ce6d9bbc90
@ -0,0 +1,98 @@
|
|||||||
|
package cn.estsh.i3plus.core.apiservice.controller.busi;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.core.api.iservice.busi.ICoreMemTreeService;
|
||||||
|
import cn.estsh.i3plus.core.api.iservice.busi.IPersonnelService;
|
||||||
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysMenuService;
|
||||||
|
import cn.estsh.i3plus.platform.common.exception.BaseImppException;
|
||||||
|
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
|
||||||
|
import cn.estsh.i3plus.platform.common.tool.ExcelTool;
|
||||||
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
||||||
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
||||||
|
import cn.estsh.i3plus.platform.common.util.FileContentTypeTool;
|
||||||
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
||||||
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.platform.bean.SysMenu;
|
||||||
|
import cn.estsh.impp.framework.base.controller.CrudBaseController;
|
||||||
|
import cn.estsh.impp.framework.base.service.ICrudService;
|
||||||
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
||||||
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||||
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
||||||
|
import cn.estsh.impp.framework.boot.util.ImppRedis;
|
||||||
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||||
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.persistence.EntityManager;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 系统功能对外接口
|
||||||
|
* @Reference :
|
||||||
|
* @Author : wei.peng
|
||||||
|
* @Date : 2018-10-22 15:18:14.982
|
||||||
|
* @Modify :
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "系统功能服务")
|
||||||
|
@RequestMapping(PlatformConstWords.BASE_URL + "/sys-menu-panasonic")
|
||||||
|
public class SysMenuPanasonicController extends CrudBaseController<SysMenu> {
|
||||||
|
|
||||||
|
public static final Logger LOGGER = LoggerFactory.getLogger(SysMenuPanasonicController.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysMenuService menuService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EntityManager entityManager;
|
||||||
|
|
||||||
|
@Resource(name= CommonConstWords.IMPP_REDIS_RES)
|
||||||
|
private ImppRedis redisRes;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICoreMemTreeService memTreeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPersonnelService personnelService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ICrudService getCrudService() {
|
||||||
|
return menuService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CORE - 批量删除
|
||||||
|
* @param id id
|
||||||
|
* @return 处理结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/delete-panasonic/{id}")
|
||||||
|
@ApiOperation(value = "删除消息",notes = "删除消息")
|
||||||
|
public ResultBean deleteSysMenuById(@PathVariable("id") Long id){
|
||||||
|
try {
|
||||||
|
// 数据校验
|
||||||
|
ValidatorBean.checkNotNull(id, "菜单id 不能为空");
|
||||||
|
|
||||||
|
menuService.deleteSysMenuById(id);
|
||||||
|
|
||||||
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
||||||
|
} catch (ImppBusiException busExcep) {
|
||||||
|
return ResultBean.fail(busExcep);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue