diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SysDic.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SysDic.java new file mode 100644 index 00000000..09096d2b --- /dev/null +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SysDic.java @@ -0,0 +1,164 @@ +package com.bonus.sgzb.base.api.domain; + +import com.bonus.sgzb.common.core.annotation.Excel; +import com.bonus.sgzb.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 数据字典对象 sys_dic + * + * @author bonus + * @date 2023-12-11 + */ +public class SysDic extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 父id */ + @Excel(name = "父id") + private Long pId; + + /** 编码 */ + @Excel(name = "编码") + private String code; + + /** 字典名称 */ + @Excel(name = "字典名称") + private String name; + + /** 描述 */ + @Excel(name = "描述") + private String description; + + /** 值 */ + @Excel(name = "值") + private String value; + + /** 排序 */ + @Excel(name = "排序") + private String sort; + + /** 层级 */ + @Excel(name = "层级") + private String level; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + /** 创建人 */ + @Excel(name = "创建人") + private String creator; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setpId(Long pId) + { + this.pId = pId; + } + + public Long getpId() + { + return pId; + } + public void setCode(String code) + { + this.code = code; + } + + public String getCode() + { + return code; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + public void setValue(String value) + { + this.value = value; + } + + public String getValue() + { + return value; + } + public void setSort(String sort) + { + this.sort = sort; + } + + public String getSort() + { + return sort; + } + public void setLevel(String level) + { + this.level = level; + } + + public String getLevel() + { + return level; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setCreator(String creator) + { + this.creator = creator; + } + + public String getCreator() + { + return creator; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("pId", getpId()) + .append("code", getCode()) + .append("name", getName()) + .append("description", getDescription()) + .append("value", getValue()) + .append("sort", getSort()) + .append("level", getLevel()) + .append("status", getStatus()) + .append("createTime", getCreateTime()) + .append("creator", getCreator()) + .toString(); + } +} diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SysDict.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SysDict.java deleted file mode 100644 index 7728f30a..00000000 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SysDict.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.bonus.sgzb.base.api.domain; - -import com.bonus.sgzb.common.core.annotation.Excel; -import com.bonus.sgzb.common.core.web.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 字典类型对象 sys_dict_type - * - * @author bonus - * @date 2023-12-11 - */ -public class SysDict extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 字典主键 */ - private Long dictId; - - /** 字典名称 */ - @Excel(name = "字典名称") - private String dictName; - - /** 字典类型 */ - @Excel(name = "字典类型") - private String dictType; - - /** 状态(0正常 1停用) */ - @Excel(name = "状态", readConverterExp = "0=正常,1=停用") - private String status; - - public void setDictId(Long dictId) - { - this.dictId = dictId; - } - - public Long getDictId() - { - return dictId; - } - public void setDictName(String dictName) - { - this.dictName = dictName; - } - - public String getDictName() - { - return dictName; - } - public void setDictType(String dictType) - { - this.dictType = dictType; - } - - public String getDictType() - { - return dictType; - } - public void setStatus(String status) - { - this.status = status; - } - - public String getStatus() - { - return status; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("dictId", getDictId()) - .append("dictName", getDictName()) - .append("dictType", getDictType()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/SysDicController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/SysDicController.java new file mode 100644 index 00000000..ee922143 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/SysDicController.java @@ -0,0 +1,105 @@ +package com.bonus.sgzb.base.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.bonus.sgzb.base.api.domain.SysDic; +import com.bonus.sgzb.base.service.ISysDicService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.bonus.sgzb.common.log.annotation.Log; +import com.bonus.sgzb.common.log.enums.BusinessType; +import com.bonus.sgzb.common.security.annotation.RequiresPermissions; +import com.bonus.sgzb.common.core.web.controller.BaseController; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; +import com.bonus.sgzb.common.core.utils.poi.ExcelUtil; +import com.bonus.sgzb.common.core.web.page.TableDataInfo; + +/** + * 数据字典Controller + * + * @author bonus + * @date 2023-12-11 + */ +@RestController +@RequestMapping("/dic") +public class SysDicController extends BaseController +{ + @Autowired + private ISysDicService sysDicService; + + /** + * 查询数据字典列表 + */ + @RequiresPermissions("domain:dic:list") + @GetMapping("/list") + public TableDataInfo list(SysDic sysDic) + { + startPage(); + List list = sysDicService.selectSysDicList(sysDic); + return getDataTable(list); + } + + /** + * 导出数据字典列表 + */ + @RequiresPermissions("domain:dic:export") + @Log(title = "数据字典", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysDic sysDic) + { + List list = sysDicService.selectSysDicList(sysDic); + ExcelUtil util = new ExcelUtil(SysDic.class); + util.exportExcel(response, list, "数据字典数据"); + } + + /** + * 获取数据字典详细信息 + */ + @RequiresPermissions("domain:dic:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysDicService.selectSysDicById(id)); + } + + /** + * 新增数据字典 + */ + @RequiresPermissions("domain:dic:add") + @Log(title = "数据字典", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysDic sysDic) + { + return toAjax(sysDicService.insertSysDic(sysDic)); + } + + /** + * 修改数据字典 + */ + @RequiresPermissions("domain:dic:edit") + @Log(title = "数据字典", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysDic sysDic) + { + return toAjax(sysDicService.updateSysDic(sysDic)); + } + + /** + * 删除数据字典 + */ + @RequiresPermissions("domain:dic:remove") + @Log(title = "数据字典", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysDicService.deleteSysDicByIds(ids)); + } +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/SysDictController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/SysDictController.java deleted file mode 100644 index 05d557ec..00000000 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/SysDictController.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.bonus.sgzb.base.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import com.bonus.sgzb.base.api.domain.SysDict; -import com.bonus.sgzb.base.service.ISysDictService; -import com.bonus.sgzb.common.core.utils.poi.ExcelUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.bonus.sgzb.common.log.annotation.Log; -import com.bonus.sgzb.common.log.enums.BusinessType; -import com.bonus.sgzb.common.security.annotation.RequiresPermissions; -import com.bonus.sgzb.common.core.web.controller.BaseController; -import com.bonus.sgzb.common.core.web.domain.AjaxResult; -import com.bonus.sgzb.common.core.web.page.TableDataInfo; - -/** - * 字典类型Controller - * - * @author bonus - * @date 2023-12-11 - */ -@RestController -@RequestMapping("/type") -public class SysDictController extends BaseController -{ - @Autowired - private ISysDictService sysDictService; - - /** - * 查询字典类型列表 - */ - @RequiresPermissions("domain:type:list") - @GetMapping("/list") - public TableDataInfo list(SysDict sysDict) - { - startPage(); - List list = sysDictService.selectSysDictTypeList(sysDict); - return getDataTable(list); - } - - /** - * 导出字典类型列表 - */ - @RequiresPermissions("domain:type:export") - @Log(title = "字典类型", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, SysDict sysDict) - { - List list = sysDictService.selectSysDictTypeList(sysDict); - ExcelUtil util = new ExcelUtil(SysDict.class); - util.exportExcel(response, list, "字典类型数据"); - } - - /** - * 获取字典类型详细信息 - */ - @RequiresPermissions("domain:type:query") - @GetMapping(value = "/{dictId}") - public AjaxResult getInfo(@PathVariable("dictId") Long dictId) - { - return success(sysDictService.selectSysDictTypeByDictId(dictId)); - } - - /** - * 新增字典类型 - */ - @RequiresPermissions("domain:type:add") - @Log(title = "字典类型", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody SysDict sysDict) - { - return toAjax(sysDictService.insertSysDictType(sysDict)); - } - - /** - * 修改字典类型 - */ - @RequiresPermissions("domain:type:edit") - @Log(title = "字典类型", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody SysDict sysDict) - { - return toAjax(sysDictService.updateSysDictType(sysDict)); - } - - /** - * 删除字典类型 - */ - @RequiresPermissions("domain:type:remove") - @Log(title = "字典类型", businessType = BusinessType.DELETE) - @DeleteMapping("/{dictIds}") - public AjaxResult remove(@PathVariable Long[] dictIds) - { - return toAjax(sysDictService.deleteSysDictTypeByDictIds(dictIds)); - } -} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/SysDicMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/SysDicMapper.java new file mode 100644 index 00000000..967b22ec --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/SysDicMapper.java @@ -0,0 +1,63 @@ +package com.bonus.sgzb.base.mapper; + +import com.bonus.sgzb.base.api.domain.SysDic; + +import java.util.List; + + +/** + * 数据字典Mapper接口 + * + * @author bonus + * @date 2023-12-11 + */ +public interface SysDicMapper +{ + /** + * 查询数据字典 + * + * @param id 数据字典主键 + * @return 数据字典 + */ + public SysDic selectSysDicById(Long id); + + /** + * 查询数据字典列表 + * + * @param sysDic 数据字典 + * @return 数据字典集合 + */ + public List selectSysDicList(SysDic sysDic); + + /** + * 新增数据字典 + * + * @param sysDic 数据字典 + * @return 结果 + */ + public int insertSysDic(SysDic sysDic); + + /** + * 修改数据字典 + * + * @param sysDic 数据字典 + * @return 结果 + */ + public int updateSysDic(SysDic sysDic); + + /** + * 删除数据字典 + * + * @param id 数据字典主键 + * @return 结果 + */ + public int deleteSysDicById(Long id); + + /** + * 批量删除数据字典 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysDicByIds(Long[] ids); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/SysDictMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/SysDictMapper.java deleted file mode 100644 index d4c319ac..00000000 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/SysDictMapper.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.bonus.sgzb.base.mapper; - -import com.bonus.sgzb.base.api.domain.SysDict; - -import java.util.List; - -/** - * 字典类型Mapper接口 - * - * @author bonus - * @date 2023-12-11 - */ -public interface SysDictMapper -{ - /** - * 查询字典类型 - * - * @param dictId 字典类型主键 - * @return 字典类型 - */ - public SysDict selectSysDictByDictId(Long dictId); - - /** - * 查询字典类型列表 - * - * @param sysDict 字典类型 - * @return 字典类型集合 - */ - public List selectSysDictList(SysDict sysDict); - - /** - * 新增字典类型 - * - * @param sysDict 字典类型 - * @return 结果 - */ - public int insertSysDict(SysDict sysDict); - - /** - * 修改字典类型 - * - * @param sysDict 字典类型 - * @return 结果 - */ - public int updateSysDict(SysDict sysDict); - - /** - * 删除字典类型 - * - * @param dictId 字典类型主键 - * @return 结果 - */ - public int deleteSysDictByDictId(Long dictId); - - /** - * 批量删除字典类型 - * - * @param dictIds 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteSysDictByDictIds(Long[] dictIds); -} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ISysDicService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ISysDicService.java new file mode 100644 index 00000000..e05f0500 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ISysDicService.java @@ -0,0 +1,63 @@ +package com.bonus.sgzb.base.service; + +import com.bonus.sgzb.base.api.domain.SysDic; + +import java.util.List; + + +/** + * 数据字典Service接口 + * + * @author bonus + * @date 2023-12-11 + */ +public interface ISysDicService +{ + /** + * 查询数据字典 + * + * @param id 数据字典主键 + * @return 数据字典 + */ + public SysDic selectSysDicById(Long id); + + /** + * 查询数据字典列表 + * + * @param sysDic 数据字典 + * @return 数据字典集合 + */ + public List selectSysDicList(SysDic sysDic); + + /** + * 新增数据字典 + * + * @param sysDic 数据字典 + * @return 结果 + */ + public int insertSysDic(SysDic sysDic); + + /** + * 修改数据字典 + * + * @param sysDic 数据字典 + * @return 结果 + */ + public int updateSysDic(SysDic sysDic); + + /** + * 批量删除数据字典 + * + * @param ids 需要删除的数据字典主键集合 + * @return 结果 + */ + public int deleteSysDicByIds(Long[] ids); + + /** + * 删除数据字典信息 + * + * @param id 数据字典主键 + * @return 结果 + */ + public int deleteSysDicById(Long id); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ISysDictService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ISysDictService.java deleted file mode 100644 index c2c05264..00000000 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ISysDictService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.bonus.sgzb.base.service; - -import com.bonus.sgzb.base.api.domain.SysDict; - -import java.util.List; - - -/** - * 字典类型Service接口 - * - * @author bonus - * @date 2023-12-11 - */ -public interface ISysDictService -{ - /** - * 查询字典类型 - * - * @param dictId 字典类型主键 - * @return 字典类型 - */ - public SysDict selectSysDictTypeByDictId(Long dictId); - - /** - * 查询字典类型列表 - * - * @param sysDict 字典类型 - * @return 字典类型集合 - */ - public List selectSysDictTypeList(SysDict sysDict); - - /** - * 新增字典类型 - * - * @param sysDict 字典类型 - * @return 结果 - */ - public int insertSysDictType(SysDict sysDict); - - /** - * 修改字典类型 - * - * @param sysDict 字典类型 - * @return 结果 - */ - public int updateSysDictType(SysDict sysDict); - - /** - * 批量删除字典类型 - * - * @param dictIds 需要删除的字典类型主键集合 - * @return 结果 - */ - public int deleteSysDictTypeByDictIds(Long[] dictIds); - - /** - * 删除字典类型信息 - * - * @param dictId 字典类型主键 - * @return 结果 - */ - public int deleteSysDictTypeByDictId(Long dictId); -} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/SysDicServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/SysDicServiceImpl.java new file mode 100644 index 00000000..7d0df92d --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/SysDicServiceImpl.java @@ -0,0 +1,97 @@ +package com.bonus.sgzb.base.service.impl; + +import java.util.List; + +import com.bonus.sgzb.base.api.domain.SysDic; +import com.bonus.sgzb.base.mapper.SysDicMapper; +import com.bonus.sgzb.base.service.ISysDicService; +import com.bonus.sgzb.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 数据字典Service业务层处理 + * + * @author bonus + * @date 2023-12-11 + */ +@Service +public class SysDicServiceImpl implements ISysDicService +{ + @Autowired + private SysDicMapper sysDicMapper; + + /** + * 查询数据字典 + * + * @param id 数据字典主键 + * @return 数据字典 + */ + @Override + public SysDic selectSysDicById(Long id) + { + return sysDicMapper.selectSysDicById(id); + } + + /** + * 查询数据字典列表 + * + * @param sysDic 数据字典 + * @return 数据字典 + */ + @Override + public List selectSysDicList(SysDic sysDic) + { + return sysDicMapper.selectSysDicList(sysDic); + } + + /** + * 新增数据字典 + * + * @param sysDic 数据字典 + * @return 结果 + */ + @Override + public int insertSysDic(SysDic sysDic) + { + sysDic.setCreateTime(DateUtils.getNowDate()); + return sysDicMapper.insertSysDic(sysDic); + } + + /** + * 修改数据字典 + * + * @param sysDic 数据字典 + * @return 结果 + */ + @Override + public int updateSysDic(SysDic sysDic) + { + return sysDicMapper.updateSysDic(sysDic); + } + + /** + * 批量删除数据字典 + * + * @param ids 需要删除的数据字典主键 + * @return 结果 + */ + @Override + public int deleteSysDicByIds(Long[] ids) + { + return sysDicMapper.deleteSysDicByIds(ids); + } + + /** + * 删除数据字典信息 + * + * @param id 数据字典主键 + * @return 结果 + */ + @Override + public int deleteSysDicById(Long id) + { + return sysDicMapper.deleteSysDicById(id); + } +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/SysDictServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/SysDictServiceImpl.java deleted file mode 100644 index 25e6a687..00000000 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/SysDictServiceImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.bonus.sgzb.base.service.impl; - -import java.util.List; - -import com.bonus.sgzb.base.api.domain.SysDict; -import com.bonus.sgzb.base.mapper.SysDictMapper; -import com.bonus.sgzb.base.service.ISysDictService; -import com.bonus.sgzb.common.core.utils.DateUtils; -import com.bonus.sgzb.system.api.domain.SysDictType; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * 字典类型Service业务层处理 - * - * @author bonus - * @date 2023-12-11 - */ -@Service -public class SysDictServiceImpl implements ISysDictService -{ - @Autowired - private SysDictMapper sysDictMapper; - - /** - * 查询字典类型 - * - * @param dictId 字典类型主键 - * @return 字典类型 - */ - @Override - public SysDict selectSysDictTypeByDictId(Long dictId) - { - return sysDictMapper.selectSysDictByDictId(dictId); - } - - /** - * 查询字典类型列表 - * - * @param sysDict 字典类型 - * @return 字典类型 - */ - @Override - public List selectSysDictTypeList(SysDict sysDict) - { - return sysDictMapper.selectSysDictList(sysDict); - } - - /** - * 新增字典类型 - * - * @param sysDict 字典类型 - * @return 结果 - */ - @Override - public int insertSysDictType(SysDict sysDict) - { - sysDict.setCreateTime(DateUtils.getNowDate()); - return sysDictMapper.insertSysDict(sysDict); - } - - /** - * 修改字典类型 - * - * @param sysDict 字典类型 - * @return 结果 - */ - @Override - public int updateSysDictType(SysDict sysDict) - { - sysDict.setUpdateTime(DateUtils.getNowDate()); - return sysDictMapper.updateSysDict(sysDict); - } - - /** - * 批量删除字典类型 - * - * @param dictIds 需要删除的字典类型主键 - * @return 结果 - */ - @Override - public int deleteSysDictTypeByDictIds(Long[] dictIds) - { - return sysDictMapper.deleteSysDictByDictIds(dictIds); - } - - /** - * 删除字典类型信息 - * - * @param dictId 字典类型主键 - * @return 结果 - */ - @Override - public int deleteSysDictTypeByDictId(Long dictId) - { - return sysDictMapper.deleteSysDictByDictId(dictId); - } -} diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDicMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDicMapper.xml new file mode 100644 index 00000000..b3128efd --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDicMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + select id, p_id, code, name, description, value, sort, level, status, create_time, creator from sys_dic + + + + insert into sys_dic + + id, + p_id, + code, + name, + description, + value, + sort, + level, + status, + create_time, + creator, + + + #{id}, + #{pId}, + #{code}, + #{name}, + #{description}, + #{value}, + #{sort}, + #{level}, + #{status}, + #{createTime}, + #{creator}, + + + + update sys_dic + + p_id = #{pId}, + code = #{code}, + name = #{name}, + description = #{description}, + value = #{value}, + sort = #{sort}, + level = #{level}, + status = #{status}, + create_time = #{createTime}, + creator = #{creator}, + + where id = #{id} + + delete from sys_dic where id = #{id} + + delete from sys_dic where id in + #{id} + + \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDictMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDictMapper.xml deleted file mode 100644 index a844b219..00000000 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDictMapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - select dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark from sys_dict_type - - - - - - - - insert into sys_dict_type - - dict_name, - dict_type, - status, - create_by, - create_time, - update_by, - update_time, - remark, - - - #{dictName}, - #{dictType}, - #{status}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{remark}, - - - - - update sys_dict_type - - dict_name = #{dictName}, - dict_type = #{dictType}, - status = #{status}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - remark = #{remark}, - - where dict_id = #{dictId} - - - - delete from sys_dict_type where dict_id = #{dictId} - - - - delete from sys_dict_type where dict_id in - - #{dictId} - - - \ No newline at end of file