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
4aa617a4
Commit
4aa617a4
authored
Aug 19, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
96f0f7ad
fcd60ab2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
ResultCode.java
...thub/wxiaoqi/security/common/util/process/ResultCode.java
+2
-2
OrderTourService.java
...ava/com/xxfc/platform/order/service/OrderTourService.java
+13
-2
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/process/ResultCode.java
View file @
4aa617a4
...
...
@@ -8,8 +8,8 @@ public class ResultCode {
////////////////////////////参数相关///////////////////////////
//参数非法,请修改
public
static
int
PARAM_ILLEGAL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PARAM_ILLEGAL_CODE"
));
//参数时效已过时,不能使用
public
static
int
PARAM_E
X
PIRE_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PARAM_EXPIRE_CODE"
));
//参数时效已过时,不能使用
X
public
static
int
PARAM_EPIRE_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PARAM_EXPIRE_CODE"
));
public
static
int
VEHICLE_IS_BOOKED
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"VEHICLE_IS_BOOKED"
));
// 操作成功
public
static
int
SUCCESS_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"SUCCESS_CODE"
));
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderTourService.java
View file @
4aa617a4
...
...
@@ -35,6 +35,7 @@ import com.xxfc.platform.vehicle.entity.SysRegion;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.pojo.CompanyDetail
;
import
lombok.extern.log4j.Log4j
;
import
org.mockito.internal.util.collections.Sets
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -47,7 +48,7 @@ import java.util.HashSet;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
*
;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.
APP_ORDER
;
@Service
...
...
@@ -135,8 +136,18 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To
setSiteId
(
bo
.
getSiteId
());
}})).
getData
().
get
(
0
).
getId
());
Integer
departureStatus
=
tourFeign
.
selectDepartureStatusByVerificationId
(
bo
.
getVerificationId
());
//1为已发车
if
(!
SYS_FALSE
.
equals
(
departureStatus
))
{
throw
new
BaseException
(
ResultCode
.
PARAM_EPIRE_CODE
,
Sets
.
newSet
(
"旅程已发车,不能下单"
));
}
//扣減庫存
tourFeign
.
stock
(
bo
.
getSpePriceId
(),
bo
.
getTotalNumber
(),
TourFeign
.
STOCK_SUBTRACT
);
ObjectRestResponse
<
TourSpePriceVo
>
response
=
tourFeign
.
stock
(
bo
.
getSpePriceId
(),
bo
.
getTotalNumber
(),
TourFeign
.
STOCK_SUBTRACT
);
if
(!
SYS_JSON_TRUE
.
equals
(
response
.
getStatus
()))
{
throw
new
BaseException
(
ResultCode
.
PARAM_EPIRE_CODE
,
Sets
.
newSet
(
"库存不足"
));
}
OrderItem
tourAdultItem
=
bo
.
getItemByTypeEnum
(
ItemTypeEnum
.
TOUR_ADULT
);
OrderItem
tourChildItem
=
bo
.
getItemByTypeEnum
(
ItemTypeEnum
.
TOUR_CHILD
);
...
...
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