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
bf3f7cbb
Commit
bf3f7cbb
authored
Jul 17, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旅游核销
parent
6054aafa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
4 deletions
+53
-4
OrderTourVerificationBiz.java
...com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
+21
-4
TourFeign.java
...src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
+4
-0
TourGoodSpeBiz.java
.../main/java/com/xxfc/platform/tour/biz/TourGoodSpeBiz.java
+8
-0
TourGoodSpeController.java
...va/com/xxfc/platform/tour/rest/TourGoodSpeController.java
+6
-0
BranchCompany.java
.../java/com/xxfc/platform/vehicle/entity/BranchCompany.java
+14
-0
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
View file @
bf3f7cbb
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
...
...
@@ -17,6 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.time.Instant
;
import
java.time.LocalTime
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -89,15 +91,30 @@ public class OrderTourVerificationBiz{
}
// 出发时间 是否已经发车
Long
departureTime
=
tourFeign
.
selectDepartureTimeByStartCompanyIdAndRouteId
(
tourDetail
.
getStartCompanyId
(),
tourDetail
.
getGoodId
());
if
(
Instant
.
now
().
toEpochMilli
()<
departureTime
){
Date
departureDate
=
tourFeign
.
selectDepartureDataBySpeId
(
tourDetail
.
getSpePriceId
());
Long
departureTime
=
tourFeign
.
selectDepartureTimeByStartCompanyIdAndRouteId
(
tourDetail
.
getStartCompanyId
(),
tourDetail
.
getGoodId
());
Integer
departureStatus
=
tourFeign
.
selectDepartureStatusByVerificationId
(
verificationId
);
LocalTime
localDepartureTime
=
LocalTime
.
ofSecondOfDay
(
departureTime
);
departureDate
.
setHours
(
localDepartureTime
.
getHour
());
departureDate
.
setMinutes
(
localDepartureTime
.
getMinute
());
departureDate
.
setSeconds
(
localDepartureTime
.
getSecond
());
if
(
Instant
.
now
().
toEpochMilli
()<
departureDate
.
toInstant
().
toEpochMilli
()){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"还未到发车时间"
,
0
);
}
Integer
departureStatus
=
tourFeign
.
selectDepartureStatusByVerificationId
(
verificationId
);
departureDate
.
setHours
(
0
);
departureDate
.
setMinutes
(
0
);
departureDate
.
setSeconds
(
0
);
Instant
seconddayInstant
=
departureDate
.
toInstant
().
plus
(
1
,
ChronoUnit
.
DAYS
);
if
(
Instant
.
now
().
toEpochMilli
()>
seconddayInstant
.
toEpochMilli
()){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"该票已无效"
,
2
);
}
if
(
departureStatus
==
1
){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"已经发车"
,
1
);
}
baseOrder
=
new
BaseOrder
();
baseOrder
.
setId
(
orderId
);
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
());
...
...
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
View file @
bf3f7cbb
...
...
@@ -15,6 +15,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -100,4 +101,7 @@ public interface TourFeign {
@GetMapping
(
"/tourGood/verfication/departure_status"
)
Integer
selectDepartureStatusByVerificationId
(
@RequestParam
(
value
=
"verificationId"
)
Integer
verificationId
);
@GetMapping
(
"/spe/departure_date"
)
Date
selectDepartureDataBySpeId
(
@RequestParam
(
value
=
"speIds"
)
Integer
speIds
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodSpeBiz.java
View file @
bf3f7cbb
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.tour.dto.TourSpePriceDTO
;
import
com.xxfc.platform.tour.entity.TourGoodSpe
;
import
com.xxfc.platform.tour.entity.TourGoodSpePrice
;
import
com.xxfc.platform.tour.mapper.TourGoodSpePriceMapper
;
import
com.xxfc.platform.tour.vo.TourSpePriceVo
;
...
...
@@ -15,6 +16,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -101,4 +103,10 @@ public class TourGoodSpeBiz extends BaseBiz<TourGoodSpePriceMapper, TourGoodSpeP
public
void
delGoodSpe
(
Integer
goodId
,
List
<
Integer
>
ids
){
mapper
.
delSpe
(
goodId
,
ids
);}
public
Date
selectDepartureDataBySpeId
(
Integer
speIds
)
{
TourGoodSpePrice
tourGoodSpePrice
=
new
TourGoodSpePrice
();
tourGoodSpePrice
.
setId
(
speIds
);
TourGoodSpePrice
spePrice
=
mapper
.
selectOne
(
tourGoodSpePrice
);
return
spePrice
.
getStartTime
();
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodSpeController.java
View file @
bf3f7cbb
...
...
@@ -8,6 +8,8 @@ import com.xxfc.platform.tour.dto.TourSpePriceDTO;
import
com.xxfc.platform.tour.vo.TourSpePriceVo
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Date
;
@RestController
@RequestMapping
(
"spe"
)
@IgnoreClientToken
...
...
@@ -32,4 +34,8 @@ public class TourGoodSpeController extends TourBaseController<TourGoodSpeBiz> {
return
baseBiz
.
cutStock
(
speId
,
number
,
type
);
}
@GetMapping
(
"/departure_date"
)
public
Date
selectDepartureDataBySpeId
(
@RequestParam
(
value
=
"speIds"
)
Integer
spePriceId
){
return
baseBiz
.
selectDepartureDataBySpeId
(
spePriceId
);
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/BranchCompany.java
View file @
bf3f7cbb
...
...
@@ -105,4 +105,18 @@ public class BranchCompany {
private
Integer
zoneId
;
private
String
phone
;
/**
* 租车客服电话
*/
@Column
(
name
=
"vehice_service_phone"
)
@ApiModelProperty
(
"租车客服电话"
)
private
String
vehiceServicePhone
;
/**
* 旅游客服电话
*/
@Column
(
name
=
"tour_service_phone"
)
@ApiModelProperty
(
"旅游客服电话"
)
private
String
tourServicePhone
;
}
\ No newline at end of file
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