完成项目信息管理的迁移
This commit is contained in:
@ -18,7 +18,7 @@ from sqlalchemy import select, false, and_
|
||||
from core.crud import DalBase
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from core.validator import vali_telephone
|
||||
from utils.file.aliyun_oss import AliyunOSS, BucketConf
|
||||
from utils.huawei_obs import ObsClient
|
||||
from utils.excel.import_manage import ImportManage, FieldType
|
||||
from utils.excel.write_xlsx import WriteXlsx
|
||||
from utils.send_email import EmailSender
|
||||
@ -397,10 +397,10 @@ class UserDal(DalBase):
|
||||
:param file:
|
||||
:return:
|
||||
"""
|
||||
result = await AliyunOSS(BucketConf(**settings.ALIYUN_OSS)).upload_image("avatar", file)
|
||||
user.avatar = result
|
||||
success, key, url = await ObsClient().put_object("avatar"+"/"+user.name+file.filename, file)
|
||||
user.avatar = url
|
||||
await self.flush(user)
|
||||
return result
|
||||
return url
|
||||
|
||||
async def update_wx_server_openid(self, code: str, user: models.VadminUser, redis: Redis) -> bool:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user