6-27更新 增加对接七牛云存储

This commit is contained in:
Hellohao
2019-06-27 01:12:05 +08:00
parent 210fd20a6a
commit 26337be423
45 changed files with 14969 additions and 4827 deletions
@@ -5,6 +5,7 @@ import cn.hellohao.pojo.EmailConfig;
import cn.hellohao.pojo.Keys;
import cn.hellohao.pojo.UploadConfig;
import cn.hellohao.service.*;
import cn.hellohao.utils.Print;
import cn.hellohao.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
@@ -43,15 +44,24 @@ public class AdminRootController {
Config config = configService.getSourceype();//查询当前系统使用的存储源类型。
Keys key = keysService.selectKeys(config.getSourcekey());
Boolean b = StringUtils.doNull(key);//判断对象是否有空值
Integer StorageType = 0;
if(b){
//key信息
model.addAttribute("AccessKey", key.getAccessKey());
model.addAttribute("AccessSecret", key.getAccessSecret());
model.addAttribute("Endpoint", key.getEndpoint());
model.addAttribute("Bucketname", key.getBucketname());
model.addAttribute("RequestAddress", key.getRequestAddress());
model.addAttribute("StorageType", config.getSourcekey());
}
//如果是4就是七牛
if(config.getSourcekey()==4){
model.addAttribute("Endpoint2", key.getEndpoint());
}else{
model.addAttribute("Endpoint2", 0);
}
return "admin/storageconfig";
}