Commit aab396fb by fsn

修改删除字典的业务

parent 3965e1da
package com.stylefeng.guns.modular.system.controller; package com.stylefeng.guns.modular.system.controller;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.stylefeng.guns.common.annotion.log.BussinessLog; import com.stylefeng.guns.common.annotion.log.BussinessLog;
import com.stylefeng.guns.common.controller.BaseController; import com.stylefeng.guns.common.controller.BaseController;
import com.stylefeng.guns.common.exception.BizExceptionEnum; import com.stylefeng.guns.common.exception.BizExceptionEnum;
...@@ -116,7 +118,15 @@ public class DictController extends BaseController { ...@@ -116,7 +118,15 @@ public class DictController extends BaseController {
@RequestMapping(value = "/delete/{dictId}") @RequestMapping(value = "/delete/{dictId}")
@ResponseBody @ResponseBody
public Object delete(@PathVariable("dictId") Integer dictId) { public Object delete(@PathVariable("dictId") Integer dictId) {
//删除这个字典的子词典
Wrapper<Dict> dictEntityWrapper = new EntityWrapper<>();
dictEntityWrapper = dictEntityWrapper.eq("pid", dictId);
dictMapper.delete(dictEntityWrapper);
//删除这个词典
dictMapper.deleteById(dictId); dictMapper.deleteById(dictId);
return SUCCESS_TIP; return SUCCESS_TIP;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment