完成项目信息管理的迁移

This commit is contained in:
2025-04-11 14:30:48 +08:00
parent 9e14a3256f
commit 4439687870
41 changed files with 276 additions and 1224 deletions

View File

@ -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:
"""