Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Automat
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
1
Merge Requests
1
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
冯佳佳
Automat
Commits
8c4a363c
Commit
8c4a363c
authored
Nov 02, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机柜已激活提示
parent
8a7e7708
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
myapps/sukang24h/api/tallyman_portal.py
+4
-2
utils/error_code.py
+0
-0
No files found.
myapps/sukang24h/api/tallyman_portal.py
View file @
8c4a363c
...
@@ -11,7 +11,7 @@ from models.base_model import db
...
@@ -11,7 +11,7 @@ from models.base_model import db
from
models.models
import
TallymanAccount
,
TallymanMachine
,
TallymanLoginRecord
,
Machine
,
Hatch
,
TallyRecord
from
models.models
import
TallymanAccount
,
TallymanMachine
,
TallymanLoginRecord
,
Machine
,
Hatch
,
TallyRecord
from
service.tallyman_service
import
TallymanService
from
service.tallyman_service
import
TallymanService
from
utils.error_code
import
TALLYMAN_ACCOUNT_EXIST
,
PHONE_NOT_VALID_ERROR
,
TOKEN_NOT_VALID_ERROR
,
PASSWORD_ERROR
,
\
from
utils.error_code
import
TALLYMAN_ACCOUNT_EXIST
,
PHONE_NOT_VALID_ERROR
,
TOKEN_NOT_VALID_ERROR
,
PASSWORD_ERROR
,
\
TALLYMAN_ACCOUNT_NOT_EXIST
,
MACHINE_NOT_EXIST_ERROR
,
HATCH_NOT_EXIST_ERROR
TALLYMAN_ACCOUNT_NOT_EXIST
,
MACHINE_NOT_EXIST_ERROR
,
HATCH_NOT_EXIST_ERROR
,
MACHINE_ACTIVATED_ERROR
from
utils.jwt_util
import
verify_jwt
,
generate_jwt
from
utils.jwt_util
import
verify_jwt
,
generate_jwt
from
utils.my_response
import
BaseResponse
from
utils.my_response
import
BaseResponse
...
@@ -350,8 +350,10 @@ def run_machine_activate():
...
@@ -350,8 +350,10 @@ def run_machine_activate():
machine_no
=
json_data
[
"machine_no"
]
machine_no
=
json_data
[
"machine_no"
]
mac
=
json_data
[
"mac"
]
mac
=
json_data
[
"mac"
]
machine
=
Machine
.
query
.
filter_by
(
qrcode_no
=
qrcode_no
,
status
=
0
)
.
first
()
machine
=
Machine
.
query
.
filter_by
(
qrcode_no
=
qrcode_no
)
.
first
()
if
machine
and
machine
.
machine_no
==
qrcode_no
:
if
machine
and
machine
.
machine_no
==
qrcode_no
:
if
machine
.
status
==
1
:
return
jsonify
(
MACHINE_ACTIVATED_ERROR
)
machine
.
status
=
1
machine
.
status
=
1
machine
.
mac
=
mac
machine
.
mac
=
mac
db
.
session
.
add
(
machine
)
db
.
session
.
add
(
machine
)
...
...
utils/error_code.py
View file @
8c4a363c
This diff is collapsed.
Click to expand it.
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