From 2ecac1a3f607ad139bb5e7efd9ec9cd4df8c3446 Mon Sep 17 00:00:00 2001 From: furongxin <419481438@qq.com> Date: Thu, 9 May 2024 10:11:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=96=E6=83=A9=E6=B5=81=E7=A8=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9=EF=BC=8C=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/system/api/dept/DeptApi.java | 6 ++++++ .../yudao/module/system/api/dept/DeptApiImpl.java | 9 +++++++++ .../yudao/module/system/dal/dataobject/dept/DeptDO.java | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java index 2ef9514a..ef3dc5cb 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApi.java @@ -9,6 +9,8 @@ import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import java.util.Collection; @@ -46,6 +48,10 @@ public interface DeptApi { @Operation(summary = "获取所有部门信息") CommonResult> getDeptList(); + @PostMapping(PREFIX + "/create") + @Operation(summary = "获取所有部门信息") + CommonResult createDept(@RequestBody DeptRespDTO deptRespDTO); + /** * 获得指定编号的部门 Map * diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApiImpl.java index 83438711..89353dfd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/dept/DeptApiImpl.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptSaveReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; import cn.iocoder.yudao.module.system.service.dept.DeptService; import org.springframework.validation.annotation.Validated; @@ -61,4 +62,12 @@ public class DeptApiImpl implements DeptApi { return success(BeanUtils.toBean(deptDOs, DeptRespDTO.class)); } + @Override + public CommonResult createDept(DeptRespDTO deptRespDTO) { + + DeptSaveReqVO deptSaveReqVO = BeanUtils.toBean(deptRespDTO, DeptSaveReqVO.class); + + return null; + } + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dept/DeptDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dept/DeptDO.java index 68633426..1b8817ad 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dept/DeptDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dept/DeptDO.java @@ -52,6 +52,10 @@ public class DeptDO extends TenantBaseDO { * 关联 {@link AdminUserDO#getId()} */ private Long leaderUserId; + /** + * 工厂编号 + */ + private Long factoryId; /** * 联系电话 */