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
ad9a032c
Commit
ad9a032c
authored
Nov 05, 2020
by
lanpingxiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/lanpingxiong' into 'master'
Dev/lanpingxiong See merge request hewei/Jumeirah!65
parents
a1a82214
c8b94410
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
23 deletions
+96
-23
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeController.java
+4
-2
common/src/main/java/com/jumeirah/common/entity/Stroke.java
+4
-0
common/src/main/java/com/jumeirah/common/mapper/StrokeMapper.java
+13
-4
common/src/main/java/com/jumeirah/common/service/StrokeService.java
+5
-2
common/src/main/java/com/jumeirah/common/service/impl/StrokeServiceImpl.java
+4
-4
common/src/main/resources/mapper/StrokeMapper.xml
+66
-11
No files found.
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeController.java
View file @
ad9a032c
...
@@ -34,6 +34,7 @@ import org.springframework.web.bind.annotation.GetMapping;
...
@@ -34,6 +34,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -57,6 +58,7 @@ public class StrokeController extends BaseController {
...
@@ -57,6 +58,7 @@ public class StrokeController extends BaseController {
private
StrokeService
strokeService
;
private
StrokeService
strokeService
;
@Autowired
@Autowired
private
StrokeDiscountService
strokeDiscountService
;
private
StrokeDiscountService
strokeDiscountService
;
/**
/**
* 填写付款信息
* 填写付款信息
*/
*/
...
@@ -236,8 +238,8 @@ public class StrokeController extends BaseController {
...
@@ -236,8 +238,8 @@ public class StrokeController extends BaseController {
@PostMapping
(
"/getMyStrokePageList"
)
@PostMapping
(
"/getMyStrokePageList"
)
@OperationLog
(
name
=
"行程分页列表"
,
type
=
OperationLogType
.
PAGE
)
@OperationLog
(
name
=
"行程分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"行程分页列表"
)
@ApiOperation
(
value
=
"行程分页列表"
)
public
ApiResult
<
Paging
<
StrokeQueryVo
>>
getMyStrokePageList
(
@Validated
@RequestBody
StrokePageParam
strokePageParam
)
throws
Exception
{
public
ApiResult
<
Paging
<
StrokeQueryVo
>>
getMyStrokePageList
(
@Validated
@RequestBody
StrokePageParam
strokePageParam
,
@RequestHeader
(
required
=
false
)
String
language
)
throws
Exception
{
Paging
<
StrokeQueryVo
>
paging
=
strokeService
.
getStrokePageList
(
strokePageParam
);
Paging
<
StrokeQueryVo
>
paging
=
strokeService
.
getStrokePageList
(
strokePageParam
,
language
);
return
ApiResult
.
ok
(
paging
);
return
ApiResult
.
ok
(
paging
);
}
}
...
...
common/src/main/java/com/jumeirah/common/entity/Stroke.java
View file @
ad9a032c
...
@@ -175,4 +175,8 @@ public class Stroke extends BaseEntity {
...
@@ -175,4 +175,8 @@ public class Stroke extends BaseEntity {
@ApiModelProperty
(
"是否是优惠调机,0-否,1-是"
)
@ApiModelProperty
(
"是否是优惠调机,0-否,1-是"
)
private
Boolean
isDiscount
;
private
Boolean
isDiscount
;
@NotNull
(
message
=
"付款渠道不能为空"
)
@ApiModelProperty
(
"付款渠道,0-线下渠道,1-线上渠道"
)
private
Integer
paymentChannel
;
}
}
common/src/main/java/com/jumeirah/common/mapper/StrokeMapper.java
View file @
ad9a032c
...
@@ -38,18 +38,26 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
...
@@ -38,18 +38,26 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
*
*
* @param page
* @param page
* @param strokePageParam
* @param strokePageParam
* @param language
* @param userId
* @return
* @return
*/
*/
IPage
<
StrokeQueryVo
>
getStrokePageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
StrokePageParam
strokePageParam
,
@Param
(
"userId"
)
Long
userId
);
IPage
<
StrokeQueryVo
>
getStrokePageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
StrokePageParam
strokePageParam
,
@Param
(
"userId"
)
Long
userId
,
@Param
(
"language"
)
String
language
);
/**
/**
* 查询已完成行程
* 查询已完成行程
*
* @param page
* @param page
* @param strokePageParam
* @param strokePageParam
* @param userId
* @param userId
* @param language
* @return
* @return
*/
*/
IPage
<
StrokeQueryVo
>
getStrokePageListWithFinish
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
StrokePageParam
strokePageParam
,
@Param
(
"userId"
)
Long
userId
);
IPage
<
StrokeQueryVo
>
getStrokePageListWithFinish
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
StrokePageParam
strokePageParam
,
@Param
(
"userId"
)
Long
userId
,
@Param
(
"language"
)
String
language
);
/**
/**
* 商家端 获取行程分页对象
* 商家端 获取行程分页对象
...
@@ -61,17 +69,18 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
...
@@ -61,17 +69,18 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
*/
*/
IPage
<
McStrokeQueryVo
>
getMcStrokePageList
(
IPage
<
McStrokeQueryVo
>
getMcStrokePageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"mcStrokePageParam"
)
McStrokePageParam
mcStrokePageParam
,
@Param
(
"page"
)
Page
page
,
@Param
(
"mcStrokePageParam"
)
McStrokePageParam
mcStrokePageParam
,
@Param
(
"mcId"
)
L
ong
mcId
);
@Param
(
"mcId"
)
l
ong
mcId
);
/**
/**
* 收款记录
* 收款记录
*
* @param page
* @param page
* @param mcStrokePaymentPageParam
* @param mcStrokePaymentPageParam
* @param mcId
* @param mcId
* @return
* @return
*/
*/
IPage
<
McStrokePaymentQueryVo
>
getPaymentPageList
(
IPage
<
McStrokePaymentQueryVo
>
getPaymentPageList
(
Page
<
StrokeQueryVo
>
page
,
@Param
(
"param"
)
McStrokePaymentPageParam
mcStrokePaymentPageParam
,
Page
<
StrokeQueryVo
>
page
,
@Param
(
"param"
)
McStrokePaymentPageParam
mcStrokePaymentPageParam
,
@Param
(
"mcId"
)
Long
mcId
);
@Param
(
"mcId"
)
Long
mcId
);
}
}
common/src/main/java/com/jumeirah/common/service/StrokeService.java
View file @
ad9a032c
...
@@ -63,20 +63,23 @@ public interface StrokeService extends BaseService<Stroke> {
...
@@ -63,20 +63,23 @@ public interface StrokeService extends BaseService<Stroke> {
* 获取分页对象
* 获取分页对象
*
*
* @param strokePageParam
* @param strokePageParam
* @param language
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
Paging
<
StrokeQueryVo
>
getStrokePageList
(
StrokePageParam
strokePageParam
)
throws
Exception
;
Paging
<
StrokeQueryVo
>
getStrokePageList
(
StrokePageParam
strokePageParam
,
String
language
)
throws
Exception
;
/**
/**
* 商家端,分页获取行程接口
* 商家端,分页获取行程接口
*
* @param mcStrokePageParam
* @param mcStrokePageParam
* @return
* @return
*/
*/
Paging
<
McStrokeQueryVo
>
getMcStrokePageList
(
McStrokePageParam
mcStrokePageParam
);
Paging
<
McStrokeQueryVo
>
getMcStrokePageList
(
McStrokePageParam
mcStrokePageParam
);
/**
/**
* 收款记录
* 收款记录
*
* @param mcStrokePaymentPageParam
* @param mcStrokePaymentPageParam
* @return
* @return
*/
*/
...
...
common/src/main/java/com/jumeirah/common/service/impl/StrokeServiceImpl.java
View file @
ad9a032c
...
@@ -98,22 +98,22 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
...
@@ -98,22 +98,22 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
}
}
@Override
@Override
public
Paging
<
StrokeQueryVo
>
getStrokePageList
(
StrokePageParam
strokePageParam
)
throws
Exception
{
public
Paging
<
StrokeQueryVo
>
getStrokePageList
(
StrokePageParam
strokePageParam
,
String
language
)
throws
Exception
{
// Page<StrokeQueryVo> page = new PageInfo<>(strokePageParam, OrderItem.asc(getLambdaColumn(Stroke::getCreateTime)));
// Page<StrokeQueryVo> page = new PageInfo<>(strokePageParam, OrderItem.asc(getLambdaColumn(Stroke::getCreateTime)));
Page
<
StrokeQueryVo
>
page
=
new
PageInfo
<>(
strokePageParam
,
OrderItem
.
desc
(
"s.create_time"
));
Page
<
StrokeQueryVo
>
page
=
new
PageInfo
<>(
strokePageParam
,
OrderItem
.
desc
(
"s.create_time"
));
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
// 查询已完成 需要额外查询已取消状态
// 查询已完成 需要额外查询已取消状态
if
(
strokePageParam
.
getStatus
().
equals
(
StrokeStatusEnum
.
COMPLETED
.
getCode
()))
{
if
(
strokePageParam
.
getStatus
().
equals
(
StrokeStatusEnum
.
COMPLETED
.
getCode
()))
{
IPage
<
StrokeQueryVo
>
iPage
=
strokeMapper
.
getStrokePageListWithFinish
(
page
,
strokePageParam
,
jwtToken
.
getUserId
());
IPage
<
StrokeQueryVo
>
iPage
=
strokeMapper
.
getStrokePageListWithFinish
(
page
,
strokePageParam
,
jwtToken
.
getUserId
()
,
language
);
return
new
Paging
<
StrokeQueryVo
>(
iPage
);
return
new
Paging
<
StrokeQueryVo
>(
iPage
);
}
}
IPage
<
StrokeQueryVo
>
iPage
=
strokeMapper
.
getStrokePageList
(
page
,
strokePageParam
,
jwtToken
.
getUserId
());
IPage
<
StrokeQueryVo
>
iPage
=
strokeMapper
.
getStrokePageList
(
page
,
strokePageParam
,
jwtToken
.
getUserId
()
,
language
);
return
new
Paging
<
StrokeQueryVo
>(
iPage
);
return
new
Paging
<
StrokeQueryVo
>(
iPage
);
}
}
@Override
@Override
public
Paging
<
McStrokeQueryVo
>
getMcStrokePageList
(
McStrokePageParam
mcStrokePageParam
)
{
public
Paging
<
McStrokeQueryVo
>
getMcStrokePageList
(
McStrokePageParam
mcStrokePageParam
)
{
Page
<
StrokeQueryVo
>
page
=
new
PageInfo
<>(
mcStrokePageParam
,
OrderItem
.
asc
(
getLambdaColumn
(
Stroke:
:
getCreateTime
))
);
Page
<
StrokeQueryVo
>
page
=
new
PageInfo
<>(
mcStrokePageParam
);
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
IPage
<
McStrokeQueryVo
>
mcStrokePageList
=
strokeMapper
.
getMcStrokePageList
(
page
,
mcStrokePageParam
,
jwtToken
.
getMcId
());
IPage
<
McStrokeQueryVo
>
mcStrokePageList
=
strokeMapper
.
getMcStrokePageList
(
page
,
mcStrokePageParam
,
jwtToken
.
getMcId
());
return
new
Paging
<
McStrokeQueryVo
>(
mcStrokePageList
);
return
new
Paging
<
McStrokeQueryVo
>(
mcStrokePageList
);
...
...
common/src/main/resources/mapper/StrokeMapper.xml
View file @
ad9a032c
...
@@ -76,10 +76,20 @@
...
@@ -76,10 +76,20 @@
<select
id=
"getStrokePageList"
parameterType=
"com.jumeirah.common.param.StrokePageParam"
<select
id=
"getStrokePageList"
parameterType=
"com.jumeirah.common.param.StrokePageParam"
resultType=
"com.jumeirah.common.vo.StrokeQueryVo"
>
resultType=
"com.jumeirah.common.vo.StrokeQueryVo"
>
select
select
ctco.city_name_cn as city_outset_name,
<choose>
ctco.airport_name_cn as outset_airport_name,
<when
test=
"language !='zh_CN'"
>
ctca.city_name_cn as city_arrive_name,
ctco.city_name_en as city_outset_name,
ctca.airport_name_cn as arrive_airport_name,
ctco.airport_name_en as outset_airport_name,
ctca.city_name_en as city_arrive_name,
ctca.airport_name_en as arrive_airport_name,
</when>
<otherwise>
ctco.city_name_cn as city_outset_name,
ctco.airport_name_cn as outset_airport_name,
ctca.city_name_cn as city_arrive_name,
ctca.airport_name_cn as arrive_airport_name,
</otherwise>
</choose>
<include
refid=
"Page_Column_List"
/>
<include
refid=
"Page_Column_List"
/>
from stroke s
from stroke s
INNER JOIN merchant_user mu ON mu.id = s.mc_id
INNER JOIN merchant_user mu ON mu.id = s.mc_id
...
@@ -101,10 +111,20 @@
...
@@ -101,10 +111,20 @@
<select
id=
"getStrokePageListWithFinish"
parameterType=
"com.jumeirah.common.param.StrokePageParam"
<select
id=
"getStrokePageListWithFinish"
parameterType=
"com.jumeirah.common.param.StrokePageParam"
resultType=
"com.jumeirah.common.vo.StrokeQueryVo"
>
resultType=
"com.jumeirah.common.vo.StrokeQueryVo"
>
select
select
ctco.city_name_cn as city_outset_name,
<choose>
ctco.airport_name_cn as outset_airport_name,
<when
test=
"language !='zh_CN'"
>
ctca.city_name_cn as city_arrive_name,
ctco.city_name_en as city_outset_name,
ctca.airport_name_cn as arrive_airport_name,
ctco.airport_name_en as outset_airport_name,
ctca.city_name_en as city_arrive_name,
ctca.airport_name_en as arrive_airport_name,
</when>
<otherwise>
ctco.city_name_cn as city_outset_name,
ctco.airport_name_cn as outset_airport_name,
ctca.city_name_cn as city_arrive_name,
ctca.airport_name_cn as arrive_airport_name,
</otherwise>
</choose>
<include
refid=
"Page_Column_List"
/>
<include
refid=
"Page_Column_List"
/>
from stroke s
from stroke s
INNER JOIN merchant_user mu ON mu.id = s.mc_id
INNER JOIN merchant_user mu ON mu.id = s.mc_id
...
@@ -121,12 +141,47 @@
...
@@ -121,12 +141,47 @@
<select
id=
"getMcStrokePageList"
parameterType=
"com.jumeirah.common.param.McStrokePageParam"
<select
id=
"getMcStrokePageList"
parameterType=
"com.jumeirah.common.param.McStrokePageParam"
resultType=
"com.jumeirah.common.vo.McStrokeQueryVo"
>
resultType=
"com.jumeirah.common.vo.McStrokeQueryVo"
>
SELECT
SELECT
s.*,
s.id,
s.city_outset_id,
s.deleted,
s.city_arrive_id,
s.people_num,
s.plain_type_id,
s.outset_time,
s.return_time,
s.type,
s.status,
s.create_time,
s.update_time,
s.goods_name,
s.goods_size,
s.goods_weight,
s.disease_name,
s.medical_certificate_url,
s.instruments,
s.medical_persons,
s.remarks,
s.money,
s.user_id,
s.arrive_plain_type_id,
s.back_outset_airport_name,
s.back_arrive_airport_name,
s.choose_plain_type,
s.payment_status,
s.audit_status,
s.user_recharge_money,
s.user_recharge_bank,
s.user_recharge_name,
s.user_recharge_bank_number,
s.user_recharge_credentials_url,
s.user_recharge_time,
s.is_discount,
s.payment_channel,
ctco.city_name_cn as city_outset_name,
ctco.city_name_cn as city_outset_name,
ctco.airport_name_cn as outset_airport_name,
ctco.airport_name_cn as outset_airport_name,
ctca.city_name_cn as city_arrive_name,
ctca.city_name_cn as city_arrive_name,
ctca.airport_name_cn as arrive_airport_name,
ctca.airport_name_cn as arrive_airport_name,
CONCAT( au.surname, au.
`name`
) AS applicant,
CONCAT( au.surname, au.
name
) AS applicant,
pt.name AS plain_type_name,
pt.name AS plain_type_name,
au.phone AS phone_number
au.phone AS phone_number
FROM
FROM
...
@@ -153,7 +208,7 @@
...
@@ -153,7 +208,7 @@
AND s.create_time
<
= #{mcStrokePageParam.endTime}
AND s.create_time
<
= #{mcStrokePageParam.endTime}
</if>
</if>
<if
test=
"mcStrokePageParam.applicant != null and mcStrokePageParam.applicant != ''"
>
<if
test=
"mcStrokePageParam.applicant != null and mcStrokePageParam.applicant != ''"
>
AND CONCAT( au.surname, au.`name`
) LIKE CONCAT('%',#{mcStrokePageParam.applicant},'%')
AND CONCAT( au.surname, au.`name`) LIKE CONCAT('%',#{mcStrokePageParam.applicant},'%')
</if>
</if>
</where>
</where>
ORDER BY s.create_time DESC
ORDER BY s.create_time DESC
...
...
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