Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
558ce6db
Commit
558ce6db
authored
Nov 21, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
房间套餐增加时长和使用时长匹配
parent
14d74ae5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
PackServiceImpl.java
.../main/java/share/system/service/impl/PackServiceImpl.java
+10
-0
No files found.
share-system/src/main/java/share/system/service/impl/PackServiceImpl.java
View file @
558ce6db
...
@@ -77,6 +77,11 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
...
@@ -77,6 +77,11 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
@Override
@Override
public
int
insertPack
(
SPack
sPack
)
{
public
int
insertPack
(
SPack
sPack
)
{
sPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
sPack
.
setCreateTime
(
DateUtils
.
getNowDate
());
if
(
sPack
.
getType
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
((
Integer
.
parseInt
(
sPack
.
getPackaEndPeriod
())
-
Integer
.
parseInt
(
sPack
.
getPackaStartPeriod
()))
!=
Integer
.
parseInt
(
sPack
.
getDuration
()))
{
throw
new
BaseException
(
"套餐时长和使用时长不匹配!"
);
}
}
return
baseMapper
.
insertPack
(
sPack
);
return
baseMapper
.
insertPack
(
sPack
);
}
}
...
@@ -89,6 +94,11 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
...
@@ -89,6 +94,11 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
@Override
@Override
public
int
updatePack
(
SPack
SPack
)
{
public
int
updatePack
(
SPack
SPack
)
{
SPack
.
setUpdateTime
(
DateUtils
.
getNowDate
());
SPack
.
setUpdateTime
(
DateUtils
.
getNowDate
());
if
(
SPack
.
getType
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
((
Integer
.
parseInt
(
SPack
.
getPackaEndPeriod
())
-
Integer
.
parseInt
(
SPack
.
getPackaStartPeriod
()))
!=
Integer
.
parseInt
(
SPack
.
getDuration
()))
{
throw
new
BaseException
(
"套餐时长和使用时长不匹配!"
);
}
}
return
baseMapper
.
updatePack
(
SPack
);
return
baseMapper
.
updatePack
(
SPack
);
}
}
...
...
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