@@ -1,14 +1,18 @@
|
||||
package cn.iocoder.yudao.module.infra.api.businessfile;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.infra.api.businessfile.dto.BusinessFilePageReqDTO;
|
||||
import cn.iocoder.yudao.module.infra.api.businessfile.dto.BusinessFileRespDTO;
|
||||
import cn.iocoder.yudao.module.infra.api.businessfile.dto.BusinessFileSaveReqDTO;
|
||||
import cn.iocoder.yudao.module.infra.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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -20,8 +24,42 @@ public interface BusinessFileApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/business-file";
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建业务附件关联")
|
||||
CommonResult<Long> createBusinessFile(@Valid @RequestBody BusinessFileSaveReqDTO createReqDTO);
|
||||
|
||||
@PostMapping(PREFIX + "/batch-create")
|
||||
@Operation(summary = "批量新增业务附件关联")
|
||||
CommonResult<List<Long>> batchCreateBusinessFile(@RequestBody List<BusinessFileSaveReqDTO> createReqDTOList);
|
||||
|
||||
@PutMapping(PREFIX + "/update")
|
||||
@Operation(summary = "更新业务附件关联")
|
||||
CommonResult<Boolean> updateBusinessFile(@Valid @RequestBody BusinessFileSaveReqDTO updateReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除业务附件关联")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
CommonResult<Boolean> deleteBusinessFile(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-list")
|
||||
@Operation(summary = "批量删除业务附件关联")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true)
|
||||
CommonResult<Boolean> deleteBusinessFileList(@RequestParam("ids") List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "获得业务附件关联")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
CommonResult<BusinessFileRespDTO> getBusinessFile(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/page")
|
||||
@Operation(summary = "获得业务附件关联分页")
|
||||
CommonResult<PageResult<BusinessFileRespDTO>> getBusinessFilePage(@Valid BusinessFilePageReqDTO pageReqDTO);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-by-business")
|
||||
@Operation(summary = "根据业务Id和来源删除业务附件关联")
|
||||
@Parameter(name = "businessId", description = "业务Id", required = true)
|
||||
@Parameter(name = "source", description = "业务来源", required = true)
|
||||
CommonResult<Boolean> deleteBusinessFileByBusinessIdAndSource(@RequestParam("businessId") Long businessId,
|
||||
@RequestParam("source") String source);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.iocoder.yudao.module.infra.api.businessfile.dto;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务附件关联分页查询 DTO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BusinessFilePageReqDTO extends PageParam implements Serializable {
|
||||
|
||||
/**
|
||||
* 业务Id
|
||||
*/
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 业务来源
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.infra.api.businessfile.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务附件关联响应 DTO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BusinessFileRespDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业务Id
|
||||
*/
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 文件Id
|
||||
*/
|
||||
private Long fileId;
|
||||
|
||||
/**
|
||||
* 业务来源
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user