2019-9-8更新

This commit is contained in:
Hellohao
2019-09-08 20:30:57 +08:00
parent ad66fdc307
commit 6fcd112dd3
8 changed files with 66 additions and 37 deletions
@@ -61,13 +61,15 @@ public class ClientController {
UploadConfig uploadConfig = uploadConfigService.getUpdateConfig();
if (uploadConfig.getApi() == 1) {
if (email != null && pass != null) {
Integer ret = userService.login(email, pass);
Integer ret = userService.login(email, Base64Encryption.encryptBASE64(pass.getBytes()));
if (ret > 0) {
User user = userService.getUsers(email);
if (user.getIsok() == 1) {
User u = userService.getUsers(email);
Config config = configService.getSourceype();//查询当前系统使用的存储源类型。
Integer Sourcekey = GetCurrentSource.GetSource(u.getId());
Keys key = keysService.selectKeys(Sourcekey);
if (key.getStorageType() != 0 && key.getStorageType() != null) {
if (key.getStorageType() == 1) {
@@ -248,7 +248,24 @@ public class UpdateImgController {
Config config = configService.getSourceype();//查询当前系统使用的存储源类型。
UploadConfig uploadConfig = uploadConfigService.getUpdateConfig();
User u = (User) session.getAttribute("user");
Integer Sourcekey = GetCurrentSource.GetSource(u.getId());
Integer usermemory =0;
Integer memory =0;
Integer Sourcekey=0;
if(u==null){
Sourcekey = GetCurrentSource.GetSource(null);
memory = uploadConfig.getVisitormemory();
usermemory= imgService.getusermemory(0);
if(usermemory==null){usermemory = 0;}
}else{
Sourcekey = GetCurrentSource.GetSource(u.getId());
memory = userService.getUsers(u.getEmail()).getMemory();
usermemory= imgService.getusermemory(u.getId());
if(usermemory==null){usermemory = 0;}
}
//Integer Sourcekey = GetCurrentSource.GetSource(u.getId());
String userpath = "tourist";
if(uploadConfig.getUrltype()==2){
java.text.DateFormat dateFormat = new java.text.SimpleDateFormat("yyyy/MM/dd");
@@ -266,9 +283,9 @@ public class UpdateImgController {
bo =true;
}else{bo = StringUtils.doNull(Sourcekey,key);//判断对象是否有空值
}
//容量判断
Integer usermemory =0;
Integer memory =0;
// //容量判断
// Integer usermemory =0;
// Integer memory =0;
if(u==null){
memory = uploadConfig.getVisitormemory();
usermemory= imgService.getusermemory(0);