MerchantFileController.java
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.file.FileSearchRequest;
import cn.com.glsx.merchants.response.FileResponse;
import cn.com.glsx.merchants.service.MerchantFileService;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author Administrator
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("文件管理接口")
@Slf4j
public class MerchantFileController {
@Autowired
private MerchantFileService merchantFileService;
/**
* 查询素材库
* @param fileSearchRequest
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findMerchantFile", needInSession = NeedInSessionType.NO)
@ApiOperation("查询素材库")
public RopResponse<List<FileResponse>> findMerchantFile(FileSearchRequest fileSearchRequest){
try {
List<FileResponse> fileResponseList = merchantFileService.findMerchantFile(fileSearchRequest);
return RopResponse.success(fileResponseList);
} catch (RpcServiceException e) {
log.info("=======MerchantFileController__invoke__findMerchantFile__exception:{}", e.getMessage());
return RopResponse.error(e.getError(),e.getMessage());
}
}
}