Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SiEn
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
hewei
SiEn
Commits
ffb20d71
Commit
ffb20d71
authored
Oct 19, 2020
by
lanpingxiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/lanpingxiong' into 'master'
Dev/lanpingxiong See merge request hewei/Jumeirah!30
parents
a1573ab5
8650490c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
12 deletions
+65
-12
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeController.java
+6
-5
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/order/McStrokeController.java
+16
-0
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/StrokeCompleteParam.java
+29
-0
common/src/main/java/com/jumeirah/common/enums/StrokeTypeEnum.java
+3
-1
common/src/main/java/com/jumeirah/common/param/McStrokePageParam.java
+1
-1
common/src/main/java/com/jumeirah/common/vo/McStrokeQueryVo.java
+8
-5
common/src/main/resources/mapper/StrokeMapper.xml
+2
-0
No files found.
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeController.java
View file @
ffb20d71
...
@@ -9,6 +9,7 @@ import com.jumeirah.api.app.entity.param.StrokeDiscountParam;
...
@@ -9,6 +9,7 @@ import com.jumeirah.api.app.entity.param.StrokeDiscountParam;
import
com.jumeirah.common.constant.Constant
;
import
com.jumeirah.common.constant.Constant
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.enums.StatePaymentStatusEnum
;
import
com.jumeirah.common.enums.StatePaymentStatusEnum
;
import
com.jumeirah.common.enums.StrokeTypeEnum
;
import
com.jumeirah.common.param.StrokePageParam
;
import
com.jumeirah.common.param.StrokePageParam
;
import
com.jumeirah.common.param.app.StrokePaymentInfoParam
;
import
com.jumeirah.common.param.app.StrokePaymentInfoParam
;
import
com.jumeirah.common.service.StrokeDiscountService
;
import
com.jumeirah.common.service.StrokeDiscountService
;
...
@@ -83,7 +84,7 @@ public class StrokeController extends BaseController {
...
@@ -83,7 +84,7 @@ public class StrokeController extends BaseController {
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddOneWayParam
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddOneWayParam
,
stroke
);
stroke
.
setType
(
0
)
stroke
.
setType
(
StrokeTypeEnum
.
ONE_WAY
.
getCode
()
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
...
@@ -101,7 +102,7 @@ public class StrokeController extends BaseController {
...
@@ -101,7 +102,7 @@ public class StrokeController extends BaseController {
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddBackAndForthParam
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddBackAndForthParam
,
stroke
);
stroke
.
setType
(
1
)
stroke
.
setType
(
StrokeTypeEnum
.
ROUND_TRIP
.
getCode
()
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
...
@@ -119,7 +120,7 @@ public class StrokeController extends BaseController {
...
@@ -119,7 +120,7 @@ public class StrokeController extends BaseController {
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddFreightParam
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddFreightParam
,
stroke
);
stroke
.
setType
(
2
)
stroke
.
setType
(
StrokeTypeEnum
.
CARGO_FLIGHT
.
getCode
()
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
...
@@ -138,7 +139,7 @@ public class StrokeController extends BaseController {
...
@@ -138,7 +139,7 @@ public class StrokeController extends BaseController {
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddMedicalTreatmentParam
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddMedicalTreatmentParam
,
stroke
);
stroke
.
setType
(
3
)
stroke
.
setType
(
StrokeTypeEnum
.
MEDICAL_FLIGHT
.
getCode
()
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
...
@@ -156,7 +157,7 @@ public class StrokeController extends BaseController {
...
@@ -156,7 +157,7 @@ public class StrokeController extends BaseController {
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
StrokeDiscountQueryVo
strokeDiscountQueryVo
=
strokeDiscountService
.
getStrokeDiscountById
(
strokeDiscountParam
.
getSdId
());
StrokeDiscountQueryVo
strokeDiscountQueryVo
=
strokeDiscountService
.
getStrokeDiscountById
(
strokeDiscountParam
.
getSdId
());
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
stroke
.
setType
(
4
)
stroke
.
setType
(
StrokeTypeEnum
.
PREFERENTIAL_TUNING
.
getCode
()
)
.
setCityOutsetId
(
strokeDiscountQueryVo
.
getCityOutsetId
())
.
setCityOutsetId
(
strokeDiscountQueryVo
.
getCityOutsetId
())
.
setCityArriveId
(
strokeDiscountQueryVo
.
getCityArriveId
())
.
setCityArriveId
(
strokeDiscountQueryVo
.
getCityArriveId
())
.
setPeopleNum
(
strokeDiscountParam
.
getPeopleNum
())
.
setPeopleNum
(
strokeDiscountParam
.
getPeopleNum
())
...
...
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/order/McStrokeController.java
View file @
ffb20d71
package
com
.
jumeirah
.
api
.
merchant
.
controller
.
order
;
package
com
.
jumeirah
.
api
.
merchant
.
controller
.
order
;
import
com.jumeirah.api.merchant.entity.param.StrokeCompleteParam
;
import
com.jumeirah.api.merchant.entity.param.StrokeConfirmPaymentParam
;
import
com.jumeirah.api.merchant.entity.param.StrokeConfirmPaymentParam
;
import
com.jumeirah.api.merchant.entity.param.StrokeDiscountCheckParam
;
import
com.jumeirah.api.merchant.entity.param.StrokeDiscountCheckParam
;
import
com.jumeirah.api.merchant.entity.param.StrokeQuotedPriceParam
;
import
com.jumeirah.api.merchant.entity.param.StrokeQuotedPriceParam
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.enums.StrokeStatusEnum
;
import
com.jumeirah.common.param.McStrokePageParam
;
import
com.jumeirah.common.param.McStrokePageParam
;
import
com.jumeirah.common.service.StrokeService
;
import
com.jumeirah.common.service.StrokeService
;
import
com.jumeirah.common.vo.McStrokeQueryVo
;
import
com.jumeirah.common.vo.McStrokeQueryVo
;
...
@@ -39,6 +41,20 @@ public class McStrokeController extends BaseController {
...
@@ -39,6 +41,20 @@ public class McStrokeController extends BaseController {
private
StrokeService
strokeService
;
private
StrokeService
strokeService
;
/**
/**
* 完成行程接口
*/
@PostMapping
(
"/complete"
)
@OperationLog
(
name
=
"完成行程接口"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"完成行程接口"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
completeStroke
(
@Validated
@RequestBody
StrokeCompleteParam
strokeCompleteParam
)
throws
Exception
{
Stroke
stroke
=
new
Stroke
();
stroke
.
setId
(
strokeCompleteParam
.
getId
())
.
setStatus
(
StrokeStatusEnum
.
COMPLETED
.
getCode
());
boolean
flag
=
strokeService
.
updateStroke
(
stroke
);
return
ApiResult
.
result
(
flag
);
}
/**
* 行程表分页列表
* 行程表分页列表
*/
*/
@PostMapping
(
"/getPageList"
)
@PostMapping
(
"/getPageList"
)
...
...
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/StrokeCompleteParam.java
0 → 100644
View file @
ffb20d71
package
com
.
jumeirah
.
api
.
merchant
.
entity
.
param
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
/**
* 行程表
*
* @author wei
* @since 2020-09-29
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"完成行程对象"
)
public
class
StrokeCompleteParam
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"id不能为空"
)
@ApiModelProperty
(
"主键ID"
)
private
Long
id
;
}
common/src/main/java/com/jumeirah/common/enums/StrokeTypeEnum.java
View file @
ffb20d71
...
@@ -14,7 +14,9 @@ public enum StrokeTypeEnum implements BaseEnum {
...
@@ -14,7 +14,9 @@ public enum StrokeTypeEnum implements BaseEnum {
ONE_WAY
(
0
,
"单程"
),
ONE_WAY
(
0
,
"单程"
),
ROUND_TRIP
(
1
,
"往返"
),
ROUND_TRIP
(
1
,
"往返"
),
CARGO_FLIGHT
(
2
,
"货运"
),
CARGO_FLIGHT
(
2
,
"货运"
),
MEDICAL_FLIGHT
(
3
,
"医疗"
);
MEDICAL_FLIGHT
(
3
,
"医疗"
),
PREFERENTIAL_TUNING
(
4
,
"优惠调机"
),
;
/**
/**
* 编号
* 编号
...
...
common/src/main/java/com/jumeirah/common/param/McStrokePageParam.java
View file @
ffb20d71
...
@@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
...
@@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
public
class
McStrokePageParam
extends
BasePageOrderParam
{
public
class
McStrokePageParam
extends
BasePageOrderParam
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"行程类型,-1-全部,0-单程,1-往返行程,2-货运,3-医疗"
)
@ApiModelProperty
(
"行程类型,-1-全部,0-单程,1-往返行程,2-货运,3-医疗
,4-优惠调机
"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
"主键id"
)
@ApiModelProperty
(
"主键id"
)
...
...
common/src/main/java/com/jumeirah/common/vo/McStrokeQueryVo.java
View file @
ffb20d71
...
@@ -20,13 +20,16 @@ import java.io.Serializable;
...
@@ -20,13 +20,16 @@ import java.io.Serializable;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"StrokeQueryVo对象"
)
@ApiModel
(
value
=
"StrokeQueryVo对象"
)
public
class
McStrokeQueryVo
extends
Stroke
implements
Serializable
{
public
class
McStrokeQueryVo
extends
Stroke
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"申请人"
)
@ApiModelProperty
(
"申请人"
)
private
String
applicant
;
private
String
applicant
;
@ApiModelProperty
(
"手机号"
)
@ApiModelProperty
(
"手机号"
)
private
String
phoneNumber
;
private
String
phoneNumber
;
@ApiModelProperty
(
"飞机型号名称"
)
private
String
plainTypeName
;
}
}
common/src/main/resources/mapper/StrokeMapper.xml
View file @
ffb20d71
...
@@ -121,10 +121,12 @@
...
@@ -121,10 +121,12 @@
SELECT
SELECT
s.*,
s.*,
CONCAT( au.surname, au.`name` ) AS applicant,
CONCAT( au.surname, au.`name` ) AS applicant,
pt.name AS plain_type_name,
au.phone AS phone_number
au.phone AS phone_number
FROM
FROM
stroke s
stroke s
LEFT JOIN app_user au ON au.id = s.user_id
LEFT JOIN app_user au ON au.id = s.user_id
LEFT JOIN plain_type pt ON pt.id = s.plain_type_id
<where>
<where>
<if
test=
"mcStrokePageParam.type != null and mcStrokePageParam.type != -1"
>
<if
test=
"mcStrokePageParam.type != null and mcStrokePageParam.type != -1"
>
AND s.type = #{mcStrokePageParam.type}
AND s.type = #{mcStrokePageParam.type}
...
...
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