@@ -1,59 +0,0 @@
|
||||
|
||||
package cn.iocoder.yudao.module.infra.api.stdnms;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.infra.api.stdnms.dto.StdNmsRespDTO;
|
||||
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.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = "stdnms-api") // 可根据实际服务名调整
|
||||
@Tag(name = "RPC 服务 - 数据命名与简写标准")
|
||||
public interface StdNmsApi {
|
||||
|
||||
String PREFIX = "/api/stdnms";
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键ID", example = "1001", required = true)
|
||||
})
|
||||
CommonResult<Boolean> deleteStdNms(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-batch")
|
||||
@Operation(summary = "批量删除数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键ID集合", example = "[1001,1002]", required = true)
|
||||
})
|
||||
CommonResult<Boolean> deleteStdNmsList(@RequestParam("ids") List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "根据主键获取数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键ID", example = "1001", required = true)
|
||||
})
|
||||
CommonResult<StdNmsRespDTO> getStdNms(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/get-by-abbr")
|
||||
@Operation(summary = "根据缩写获取数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "abbr", description = "简写/缩写", example = "devNm", required = true)
|
||||
})
|
||||
CommonResult<StdNmsRespDTO> getStdNmsByAbbr(@RequestParam("abbr") String abbr);
|
||||
|
||||
@GetMapping(PREFIX + "/list-by-abbrs")
|
||||
@Operation(summary = "根据缩写列表查询数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "abbrs", description = "简写/缩写集合", example = "[devNm,devType]", required = true)
|
||||
})
|
||||
CommonResult<List<StdNmsRespDTO>> getStdNmsListByAbbrs(@RequestParam("abbrs") Collection<String> abbrs);
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.infra.api.stdnms.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "数据命名与简写标准响应 DTO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StdNmsRespDTO implements Serializable {
|
||||
|
||||
@Schema(description = "主键ID", example = "1001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称", example = "设备名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "简写/缩写", example = "devNm")
|
||||
private String abbr;
|
||||
|
||||
// 可根据实际需求补充其他字段
|
||||
}
|
||||
Reference in New Issue
Block a user