From 08284877ad3bcbaeb0b7b2c718cc96b8a44b2e8e Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 19 Feb 2025 16:14:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E5=BC=83=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E7=9A=84areaId,=E8=80=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=9A=84areaId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ntroller.java => AllocAreaController.java} | 32 ++++++++--------- .../{SysAllocArea.java => AllocArea.java} | 2 +- ...ocAreaMapper.java => AllocAreaMapper.java} | 16 ++++----- ...reaService.java => IAllocAreaService.java} | 16 ++++----- ...iceImpl.java => AllocAreaServiceImpl.java} | 34 +++++++++---------- ...llocAreaMapper.xml => AllocAreaMapper.xml} | 32 ++++++++--------- 6 files changed, 66 insertions(+), 66 deletions(-) rename bonus-modules/bonus-system/src/main/java/com/bonus/system/controller/{SysAllocAreaController.java => AllocAreaController.java} (73%) rename bonus-modules/bonus-system/src/main/java/com/bonus/system/domain/{SysAllocArea.java => AllocArea.java} (96%) rename bonus-modules/bonus-system/src/main/java/com/bonus/system/mapper/{SysAllocAreaMapper.java => AllocAreaMapper.java} (62%) rename bonus-modules/bonus-system/src/main/java/com/bonus/system/service/{ISysAllocAreaService.java => IAllocAreaService.java} (62%) rename bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/{SysAllocAreaServiceImpl.java => AllocAreaServiceImpl.java} (59%) rename bonus-modules/bonus-system/src/main/resources/mapper/system/{SysAllocAreaMapper.xml => AllocAreaMapper.xml} (78%) diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/controller/SysAllocAreaController.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/controller/AllocAreaController.java similarity index 73% rename from bonus-modules/bonus-system/src/main/java/com/bonus/system/controller/SysAllocAreaController.java rename to bonus-modules/bonus-system/src/main/java/com/bonus/system/controller/AllocAreaController.java index a8b2d5a..16cb192 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/controller/SysAllocAreaController.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/controller/AllocAreaController.java @@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; import com.bonus.common.security.annotation.RequiresPermissions; -import com.bonus.system.domain.SysAllocArea; -import com.bonus.system.service.ISysAllocAreaService; +import com.bonus.system.domain.AllocArea; +import com.bonus.system.service.IAllocAreaService; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.utils.poi.ExcelUtil; @@ -29,10 +29,10 @@ import com.bonus.common.core.web.page.TableDataInfo; */ @Api(tags = "区域接口") @RestController -@RequestMapping("/sys_alloc_area") -public class SysAllocAreaController extends BaseController { +@RequestMapping("/alloc_area") +public class AllocAreaController extends BaseController { @Autowired - private ISysAllocAreaService sysAllocAreaService; + private IAllocAreaService sysAllocAreaService; /** * 查询区域列表 @@ -40,9 +40,9 @@ public class SysAllocAreaController extends BaseController { @ApiOperation(value = "查询区域列表") @RequiresPermissions("system:area:list") @GetMapping("/list") - public TableDataInfo list(SysAllocArea sysAllocArea) { + public TableDataInfo list(AllocArea sysAllocArea) { startPage(); - List list = sysAllocAreaService.selectSysAllocAreaList(sysAllocArea); + List list = sysAllocAreaService.selectAllocAreaList(sysAllocArea); return getDataTable(list); } @@ -53,9 +53,9 @@ public class SysAllocAreaController extends BaseController { @RequiresPermissions("system:area:export") @SysLog(title = "区域", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出区域") @PostMapping("/export") - public void export(HttpServletResponse response, SysAllocArea sysAllocArea) { - List list = sysAllocAreaService.selectSysAllocAreaList(sysAllocArea); - ExcelUtil util = new ExcelUtil(SysAllocArea.class); + public void export(HttpServletResponse response, AllocArea sysAllocArea) { + List list = sysAllocAreaService.selectAllocAreaList(sysAllocArea); + ExcelUtil util = new ExcelUtil(AllocArea.class); util.exportExcel(response, list, "区域数据"); } @@ -66,7 +66,7 @@ public class SysAllocAreaController extends BaseController { @RequiresPermissions("system:area:query") @GetMapping(value = "/{areaId}") public AjaxResult getInfo(@PathVariable("areaId") Long areaId) { - return success(sysAllocAreaService.selectSysAllocAreaByAreaId(areaId)); + return success(sysAllocAreaService.selectAllocAreaByAreaId(areaId)); } /** @@ -76,9 +76,9 @@ public class SysAllocAreaController extends BaseController { @RequiresPermissions("system:area:add") @SysLog(title = "区域", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增区域") @PostMapping - public AjaxResult add(@RequestBody SysAllocArea sysAllocArea) { + public AjaxResult add(@RequestBody AllocArea sysAllocArea) { try { - return toAjax(sysAllocAreaService.insertSysAllocArea(sysAllocArea)); + return toAjax(sysAllocAreaService.insertAllocArea(sysAllocArea)); } catch (Exception e) { return error("系统错误, " + e.getMessage()); } @@ -91,9 +91,9 @@ public class SysAllocAreaController extends BaseController { @RequiresPermissions("system:area:edit") @SysLog(title = "区域", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改区域") @PostMapping("/edit") - public AjaxResult edit(@RequestBody SysAllocArea sysAllocArea) { + public AjaxResult edit(@RequestBody AllocArea sysAllocArea) { try { - return toAjax(sysAllocAreaService.updateSysAllocArea(sysAllocArea)); + return toAjax(sysAllocAreaService.updateAllocArea(sysAllocArea)); } catch (Exception e) { return error("系统错误, " + e.getMessage()); } @@ -107,6 +107,6 @@ public class SysAllocAreaController extends BaseController { @SysLog(title = "区域", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除区域") @PostMapping("/del/{areaIds}") public AjaxResult remove(@PathVariable Long[] areaIds) { - return toAjax(sysAllocAreaService.deleteSysAllocAreaByAreaIds(areaIds)); + return toAjax(sysAllocAreaService.deleteAllocAreaByAreaIds(areaIds)); } } diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/domain/SysAllocArea.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/domain/AllocArea.java similarity index 96% rename from bonus-modules/bonus-system/src/main/java/com/bonus/system/domain/SysAllocArea.java rename to bonus-modules/bonus-system/src/main/java/com/bonus/system/domain/AllocArea.java index da25313..d133089 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/domain/SysAllocArea.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/domain/AllocArea.java @@ -16,7 +16,7 @@ import com.bonus.common.core.web.domain.BaseEntity; @Data @ToString -public class SysAllocArea extends BaseEntity { +public class AllocArea extends BaseEntity { private static final long serialVersionUID = 1L; /** 区域id */ diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/mapper/SysAllocAreaMapper.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/mapper/AllocAreaMapper.java similarity index 62% rename from bonus-modules/bonus-system/src/main/java/com/bonus/system/mapper/SysAllocAreaMapper.java rename to bonus-modules/bonus-system/src/main/java/com/bonus/system/mapper/AllocAreaMapper.java index 805c219..1bb02b8 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/mapper/SysAllocAreaMapper.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/mapper/AllocAreaMapper.java @@ -1,7 +1,7 @@ package com.bonus.system.mapper; import java.util.List; -import com.bonus.system.domain.SysAllocArea; +import com.bonus.system.domain.AllocArea; /** * 区域Mapper接口 @@ -9,14 +9,14 @@ import com.bonus.system.domain.SysAllocArea; * @author xsheng * @date 2025-02-18 */ -public interface SysAllocAreaMapper { +public interface AllocAreaMapper { /** * 查询区域 * * @param areaId 区域主键 * @return 区域 */ - public SysAllocArea selectSysAllocAreaByAreaId(Long areaId); + public AllocArea selectAllocAreaByAreaId(Long areaId); /** * 查询区域列表 @@ -24,7 +24,7 @@ public interface SysAllocAreaMapper { * @param sysAllocArea 区域 * @return 区域集合 */ - public List selectSysAllocAreaList(SysAllocArea sysAllocArea); + public List selectAllocAreaList(AllocArea sysAllocArea); /** * 新增区域 @@ -32,7 +32,7 @@ public interface SysAllocAreaMapper { * @param sysAllocArea 区域 * @return 结果 */ - public int insertSysAllocArea(SysAllocArea sysAllocArea); + public int insertAllocArea(AllocArea sysAllocArea); /** * 修改区域 @@ -40,7 +40,7 @@ public interface SysAllocAreaMapper { * @param sysAllocArea 区域 * @return 结果 */ - public int updateSysAllocArea(SysAllocArea sysAllocArea); + public int updateAllocArea(AllocArea sysAllocArea); /** * 删除区域 @@ -48,7 +48,7 @@ public interface SysAllocAreaMapper { * @param areaId 区域主键 * @return 结果 */ - public int deleteSysAllocAreaByAreaId(Long areaId); + public int deleteAllocAreaByAreaId(Long areaId); /** * 批量删除区域 @@ -56,5 +56,5 @@ public interface SysAllocAreaMapper { * @param areaIds 需要删除的数据主键集合 * @return 结果 */ - public int deleteSysAllocAreaByAreaIds(Long[] areaIds); + public int deleteAllocAreaByAreaIds(Long[] areaIds); } diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/ISysAllocAreaService.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/IAllocAreaService.java similarity index 62% rename from bonus-modules/bonus-system/src/main/java/com/bonus/system/service/ISysAllocAreaService.java rename to bonus-modules/bonus-system/src/main/java/com/bonus/system/service/IAllocAreaService.java index ff39e79..041e646 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/ISysAllocAreaService.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/IAllocAreaService.java @@ -1,7 +1,7 @@ package com.bonus.system.service; import java.util.List; -import com.bonus.system.domain.SysAllocArea; +import com.bonus.system.domain.AllocArea; /** * 区域Service接口 @@ -9,14 +9,14 @@ import com.bonus.system.domain.SysAllocArea; * @author xsheng * @date 2025-02-18 */ -public interface ISysAllocAreaService { +public interface IAllocAreaService { /** * 查询区域 * * @param areaId 区域主键 * @return 区域 */ - public SysAllocArea selectSysAllocAreaByAreaId(Long areaId); + public AllocArea selectAllocAreaByAreaId(Long areaId); /** * 查询区域列表 @@ -24,7 +24,7 @@ public interface ISysAllocAreaService { * @param sysAllocArea 区域 * @return 区域集合 */ - public List selectSysAllocAreaList(SysAllocArea sysAllocArea); + public List selectAllocAreaList(AllocArea sysAllocArea); /** * 新增区域 @@ -32,7 +32,7 @@ public interface ISysAllocAreaService { * @param sysAllocArea 区域 * @return 结果 */ - public int insertSysAllocArea(SysAllocArea sysAllocArea); + public int insertAllocArea(AllocArea sysAllocArea); /** * 修改区域 @@ -40,7 +40,7 @@ public interface ISysAllocAreaService { * @param sysAllocArea 区域 * @return 结果 */ - public int updateSysAllocArea(SysAllocArea sysAllocArea); + public int updateAllocArea(AllocArea sysAllocArea); /** * 批量删除区域 @@ -48,7 +48,7 @@ public interface ISysAllocAreaService { * @param areaIds 需要删除的区域主键集合 * @return 结果 */ - public int deleteSysAllocAreaByAreaIds(Long[] areaIds); + public int deleteAllocAreaByAreaIds(Long[] areaIds); /** * 删除区域信息 @@ -56,5 +56,5 @@ public interface ISysAllocAreaService { * @param areaId 区域主键 * @return 结果 */ - public int deleteSysAllocAreaByAreaId(Long areaId); + public int deleteAllocAreaByAreaId(Long areaId); } diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/SysAllocAreaServiceImpl.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/AllocAreaServiceImpl.java similarity index 59% rename from bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/SysAllocAreaServiceImpl.java rename to bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/AllocAreaServiceImpl.java index 90f080a..6de5023 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/SysAllocAreaServiceImpl.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/AllocAreaServiceImpl.java @@ -6,9 +6,9 @@ import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.utils.id.Id; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.bonus.system.mapper.SysAllocAreaMapper; -import com.bonus.system.domain.SysAllocArea; -import com.bonus.system.service.ISysAllocAreaService; +import com.bonus.system.mapper.AllocAreaMapper; +import com.bonus.system.domain.AllocArea; +import com.bonus.system.service.IAllocAreaService; /** * 区域Service业务层处理 @@ -17,9 +17,9 @@ import com.bonus.system.service.ISysAllocAreaService; * @date 2025-02-18 */ @Service -public class SysAllocAreaServiceImpl implements ISysAllocAreaService { +public class AllocAreaServiceImpl implements IAllocAreaService { @Autowired - private SysAllocAreaMapper sysAllocAreaMapper; + private AllocAreaMapper sysAllocAreaMapper; /** * 查询区域 @@ -28,8 +28,8 @@ public class SysAllocAreaServiceImpl implements ISysAllocAreaService { * @return 区域 */ @Override - public SysAllocArea selectSysAllocAreaByAreaId(Long areaId) { - return sysAllocAreaMapper.selectSysAllocAreaByAreaId(areaId); + public AllocArea selectAllocAreaByAreaId(Long areaId) { + return sysAllocAreaMapper.selectAllocAreaByAreaId(areaId); } /** @@ -39,8 +39,8 @@ public class SysAllocAreaServiceImpl implements ISysAllocAreaService { * @return 区域 */ @Override - public List selectSysAllocAreaList(SysAllocArea sysAllocArea) { - return sysAllocAreaMapper.selectSysAllocAreaList(sysAllocArea); + public List selectAllocAreaList(AllocArea sysAllocArea) { + return sysAllocAreaMapper.selectAllocAreaList(sysAllocArea); } /** @@ -50,11 +50,11 @@ public class SysAllocAreaServiceImpl implements ISysAllocAreaService { * @return 结果 */ @Override - public int insertSysAllocArea(SysAllocArea sysAllocArea) { + public int insertAllocArea(AllocArea sysAllocArea) { sysAllocArea.setCreateTime(DateUtils.getNowDate()); try { sysAllocArea.setAreaId(Id.next()); - return sysAllocAreaMapper.insertSysAllocArea(sysAllocArea); + return sysAllocAreaMapper.insertAllocArea(sysAllocArea); } catch (Exception e) { throw new ServiceException("新增区域错误" + e.getMessage()); } @@ -67,10 +67,10 @@ public class SysAllocAreaServiceImpl implements ISysAllocAreaService { * @return 结果 */ @Override - public int updateSysAllocArea(SysAllocArea sysAllocArea) { + public int updateAllocArea(AllocArea sysAllocArea) { sysAllocArea.setUpdateTime(DateUtils.getNowDate()); try { - return sysAllocAreaMapper.updateSysAllocArea(sysAllocArea); + return sysAllocAreaMapper.updateAllocArea(sysAllocArea); } catch (Exception e) { throw new ServiceException("错误信息描述"); } @@ -83,8 +83,8 @@ public class SysAllocAreaServiceImpl implements ISysAllocAreaService { * @return 结果 */ @Override - public int deleteSysAllocAreaByAreaIds(Long[] areaIds) { - return sysAllocAreaMapper.deleteSysAllocAreaByAreaIds(areaIds); + public int deleteAllocAreaByAreaIds(Long[] areaIds) { + return sysAllocAreaMapper.deleteAllocAreaByAreaIds(areaIds); } /** @@ -94,7 +94,7 @@ public class SysAllocAreaServiceImpl implements ISysAllocAreaService { * @return 结果 */ @Override - public int deleteSysAllocAreaByAreaId(Long areaId) { - return sysAllocAreaMapper.deleteSysAllocAreaByAreaId(areaId); + public int deleteAllocAreaByAreaId(Long areaId) { + return sysAllocAreaMapper.deleteAllocAreaByAreaId(areaId); } } diff --git a/bonus-modules/bonus-system/src/main/resources/mapper/system/SysAllocAreaMapper.xml b/bonus-modules/bonus-system/src/main/resources/mapper/system/AllocAreaMapper.xml similarity index 78% rename from bonus-modules/bonus-system/src/main/resources/mapper/system/SysAllocAreaMapper.xml rename to bonus-modules/bonus-system/src/main/resources/mapper/system/AllocAreaMapper.xml index 84b8d4e..5f6a97e 100644 --- a/bonus-modules/bonus-system/src/main/resources/mapper/system/SysAllocAreaMapper.xml +++ b/bonus-modules/bonus-system/src/main/resources/mapper/system/AllocAreaMapper.xml @@ -2,8 +2,8 @@ - - + + @@ -17,12 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - select area_id, parent_id, ancestors, area_name, order_num, status, del_flag, create_by, create_time, update_by, update_time from sys_alloc_area + + select area_id, parent_id, ancestors, area_name, order_num, status, del_flag, create_by, create_time, update_by, update_time from alloc_area - + and parent_id = #{parentId} and ancestors = #{ancestors} @@ -32,13 +32,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + where area_id = #{areaId} - - insert into sys_alloc_area + + insert into alloc_area area_id, parent_id, @@ -63,8 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - update sys_alloc_area + + update alloc_area parent_id = #{parentId}, ancestors = #{ancestors}, @@ -78,12 +78,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where area_id = #{areaId} - - delete from sys_alloc_area where area_id = #{areaId} + + delete from alloc_area where area_id = #{areaId} - - delete from sys_alloc_area where area_id in + + delete from alloc_area where area_id in #{areaId}