中扬CRM客户关系管理系统
#
LSH
2023-11-24 2c7a0b5c9cded118d3c3c46211adf40fe558d67b
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
package com.zy.crm.manager.controller;
 
import com.core.annotations.ManagerAuth;
import com.core.common.R;
import com.zy.crm.common.web.BaseController;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
 
@RestController
public class OpenController extends BaseController {
 
    @Value("${aliyun.oss.id}")
    private String accessKeyId;
 
    @Value("${aliyun.oss.secret}")
    private String accessKeySecret;
 
    @Value("${aliyun.oss.bucket}")
    private String bucket;
 
    @RequestMapping(value = "/open/getOssClient")
    @ManagerAuth
    public R getOssClient() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("region", "oss-cn-hangzhou");
        map.put("accessKeyId", accessKeyId);
        map.put("accessKeySecret", accessKeySecret);
        map.put("bucket", bucket);
        return R.ok().add(map);
    }
 
}