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);
|
}
|
|
}
|