记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
ab441242
Commit
ab441242
authored
Jun 01, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
ae820575
44690a2e
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
191 additions
and
99 deletions
+191
-99
KylinStationCheckOrderParam.java
.../service/kylin/dto/param/KylinStationCheckOrderParam.java
+8
-6
KylinOrderTicketEntitiesVo.java
...dnet/service/kylin/dto/vo/KylinOrderTicketEntitiesVo.java
+16
-1
KylinStationCheckOrderVo.java
...uidnet/service/kylin/dto/vo/KylinStationCheckOrderVo.java
+30
-7
KylinPerformanceMisVo.java
...t/service/kylin/dto/vo/partner/KylinPerformanceMisVo.java
+4
-0
IKylinOrderTicketEntitiesService.java
...rvice/kylin/service/IKylinOrderTicketEntitiesService.java
+3
-1
details.html
...ources/templates/zhengzai/kylin/performances/details.html
+70
-47
PerformanceVoUtils.java
...client/admin/zhengzai/kylin/utils/PerformanceVoUtils.java
+4
-1
liquidnet-support-zuul.yml
...et-bus-config/liquidnet-config/liquidnet-support-zuul.yml
+4
-1
KylinStationController.java
...dnet/service/kylin/controller/KylinStationController.java
+8
-4
KylinOrderTicketEntitiesServiceImpl.java
...lin/service/impl/KylinOrderTicketEntitiesServiceImpl.java
+38
-25
kylin_order_ticket_entities.properties
...n/resources/sqlmap/kylin_order_ticket_entities.properties
+1
-1
GlobalAuthFilter.java
...a/com/liquidnet/support/zuul/filter/GlobalAuthFilter.java
+5
-5
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/KylinStationCheckOrderParam.java
View file @
ab441242
...
...
@@ -11,10 +11,12 @@ import java.util.List;
@Data
public
class
KylinStationCheckOrderParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2312115659117282564L
;
@ApiModelProperty
(
position
=
11
,
value
=
"演出ID[64]"
)
private
String
performanceId
;
@ApiModelProperty
(
position
=
13
,
value
=
"出票端:(验票app)android/ios"
)
private
String
checkClient
;
@ApiModelProperty
(
position
=
14
,
value
=
"出票`orderTicketEntitiesId`列表"
)
private
List
<
String
>
checkedEntitiesIdList
;
@ApiModelProperty
(
position
=
10
,
value
=
"票明细ID"
)
private
String
ticketEntitiesId
;
@ApiModelProperty
(
position
=
11
,
value
=
"验票类型:1-扫码,2-手机号"
)
private
String
checkType
;
@ApiModelProperty
(
position
=
12
,
value
=
"验票时间[yyyy-MM-dd HH:mm:ss]"
)
private
String
checkedAt
;
@ApiModelProperty
(
position
=
13
,
value
=
"验票操作人ID"
)
private
String
checkUserId
;
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/KylinOrderTicketEntitiesVo.java
View file @
ab441242
...
...
@@ -5,7 +5,7 @@ import lombok.Data;
import
java.io.Serializable
;
@Data
public
class
KylinOrderTicketEntitiesVo
implements
Serializable
{
public
class
KylinOrderTicketEntitiesVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1207664465164005975L
;
private
String
orderTicketEntitiesId
;
...
...
@@ -30,4 +30,19 @@ public class KylinOrderTicketEntitiesVo implements Serializable {
private
String
createdAt
;
private
String
updatedAt
;
private
String
checkType
;
private
String
checkedAt
;
private
String
checkUserId
;
private
static
final
KylinOrderTicketEntitiesVo
obj
=
new
KylinOrderTicketEntitiesVo
();
public
static
KylinOrderTicketEntitiesVo
getNew
()
{
try
{
return
(
KylinOrderTicketEntitiesVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
KylinOrderTicketEntitiesVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/KylinStationCheckOrderVo.java
View file @
ab441242
package
com
.
liquidnet
.
service
.
kylin
.
dto
.
vo
;
import
com.liquidnet.commons.lang.util.SensitizeUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -16,18 +17,28 @@ public class KylinStationCheckOrderVo implements Serializable {
private
String
performanceId
;
@ApiModelProperty
(
position
=
12
,
value
=
"订单ID"
)
private
String
orderId
;
@ApiModelProperty
(
position
=
13
,
value
=
"用户昵称"
)
@ApiModelProperty
(
position
=
13
,
value
=
"票种ID"
)
private
String
ticketId
;
@ApiModelProperty
(
position
=
14
,
value
=
"二维身份CODE"
)
private
String
qrCode
;
@ApiModelProperty
(
position
=
15
,
value
=
"订单用户姓名"
)
private
String
userName
;
@ApiModelProperty
(
position
=
16
,
value
=
"订单用户手机号"
)
private
String
userMobile
;
@ApiModelProperty
(
position
=
17
,
value
=
"入场人姓名"
)
private
String
enterName
;
@ApiModelProperty
(
position
=
1
4
,
value
=
"用户
手机号"
)
@ApiModelProperty
(
position
=
1
8
,
value
=
"入场人
手机号"
)
private
String
enterMobile
;
@ApiModelProperty
(
position
=
1
5
,
value
=
"出票状态:0-未出票,1-已出票"
)
@ApiModelProperty
(
position
=
1
9
,
value
=
"出票状态:0-未出票,1-已出票"
)
private
Integer
status
;
@ApiModelProperty
(
position
=
16
,
value
=
"支付状态:0-未支付,1-已支付,2-退款中,3-已退款"
)
@ApiModelProperty
(
position
=
20
,
value
=
"支付状态:0-未支付,1-已支付,2-退款中,3-已退款"
)
private
Integer
isPayment
;
@ApiModelProperty
(
position
=
17
,
value
=
"出票端:(验票app)android/ios"
)
@ApiModelProperty
(
position
=
21
,
value
=
"出票端:(验票app)android/ios"
)
private
String
checkClient
;
@ApiModelProperty
(
position
=
18
,
value
=
"二维身份CODE"
)
private
String
qrCode
;
@ApiModelProperty
(
position
=
22
,
value
=
"验票类型:1-扫码,2-手机号"
)
private
String
checkType
;
@ApiModelProperty
(
position
=
23
,
value
=
"验票时间[yyyy-MM-dd HH:mm:ss]"
)
private
String
checkedAt
;
private
static
final
KylinStationCheckOrderVo
obj
=
new
KylinStationCheckOrderVo
();
...
...
@@ -38,4 +49,16 @@ public class KylinStationCheckOrderVo implements Serializable {
return
new
KylinStationCheckOrderVo
();
}
}
public
String
getUserName
()
{
return
SensitizeUtil
.
chineseName
(
userName
);
}
public
String
getEnterName
()
{
return
SensitizeUtil
.
chineseName
(
enterName
);
}
public
String
getEnterMobile
()
{
return
SensitizeUtil
.
custom
(
enterMobile
,
3
,
4
);
}
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/partner/KylinPerformanceMisVo.java
View file @
ab441242
package
com
.
liquidnet
.
service
.
kylin
.
dto
.
vo
.
partner
;
import
com.liquidnet.service.kylin.dto.vo.KylinBuyNoticeVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -57,6 +58,9 @@ public class KylinPerformanceMisVo {
@ApiModelProperty
(
value
=
"购票须知"
)
private
String
noticeImage
;
@ApiModelProperty
(
value
=
"购票须知数组"
)
private
List
<
KylinBuyNoticeVo
>
noticeImageList
;
@ApiModelProperty
(
value
=
"状态"
)
private
Integer
status
;
...
...
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/service/IKylinOrderTicketEntitiesService.java
View file @
ab441242
...
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.liquidnet.service.kylin.dto.param.KylinStationCheckOrderParam
;
import
com.liquidnet.service.kylin.entity.KylinOrderTicketEntities
;
import
java.util.List
;
/**
* <p>
* 订单详情 服务类
...
...
@@ -14,5 +16,5 @@ import com.liquidnet.service.kylin.entity.KylinOrderTicketEntities;
*/
public
interface
IKylinOrderTicketEntitiesService
extends
IService
<
KylinOrderTicketEntities
>
{
void
updateByStation
(
KylinStationCheckOrderParam
checkDataParam
);
void
updateByStation
(
List
<
KylinStationCheckOrderParam
>
checkOrderParamList
);
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performances/details.html
View file @
ab441242
...
...
@@ -70,7 +70,9 @@
</div>
<div>
<label>
演出类型:
</label>
<span
id=
"type"
></span>
<span
th:if=
"*{type==101}"
>
音乐节
</span>
<span
th:if=
"*{type==102}"
>
小型演出
</span>
<span
th:if=
"*{type==103}"
>
巡演
</span>
</div>
<div>
<label>
场地:
</label>
...
...
@@ -107,12 +109,16 @@
</div>
<div
id=
"noticeImg"
>
<span>
购票须知:
</span>
<div
th:each=
"dict : ${kylinPerformanceMisVo.noticeImageList}"
>
<span
th:text=
"${dict.title}"
></span>
<img
th:src=
"${dict.imgUrl}"
/>
<span
th:text=
"${dict.message}"
></span>
</div>
</div>
<div
th:each=
"dict : ${kylinPerformanceMisVo.ticketTimes}"
>
<div
th:each=
"dict2 : ${dict.ticket}"
>
<br/>
<br/>
<div>
<span>
票种名称:
</span>
...
...
@@ -132,17 +138,21 @@
<span>
票种说明:
</span>
<span
th:text=
"${dict2.title}"
></span>
</div>
<!-- <div>-->
<!-- <span>电子票说明:</span>-->
<!-- <span th:text="${dict2.describeElectronic}"></span>-->
<!-- </div>-->
<!-- <div>-->
<!-- <span>快递票说明:</span>-->
<!-- <span th:text="${dict2.describesExpress}"></span>-->
<!-- </div>-->
<div>
<!-- <div>-->
<!-- <span>电子票说明:</span>-->
<!-- <span th:text="${dict2.describeElectronic}"></span>-->
<!-- </div>-->
<!-- <div>-->
<!-- <span>快递票说明:</span>-->
<!-- <span th:text="${dict2.describesExpress}"></span>-->
<!-- </div>-->
<div
th:if=
"${dict2.limitCount == 0}"
>
<span>
限购:
</span>
<span
th:text=
"${dict2.limitCount}"
></span>
<span>
不限购
</span>
</div>
<div
th:if=
"${dict2.limitCount != 0}"
>
<span>
限购:
</span>
<span
th:text=
"${dict2.limitCount}"
>
不限购
</span>
</div>
<div>
<span>
库存总量:
</span>
...
...
@@ -150,7 +160,14 @@
</div>
<div>
<span>
售票状态:
</span>
<span
th:text=
"${dict2.status}"
></span>
<span
th:if=
"${dict2.status == 1}"
>
审核中
</span>
<span
th:if=
"${dict2.status == 3}"
>
审核通过
</span>
<span
th:if=
"${dict2.status == 4}"
>
未通过
</span>
<span
th:if=
"${dict2.status == 6}"
>
在售
</span>
<span
th:if=
"${dict2.status == 7}"
>
下架
</span>
<span
th:if=
"${dict2.status == 8}"
>
售罄
</span>
<span
th:if=
"${dict2.status == 9}"
>
未开始
</span>
<span
th:if=
"${dict2.status == 10}"
>
已结束
</span>
</div>
<div>
<span>
开始售票时间:
</span>
...
...
@@ -158,22 +175,24 @@
</div>
<div>
<span>
是否学生票:
</span>
<span
th:text=
"${dict2.isStudent}"
></span>
<span
th:if=
"${dict2.isStudent==1}"
>
是
</span>
<span
th:if=
"${dict2.isStudent==0}"
>
否
</span>
</div>
<div>
<span>
是否显示二维码:
</span>
<span
th:text=
"${dict2.isShowCode}"
></span>
<span
th:if=
"${dict2.isShowCode==1}"
>
是
</span>
<span
th:if=
"${dict2.isShowCode==0}"
>
否
</span>
</div>
<div>
<div
th:if=
"${dict2.isShowCode==1}"
>
<span>
二维码显示时间:
</span>
<span
th:
if=
"${dict2.isShowCode==1}"
th:
text=
"${dict2.qrCodeShowTime}"
></span>
<span
th:text=
"${dict2.qrCodeShowTime}"
></span>
</div>
<div>
<span>
取票方式:
</span>
<span
th:
text=
"${dict2.isElectronic}"
>
</span>
<span
th:
text=
"${dict2.isExpress}"
>
</span>
<span
th:
if=
"${dict2.isElectronic==1}"
>
电子票
</span>
<span
th:
if=
"${dict2.isExpress==1}"
>
快递票
</span>
</div>
<div>
<div
th:if=
"${dict2.isExpress==1}"
>
<span>
快递票停售时间:
</span>
<span
th:text=
"${dict2.timeEndExpress}"
></span>
</div>
...
...
@@ -181,7 +200,7 @@
</div>
</form>
</div>
<div
class=
"panel-body"
th:width=
"max"
style=
"margin-top: 10px"
>
<div
class=
"panel-body"
th:width=
"max"
style=
"margin-top: 10px"
name=
"auditBtn"
>
<div
class=
"radio check-box"
>
<input
type=
"radio"
value=
"1"
name=
"auditCheck"
>
同意
</label>
</div>
...
...
@@ -189,7 +208,8 @@
<input
type=
"radio"
value=
"0"
name=
"auditCheck"
>
拒绝
</label>
</div>
<input
name=
"rejectTxt"
class=
"form-control"
type=
"text"
/>
<button
type=
"button"
class=
"btn btn-w-m btn-success"
name=
"isShowBtn"
style=
"margin-top: 10px"
<button
type=
"button"
class=
"btn btn-w-m btn-success"
style=
"margin-top: 10px"
onclick=
"aduitHandler()"
>
审核
</button>
</div>
...
...
@@ -207,6 +227,12 @@
const
isShow
=
'[[${kylinPerformanceMisVo.isShow}]]'
;
const
auditStatus
=
'[[${kylinPerformanceMisVo.auditStatus}]]'
;
if
(
auditStatus
!=
0
)
{
document
.
getElementsByName
(
"auditBtn"
)[
0
].
style
.
display
=
"none"
;
}
if
(
isShow
==
1
)
{
document
.
getElementsByName
(
"isShowCheck"
)[
0
].
checked
=
true
;
}
else
{
...
...
@@ -216,7 +242,7 @@
//修改 演出是否显示
function
submitHandler
()
{
var
param
=
{
"isShow"
:
document
.
getElementsByName
(
"
audit
Check"
)[
0
].
checked
?
1
:
0
,
"isShow"
:
document
.
getElementsByName
(
"
isShow
Check"
)[
0
].
checked
?
1
:
0
,
"performancesId"
:
'[[${kylinPerformanceMisVo.performancesId}]]'
.
replaceAll
(
"
\"
"
,
""
)
};
$
.
operate
.
post
(
prefix
+
"/isShow"
,
param
,
function
(
res
)
{
...
...
@@ -225,35 +251,32 @@
//演出审核
function
aduitHandler
()
{
const
auditStatus
=
document
.
getElementsByName
(
"
isShow
Check"
)[
0
].
checked
?
3
:
4
;
const
auditStatus
=
document
.
getElementsByName
(
"
audit
Check"
)[
0
].
checked
?
3
:
4
;
var
auditRejectTxt
=
""
if
(
4
===
auditStatus
)
{
auditRejectTxt
=
document
.
getElementsByName
(
"rejectTxt"
)[
0
].
textContent
;
if
(
4
===
auditStatus
)
{
auditRejectTxt
=
document
.
getElementsByName
(
"rejectTxt"
)[
0
].
value
;
}
if
(
4
===
auditStatus
&&
auditRejectTxt
===
""
)
{
alert
(
"请填写拒绝理由"
);
}
else
{
var
param
=
{
"status"
:
auditStatus
,
"performancesId"
:
'[[${kylinPerformanceMisVo.performancesId}]]'
.
replaceAll
(
"
\"
"
,
""
),
"rejectTxt"
:
auditRejectTxt
"rejectTxt"
:
auditRejectTxt
};
$
.
operate
.
post
(
prefix
+
"/audit"
,
param
,
function
(
res
)
{
});
}
//演出信息
const
type
=
document
.
getElementById
(
"type"
);
var
typeInt
=
'[[${kylinPerformanceMisVo.type}]]'
;
if
(
typeInt
==
101
)
{
type
.
textContent
=
'音乐节'
}
else
if
(
typeInt
==
102
)
{
type
.
textContent
=
'小型演出'
}
else
if
(
typeInt
==
103
||
typeInt
==
3
)
{
type
.
textContent
=
'巡演'
}
// 演出详情 购票须知
var
subText
=
document
.
getElementById
(
"subText"
)
subText
.
innerHTML
=
"演出详情:"
+
'[[${kylinPerformanceMisVo.details}]]'
.
replaceAll
(
"
\"
"
,
""
);
var
noticeImg
=
document
.
getElementById
(
"noticeImg"
)
noticeImg
.
innerHTML
=
"购票须知:"
+
'[[${kylinPerformanceMisVo.noticeImage}]]'
.
replaceAll
(
"
\"
"
,
""
);
// var noticeImg = document.getElementById("noticeImg")
// noticeImg.innerHTML = "购票须知:" + '[[${kylinPerformanceMisVo.noticeImage}]]'.replaceAll("\"", "");
// var noticeImgJson = $.parseJSON('[[${kylinPerformanceMisVo.noticeImage}]]'.substr(1, '[[${kylinPerformanceMisVo.noticeImage}]]'.length-2));
// alert(noticeImgJson[0]['title']);
</script>
</body>
</html>
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/utils/PerformanceVoUtils.java
View file @
ab441242
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
kylin
.
utils
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.kylin.dto.param.PerformancePartnerVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinBuyNoticeVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinPerformanceVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinTicketTimesVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinTicketVo
;
...
...
@@ -279,7 +282,7 @@ public class PerformanceVoUtils {
// performanceMisVo.setIsShow(1);
kylinPerformanceMisVo
.
setIsDistribution
(
0
);
kylinPerformanceMisVo
.
setSyncAgent
(
0
);
kylinPerformanceMisVo
.
set
AuditStatus
(
0
);
kylinPerformanceMisVo
.
set
NoticeImageList
(
JsonUtils
.
fromJson
(
kylinPerformanceMisVo
.
getNoticeImage
(),
new
TypeReference
<
List
<
KylinBuyNoticeVo
>>()
{})
);
// }
// boolean exists = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceMisVo.class, PerformanceMisVo.class.getSimpleName());
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-support-zuul.yml
View file @
ab441242
...
...
@@ -74,13 +74,16 @@ zuul:
# 忽略的接口,屏蔽接口
# ignored-patterns: /**/div/**
# -----------------------------------------------------------
# 判断顺序: exclude.url > include.url > include.url-pattern > exclude.url-pattern
global
:
include
:
url
:
url-pattern
:
/kylin/station/**
exclude
:
url
:
/adam/send,
/adam/member/info
/adam/member/info,
/kylin/station/login,
/kylin/station/login/sms
url-pattern
:
/**/login/**,
/*/v2/api-docs*,
/kylin/**
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinStationController.java
View file @
ab441242
...
...
@@ -243,17 +243,21 @@ public class KylinStationController {
for
(
KylinOrderTicketVo
t
:
orderTicketVoList
)
for
(
KylinStationCheckOrderVo
r
:
voList
)
if
(
r
.
getOrderId
().
equals
(
t
.
getOrderTicketsId
()))
r
.
setQrCode
(
t
.
getQrCode
());
if
(
r
.
getOrderId
().
equals
(
t
.
getOrderTicketsId
()))
{
r
.
setQrCode
(
t
.
getQrCode
());
r
.
setUserMobile
(
t
.
getUserMobile
());
r
.
setUserName
(
t
.
getUserName
());
}
return
ResponseDto
.
success
(
voList
);
}
@ApiOperation
(
value
=
"上载验票数据"
)
@PostMapping
(
"upload"
)
public
ResponseDto
<
Object
>
uploadTicketData
(
@RequestBody
KylinStationCheckOrderParam
checkDataParam
)
{
log
.
info
(
"checkDataParams:{}"
,
JsonUtils
.
toJson
(
check
DataParam
));
public
ResponseDto
<
Object
>
uploadTicketData
(
@RequestBody
List
<
KylinStationCheckOrderParam
>
checkOrderParamList
)
{
log
.
info
(
"checkDataParams:{}"
,
JsonUtils
.
toJson
(
check
OrderParamList
));
kylinOrderTicketEntitiesService
.
updateByStation
(
check
DataParam
);
kylinOrderTicketEntitiesService
.
updateByStation
(
check
OrderParamList
);
return
ResponseDto
.
success
();
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketEntitiesServiceImpl.java
View file @
ab441242
package
com
.
liquidnet
.
service
.
kylin
.
service
.
impl
;
import
com.
liquidnet.common.mq.constant.MQConst
;
import
com.
baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.
service.base.SqlMapping
;
import
com.liquidnet.
commons.lang.util.JsonUtils
;
import
com.liquidnet.service.kylin.dto.param.KylinStationCheckOrderParam
;
import
com.liquidnet.service.kylin.dto.vo.KylinOrderTicketEntitiesVo
;
import
com.liquidnet.service.kylin.entity.KylinOrderTicketEntities
;
import
com.liquidnet.service.kylin.mapper.KylinOrderTicketEntitiesMapper
;
import
com.liquidnet.service.kylin.service.IKylinOrderTicketEntitiesService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.bulk.BulkWriteResult
;
import
com.mongodb.client.model.UpdateOneModel
;
import
com.mongodb.client.model.WriteModel
;
import
lombok.extern.slf4j.Slf4j
;
import
org.bson.Document
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
...
...
@@ -21,7 +24,7 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
import
java.util.Array
s
;
import
java.util.Array
List
;
import
java.util.LinkedList
;
import
java.util.List
;
...
...
@@ -33,6 +36,7 @@ import java.util.List;
* @author liquidnet
* @since 2021-05-20
*/
@Slf4j
@Service
public
class
KylinOrderTicketEntitiesServiceImpl
extends
ServiceImpl
<
KylinOrderTicketEntitiesMapper
,
KylinOrderTicketEntities
>
implements
IKylinOrderTicketEntitiesService
{
@Autowired
...
...
@@ -44,29 +48,38 @@ public class KylinOrderTicketEntitiesServiceImpl extends ServiceImpl<KylinOrderT
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
Exception
.
class
)
public
void
updateByStation
(
KylinStationCheckOrderParam
checkDataParam
)
{
String
performanceId
=
checkDataParam
.
getPerformanceId
();
KylinOrderTicketEntitiesVo
updateVo
=
new
KylinOrderTicketEntitiesVo
();
updateVo
.
setCheckClient
(
checkDataParam
.
getCheckClient
());
updateVo
.
setUpdatedAt
(
DateUtil
.
getNowTime
());
updateVo
.
setStatus
(
1
);
// 1-已出票
List
<
String
>
checkedEntitiesIdList
=
checkDataParam
.
getCheckedEntitiesIdList
();
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
updateMany
(
Query
.
query
(
Criteria
.
where
(
"performanceId"
).
is
(
performanceId
)
.
and
(
"orderTicketEntitiesId"
).
in
(
checkedEntitiesIdList
.
toArray
())
.
and
(
"status"
).
is
(
0
)
).
getQueryObject
(),
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
updateVo
))
);
public
void
updateByStation
(
List
<
KylinStationCheckOrderParam
>
checkOrderParamList
)
{
// // 根据验票用户ID分组
// Map<String, List<KylinStationCheckOrderParam>> checkOrderByUserIdMap = checkOrderParamList.stream().collect(Collectors.groupingBy(KylinStationCheckOrderParam::getCheckUserId));
//
// for (Map.Entry<String, List<KylinStationCheckOrderParam>> entry : checkOrderByUserIdMap.entrySet()) {
// List<KylinStationCheckOrderParam> checkOrderByUserList = entry.getValue();
//
// // 根据验票类型分组
// Map<String, List<KylinStationCheckOrderParam>> checkOrderByCheckTypeMap = checkOrderByUserList.stream().collect(Collectors.groupingBy(KylinStationCheckOrderParam::getCheckType));
// }
LocalDateTime
nowDt
=
LocalDateTime
.
now
();
String
nowDtStr
=
DateUtil
.
format
(
nowDt
,
DateUtil
.
Formatter
.
yyyyMMddHHmmss
);
LinkedList
<
Object
[]>
paramsList
=
new
LinkedList
<>();
for
(
String
id
:
checkedEntitiesIdList
)
{
paramsList
.
add
(
new
Object
[]{
1
,
nowDt
,
id
});
}
List
<
WriteModel
<
Document
>>
list
=
new
ArrayList
<>();
checkOrderParamList
.
forEach
(
r
->
{
KylinOrderTicketEntitiesVo
updateVo
=
KylinOrderTicketEntitiesVo
.
getNew
();
updateVo
.
setCheckType
(
r
.
getCheckType
());
updateVo
.
setCheckedAt
(
r
.
getCheckedAt
());
updateVo
.
setCheckUserId
(
r
.
getCheckUserId
());
updateVo
.
setUpdatedAt
(
nowDtStr
);
updateVo
.
setStatus
(
1
);
paramsList
.
add
(
new
Object
[]{
1
,
nowDtStr
,
r
.
getCheckedAt
(),
r
.
getCheckType
(),
r
.
getCheckUserId
(),
r
.
getTicketEntitiesId
()});
Document
updateQuery
=
Query
.
query
(
Criteria
.
where
(
"orderTicketEntitiesId"
).
is
(
r
.
getTicketEntitiesId
())).
getQueryObject
();
list
.
add
(
new
UpdateOneModel
<
Document
>(
updateQuery
,
new
Document
(
"$set"
,
Document
.
parse
(
JsonUtils
.
toJson
(
updateVo
)))));
});
BulkWriteResult
bulkWriteResult
=
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
bulkWrite
(
list
);
log
.
info
(
"bulkWriteResult:{}"
,
JsonUtils
.
toJson
(
bulkWriteResult
));
// TODO: 2021/6/1 sql to mq
// rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL, MQConst.ROUTING_KEY_SQL,
// SqlMapping.get("
adam_user.add
", paramsList));
// SqlMapping.get("
kylin_order_ticket_entities.updateStatusByStation
", paramsList));
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/resources/sqlmap/kylin_order_ticket_entities.properties
View file @
ab441242
kylin_order_ticket_entities.add
=
INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,status,sys_damai,check_client,is_payment,comment,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_entities.synPay
=
UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ? WHERE order_tickets_id = ?
kylin_order_ticket_entities.updateStatusByStation
=
UPDATE kylin_order_ticket_status SET `status`=?, updated_at=? WHERE order_ticket_entities_id =?
\ No newline at end of file
kylin_order_ticket_entities.updateStatusByStation
=
UPDATE kylin_order_ticket_status SET `status`=?, updated_at=?, checked_at=?, check_type=?, checkUserId=? WHERE order_ticket_entities_id =?
\ No newline at end of file
liquidnet-bus-support/liquidnet-support-zuul/src/main/java/com/liquidnet/support/zuul/filter/GlobalAuthFilter.java
View file @
ab441242
...
...
@@ -86,11 +86,6 @@ public class GlobalAuthFilter extends ZuulFilter {
if
(
excludeUrls
.
contains
(
requestURI
))
{
return
false
;
}
for
(
String
urlPattern
:
excludeUrlPatterns
)
{
if
(
PathMatchUtil
.
isPathMatch
(
urlPattern
,
requestURI
))
{
return
false
;
}
}
if
(
includeUrls
.
contains
(
requestURI
))
{
return
true
;
}
...
...
@@ -99,6 +94,11 @@ public class GlobalAuthFilter extends ZuulFilter {
return
true
;
}
}
for
(
String
urlPattern
:
excludeUrlPatterns
)
{
if
(
PathMatchUtil
.
isPathMatch
(
urlPattern
,
requestURI
))
{
return
false
;
}
}
return
true
;
}
...
...
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