package cn.huge.module.file.controller.client;
|
|
import cn.huge.base.common.utils.ReturnFailUtils;
|
import cn.huge.base.common.utils.ReturnSucUtils;
|
import cn.huge.module.file.service.FileInfoService;
|
import io.lettuce.core.dynamic.annotation.Param;
|
import lombok.extern.slf4j.Slf4j;
|
import org.apache.commons.lang3.StringUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.servlet.http.HttpServletRequest;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @title: 附件信息表接口api-web端
|
* @description: 附件信息表接口api-web端
|
* @company: hugeinfo
|
* @author: liyj
|
* @time: 2024-08-28 20:06:18
|
* @version: 1.0.0
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/api/client/fileInfo")
|
public class FileInfoClientController {
|
|
@Autowired(required = false)
|
private HttpServletRequest request;
|
|
@Autowired
|
private FileInfoService service;
|
|
/**
|
* 根据多个所属编号查询附件并根据先根据ownerId再根据附件类型分组
|
* @url {ctx}/api/client/fileRelate/listIdTypeInfoByOwnerIdList
|
* @return Object
|
*/
|
@PostMapping("/listIdTypeInfoByOwnerIdList")
|
public Object listIdTypeInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId) {
|
try {
|
return ReturnSucUtils.getRepInfo(service.listIdTypeInfoByOwnerIdList(term, mainId));
|
} catch (Exception e) {
|
return ReturnFailUtils.getRepInfo();
|
}
|
}
|
|
/**
|
* 根据多个所属编号查询附件
|
* @url {ctx}/api/client/fileRelate/listInfoByOwnerIdList
|
* @return Object
|
*/
|
@PostMapping("/listInfoByOwnerIdList")
|
public Object listInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId) {
|
try {
|
return ReturnSucUtils.getRepInfo(service.listInfoByOwnerIdList(term, mainId));
|
} catch (Exception e) {
|
return ReturnFailUtils.getRepInfo();
|
}
|
}
|
}
|