|
@@ -170,6 +170,11 @@ async def userupdate(
|
|
|
yzyAccount = body['yzyAccount']
|
|
|
status = body['status']
|
|
|
|
|
|
+ if 'expireTime' in body:
|
|
|
+ expire_time = body['expireTime']
|
|
|
+ else:
|
|
|
+ expire_time = None
|
|
|
+
|
|
|
dept_info = dept_id_get_dept_info(db, deptId)
|
|
|
deptName = dept_info.dept_name
|
|
|
|
|
@@ -186,6 +191,7 @@ async def userupdate(
|
|
|
user.remark = remark
|
|
|
user.yzy_account = yzyAccount
|
|
|
user.status = status
|
|
|
+ user.expire_time = expire_time
|
|
|
user.sign = ''
|
|
|
db.commit()
|
|
|
db.refresh(user)
|
|
@@ -819,6 +825,7 @@ async def userlist( #user_id_1: int = Query(None ,description='用户id'),
|
|
|
"roles": user_roles,
|
|
|
"sex": user.sex,
|
|
|
"status": user.status,
|
|
|
+ "expireTime": user.expire_time,
|
|
|
"updateBy":user.update_by,
|
|
|
"updateTime": user.create_time.strftime('%Y-%m-%d %H:%M:%S') if user.create_time else None,
|
|
|
"userId": user.user_id,
|
|
@@ -970,6 +977,7 @@ async def userlist( user_id_1: int = Query(None ,description='用户id'),
|
|
|
"createTime": user.create_time.strftime('%Y-%m-%d %H:%M:%S') if user.create_time else '',
|
|
|
"deptName": user.dept_name,
|
|
|
"yzyAccount": (user.yzy_account),
|
|
|
+ "expireTime": user.expire_time,
|
|
|
}
|
|
|
|
|
|
roles = get_role(db,roleIds)
|