Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
759b8e2c
Commit
759b8e2c
authored
Jun 27, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
573d0cbe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
TourGoodDetailBiz.java
...in/java/com/xxfc/platform/tour/biz/TourGoodDetailBiz.java
+2
-0
TourGoodSpePriceMapper.java
...com/xxfc/platform/tour/mapper/TourGoodSpePriceMapper.java
+3
-0
TourGoodSpePriceMapper.xml
...rver/src/main/resources/mapper/TourGoodSpePriceMapper.xml
+5
-0
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodDetailBiz.java
View file @
759b8e2c
...
...
@@ -78,6 +78,8 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> {
//获取出行时间
List
<
TourDepartTimeVo
>
timelist
=
priceMapper
.
getAllByGoodId
(
id
);
detailVo
.
setTourDepartTimeVo
(
timelist
);
Integer
stock
=
priceMapper
.
getTotalStock
(
id
);
detailVo
.
setStock
(
stock
);
//获取出发地点
List
<
TourDepartVo
>
departList
=
siteMapper
.
getlistByGoodId
(
id
);
detailVo
.
setTourDepartVo
(
departList
);
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourGoodSpePriceMapper.java
View file @
759b8e2c
...
...
@@ -18,6 +18,9 @@ public interface TourGoodSpePriceMapper extends Mapper<TourGoodSpePrice> {
List
<
TourDepartTimeVo
>
getAllByGoodId
(
@Param
(
"goodId"
)
Integer
goodId
);
//获取总库存
Integer
getTotalStock
(
@Param
(
"goodId"
)
Integer
goodId
);
//减库存
int
updStockById
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"number"
)
Integer
number
,
@Param
(
"type"
)
Integer
type
);
...
...
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodSpePriceMapper.xml
View file @
759b8e2c
...
...
@@ -41,6 +41,11 @@
FROM tour_good_spe_price WHERE good_id=#{goodId} and is_del=0 ORDER BY start_time
</select>
<!-- 获取出行时间 -->
<select
id=
"getTotalStock"
>
SELECT IFNULL(SUM(stock),0) as stock FROM tour_good_spe_price WHERE good_id=#{goodId} and is_del=0 and IFNULL(DATEDIFF(start_time,NOW()),0)>0
</select>
<!-- 减库存-->
<update
id=
"updStockById"
>
update tour_good_spe_price set
...
...
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