Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tour_business
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏强
tour_business
Commits
d223c12a
Commit
d223c12a
authored
Apr 14, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口设置模块访问权限
parent
d45046ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
Controller/RentController.py
+16
-3
No files found.
Controller/RentController.py
View file @
d223c12a
...
...
@@ -3,13 +3,15 @@ import datetime
import
json
import
requests
from
flask
import
Blueprint
,
jsonify
,
request
from
flask
import
Blueprint
,
jsonify
,
request
,
g
from
pymongo
import
MongoClient
from
sqlalchemy
import
or_
from
sqlalchemy.exc
import
SQLAlchemyError
from
Config.base_config
import
ACTION_PWD
from
Config.base_config
import
ACTION_PWD
,
MONGO_DATABASE_URI
from
Libs.ErrorTips
import
BASE_RESPONSE
,
REFUND_NOT_RENT_INFO
,
REFUND_BACK_TIME_ERROR
,
REFUND_NOT_PRODUCTION_INFO
,
\
REFUND_MONEY_IS_ZERO
,
ACTION_CODE_ERROR
,
PARAMETER_ERROR
,
MACHINE_NOT_EXIST_ERROR
REFUND_MONEY_IS_ZERO
,
ACTION_CODE_ERROR
,
PARAMETER_ERROR
,
MACHINE_NOT_EXIST_ERROR
,
BASE_SUCCESS_RESPONSE
,
\
AGNET_MODULES_ERROR
from
Libs.Helper
import
Helper
from
Libs.Logger
import
logger
from
Model.Base
import
db
...
...
@@ -768,6 +770,17 @@ def get_machine_price():
@route_rent.route
(
'/multi_return'
,
methods
=
[
'POST'
])
def
run_multi_return
():
agent_id
=
g
.
user
.
id
platform
=
g
.
platform
mongodatabase
=
MongoClient
(
MONGO_DATABASE_URI
)
.
get_database
(
"suishenwan"
)
agent_modules
=
mongodatabase
.
get_collection
(
"agent_modules"
)
result
=
agent_modules
.
find_one
({
"agent_id"
:
agent_id
,
"platform"
:
platform
})
if
not
result
:
return
BASE_SUCCESS_RESPONSE
(
**
AGNET_MODULES_ERROR
)
if
not
result
.
get
(
"module_list"
,
{})
.
get
(
"my_account"
,
{})
.
get
(
"child"
,
{})
.
get
(
"manual_return"
,
None
):
return
BASE_SUCCESS_RESPONSE
(
**
AGNET_MODULES_ERROR
)
json_data
=
request
.
get_json
()
rent_datas
=
json_data
.
get
(
"rent_datas"
,
[])
back_time
=
datetime
.
datetime
.
now
()
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment