补全 api 缺失的方法
This commit is contained in:
@@ -2,14 +2,13 @@ package cn.iocoder.yudao.module.system.api.dept;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.*;
|
||||
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -22,6 +21,31 @@ public interface DeptApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/dept";
|
||||
|
||||
// === 以下为补全的接口方法 ===
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "新增部门")
|
||||
CommonResult<Long> createDept(@RequestBody DeptSaveReqDTO createReqVO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "修改部门")
|
||||
CommonResult<Boolean> updateDept(@RequestBody DeptSaveReqDTO updateReqVO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除部门")
|
||||
CommonResult<Boolean> deleteDept(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/list-all")
|
||||
@Operation(summary = "获得部门列表")
|
||||
CommonResult<List<DeptDetailRespDTO>> getDeptList(@RequestParam DeptListReqDTO reqVO);
|
||||
|
||||
@GetMapping(PREFIX + "/simple-list")
|
||||
@Operation(summary = "获得部门精简信息列表")
|
||||
CommonResult<List<DeptSimpleRespDTO>> getSimpleDeptList();
|
||||
|
||||
@GetMapping(PREFIX + "/simple-company-list")
|
||||
@Operation(summary = "获得公司精简信息列表")
|
||||
CommonResult<List<DeptSimpleRespDTO>> getSimpleCompanyList();
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得部门信息")
|
||||
@Parameter(name = "id", description = "部门编号", example = "1024", required = true)
|
||||
|
||||
@@ -5,13 +5,14 @@ import cn.hutool.core.map.MapUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.PostSaveReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.PostSimpleRespDTO;
|
||||
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -23,6 +24,27 @@ public interface PostApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/post";
|
||||
|
||||
// === 以下为补全的接口方法 ===
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "新增岗位")
|
||||
CommonResult<Long> createPost(@RequestBody PostSaveReqDTO createReqVO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "修改岗位")
|
||||
CommonResult<Boolean> updatePost(@RequestBody PostSaveReqDTO updateReqVO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除岗位")
|
||||
CommonResult<Boolean> deletePost(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得岗位详情")
|
||||
CommonResult<PostRespDTO> getPost(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/simple-list")
|
||||
@Operation(summary = "获得岗位精简信息列表")
|
||||
CommonResult<List<PostSimpleRespDTO>> getSimplePostList();
|
||||
|
||||
@GetMapping(PREFIX + "/valid")
|
||||
@Operation(summary = "校验岗位是否合法")
|
||||
@Parameter(name = "ids", description = "岗位编号数组", example = "1,2", required = true)
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 部门信息 Response DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 部门信息 Response DTO")
|
||||
@Data
|
||||
public class DeptDetailRespDTO {
|
||||
|
||||
@Schema(description = "部门编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "部门名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "父部门 ID", example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "显示顺序", example = "1024")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "负责人的用户编号", example = "2048")
|
||||
private Long leaderUserId;
|
||||
|
||||
@Schema(description = "联系电话", example = "15601691000")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "邮箱", example = "yudao@iocoder.cn")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "租户编号", example = "1024")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "是否公司", example = "false")
|
||||
private Boolean isCompany;
|
||||
|
||||
@Schema(description = "是否集团", example = "false")
|
||||
private Boolean isGroup;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 部门列表 Request DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 部门列表 Request DTO")
|
||||
@Data
|
||||
public class DeptListReqDTO {
|
||||
|
||||
@Schema(description = "部门名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否公司", example = "false")
|
||||
private Boolean isCompany;
|
||||
|
||||
@Schema(description = "是否集团", example = "false")
|
||||
private Boolean isGroup;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 部门创建/修改 Request DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 部门创建/修改 Request DTO")
|
||||
@Data
|
||||
public class DeptSaveReqDTO {
|
||||
|
||||
@Schema(description = "部门编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "部门名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "父部门 ID", example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "显示顺序", example = "1024")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "负责人的用户编号", example = "2048")
|
||||
private Long leaderUserId;
|
||||
|
||||
@Schema(description = "联系电话", example = "15601691000")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "邮箱", example = "yudao@iocoder.cn")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举0 开启 1 关闭", example = "0")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 部门精简信息 Response DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 部门精简信息 Response DTO")
|
||||
@Data
|
||||
public class DeptSimpleRespDTO {
|
||||
|
||||
@Schema(description = "部门编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "部门名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "父部门 ID", example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "是否公司", example = "false")
|
||||
private Boolean isCompany;
|
||||
|
||||
@Schema(description = "是否集团", example = "false")
|
||||
private Boolean isGroup;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.system.api.dept.dto;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 岗位分页 Request DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 岗位分页 Request DTO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PostPageReqDTO extends PageParam {
|
||||
|
||||
@Schema(description = "岗位编码,模糊匹配", example = "yudao")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 岗位创建/修改 Request DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 岗位创建/修改 Request DTO")
|
||||
@Data
|
||||
public class PostSaveReqDTO {
|
||||
|
||||
@Schema(description = "岗位编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "岗位名称", example = "小土豆")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "岗位编码", example = "yudao")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "显示顺序", example = "1024")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "快乐的备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.system.api.dept.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 岗位信息的精简 Response DTO
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Schema(description = "RPC 服务 - 岗位信息的精简 Response DTO")
|
||||
@Data
|
||||
public class PostSimpleRespDTO {
|
||||
|
||||
@Schema(description = "岗位序号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "岗位名称", example = "小土豆")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@@ -1,17 +1,20 @@
|
||||
package cn.iocoder.yudao.module.system.api.dict;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.biz.system.dict.DictDataCommonApi;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataDetailRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataSaveReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataSimpleRespDTO;
|
||||
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 字典数据")
|
||||
@@ -19,6 +22,27 @@ public interface DictDataApi extends DictDataCommonApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/dict-data";
|
||||
|
||||
// === 以下为补全的接口方法 ===
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "新增字典数据")
|
||||
CommonResult<Long> createDictData(@RequestBody DictDataSaveReqDTO createReqVO);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "修改字典数据")
|
||||
CommonResult<Boolean> updateDictData(@RequestBody DictDataSaveReqDTO updateReqVO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除字典数据")
|
||||
CommonResult<Boolean> deleteDictData(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/simple-list")
|
||||
@Operation(summary = "获得字典数据精简信息列表")
|
||||
CommonResult<List<DictDataSimpleRespDTO>> getSimpleDictDataList();
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得字典数据详情")
|
||||
CommonResult<DictDataDetailRespDTO> getDictData(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/valid")
|
||||
@Operation(summary = "校验字典数据们是否有效")
|
||||
@Parameters({
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user