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
93523e8d
Commit
93523e8d
authored
Mar 01, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
价格为0无法计算最大可租借天数bug修复
parent
4c7af5f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
.gitignore
+10
-0
Controller/RentController.py
+4
-1
No files found.
.gitignore
View file @
93523e8d
...
...
@@ -59,3 +59,12 @@ docs/_build/
# PyBuilder
target/
# Cert
*.pem
*.pfx
*.key
*.crt
*.cer
*.truststore
\ No newline at end of file
Controller/RentController.py
View file @
93523e8d
...
...
@@ -9,7 +9,7 @@ from sqlalchemy.exc import SQLAlchemyError
from
Config.base_config
import
ACTION_PWD
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
REFUND_MONEY_IS_ZERO
,
ACTION_CODE_ERROR
,
PARAMETER_ERROR
,
MACHINE_NOT_EXIST_ERROR
from
Libs.Helper
import
Helper
from
Libs.Logger
import
logger
from
Model.Base
import
db
...
...
@@ -729,7 +729,10 @@ def get_machine_price():
if
machine
.
price_type
==
1
:
# 免费时间
data
[
"time_price"
]
.
append
([
str
(
0
)
+
'天'
,
0
])
if
machine
.
one_day_price
>
0
:
max_days
=
machine
.
deposit
//
machine
.
one_day_price
+
1
else
:
max_days
=
5
i
=
1
while
i
<
max_days
:
data
[
"time_price"
]
.
append
([
str
(
i
)
+
'天'
,
machine
.
one_day_price
*
i
])
...
...
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