记得上下班打卡 | 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
7f4b1097
Commit
7f4b1097
authored
Jun 19, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
32ab5294
7e95f3ea
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
121 additions
and
119 deletions
+121
-119
OrderListReq.java
...liquidnet/service/kylin/dto/param/admin/OrderListReq.java
+1
-0
orderList.html
...s/templates/zhengzai/kylin/order/orderList/orderList.html
+6
-20
bootstrap-test.yml
...iquidnet-client-job/src/main/resources/bootstrap-test.yml
+1
-1
liquidnet-service-consumer-test.yml
...nfig/liquidnet-config/liquidnet-service-consumer-test.yml
+2
-2
liquidnet-service-kylin.yml
...t-bus-config/liquidnet-config/liquidnet-service-kylin.yml
+1
-1
PerformanceRecommendAdminDao.java
...idnet/service/kylin/dao/PerformanceRecommendAdminDao.java
+4
-1
KylinOrderTicketsMapper.xml
...iquidnet.service.kylin.mapper/KylinOrderTicketsMapper.xml
+8
-6
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+98
-88
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/admin/OrderListReq.java
View file @
7f4b1097
...
...
@@ -20,6 +20,7 @@ public class OrderListReq {
private
String
timePayEnd
;
private
String
sponsorId
;
private
String
sponsor
;
private
String
payType
;
private
String
paymentType
;
private
String
orderStatus
;
private
String
orderSource
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/order/orderList/orderList.html
View file @
7f4b1097
...
...
@@ -42,24 +42,10 @@
</div>
</div>
</div>
<!-- <div class="input-group">-->
<!-- <input type="text" class="form-control" id="sponsorSelectDiv">-->
<!-- <div class="input-group-btn">-->
<!-- <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">-->
<!-- <span class="caret"></span>-->
<!-- </button>-->
<!-- <ul class="dropdown-menu dropdown-menu-right" role="menu">-->
<!-- </ul>-->
<!-- </div>-->
<!-- </div>-->
<!-- <select name="sponsorId">-->
<!-- <option value="">所有</option>-->
<!-- <option value="-1">代码生成请选择字典属性</option>-->
<!-- </select>-->
</li>
<li>
<label>
支付方式:
</label>
<select
name=
"pay
ment
Type"
th:with=
"type=${@dict.getType('zhengzai_pay_type')}"
>
<select
name=
"payType"
th:with=
"type=${@dict.getType('zhengzai_pay_type')}"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
></option>
</select>
...
...
@@ -171,11 +157,11 @@
}
},
{
field
:
'pay
ment
Type'
,
title
:
'支付方式'
//
formatter: function(value, row, index) {
//
return $.table.selectDictLabel(payTypeDic, value);
//
}
field
:
'payType'
,
title
:
'支付方式'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
table
.
selectDictLabel
(
payTypeDic
,
value
);
}
},
{
field
:
'tied'
,
...
...
liquidnet-bus-client/liquidnet-client-job/src/main/resources/bootstrap-test.yml
View file @
7f4b1097
...
...
@@ -6,7 +6,7 @@ liquidnet:
username
:
user
password
:
user123
eureka
:
host
:
172.1
8.0.2
:7001
host
:
172.1
7.207.177
:7001
# end-dev-这里是配置信息基本值
spring
:
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-consumer-test.yml
View file @
7f4b1097
...
...
@@ -15,7 +15,7 @@ liquidnet:
pattern-file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level-root
:
info
level-root
:
debug
rabbitmq
:
connection-timeout
:
3000
mysql
:
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin.yml
View file @
7f4b1097
...
...
@@ -145,7 +145,7 @@ global-auth:
-
${liquidnet.info.context}/v2/api-docs*
-
${liquidnet.info.context}/station/login
-
${liquidnet.info.context}/station/login/sms
# -
# -
-
${liquidnet.info.context}/partner/buyNotice/**
-
${liquidnet.info.context}/partner/checkUser/**
-
${liquidnet.info.context}/partner/checkUser/performance/**
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/dao/PerformanceRecommendAdminDao.java
View file @
7f4b1097
...
...
@@ -31,9 +31,12 @@ public class PerformanceRecommendAdminDao {
this
.
statusName
=
"已下架"
;
break
;
case
8
:
this
.
statusName
=
"
演出结束
"
;
this
.
statusName
=
"
售罄
"
;
break
;
case
9
:
this
.
statusName
=
"演出结束"
;
break
;
case
10
:
this
.
statusName
=
"演出未开始"
;
break
;
default
:
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinOrderTicketsMapper.xml
View file @
7f4b1097
...
...
@@ -125,17 +125,13 @@
inner join kylin_order_ticket_relations kotr on kot.order_tickets_id = kotr.order_id
inner join kylin_performances kp on kotr.performance_id = kp.performances_id
<where>
<if
test=
"orderTicketsId != null and orderTicketsId != ''"
>
and kot.order_tickets_id = #{orderTicketsId}
</if>
<if
test=
"userId != null and userId != ''"
>
and kot.user_id = #{userId}
</if>
<if
test=
"userName != null and userName != ''"
>
and kot.user_name like concat('%', #{userName}, '%')
</if>
<if
test=
"userMobile != null and userMobile != ''"
>
and kot.user_mobile = #{userMobile}
</if>
<if
test=
"performanceTitle != null and performanceTitle != ''"
>
and kot.performance_title =
#{performanceTitle}
<if
test=
"performanceTitle != null and performanceTitle != ''"
>
and kot.performance_title like concat('%', #{performanceTitle}, '%')
</if>
<if
test=
"orderCode != null and orderCode != ''"
>
and kot.order_code = #{orderCode}
</if>
<if
test=
"payCode != null and payCode != ''"
>
and kot.pay_code = #{payCode}
</if>
<if
test=
"qrCode != null and qrCode != ''"
>
and kot.qr_code = #{qrCode}
</if>
<if
test=
"orderType != null and orderType != ''"
>
and kot.order_type = #{orderType}
</if>
<if
test=
"orderVersion != null and orderVersion != ''"
>
and kot.order_version = #{orderVersion}
</if>
<if
test=
"number != null "
>
and kot.number = #{number}
</if>
...
...
@@ -168,6 +164,12 @@
<if
test=
"sponsor!=null and sponsor!=''"
>
AND kp.sponsor = #{sponsor}
</if>
<if
test=
"orderStatus!=null and orderStatus!=''"
>
AND kots.status = #{orderStatus}
</if>
<if
test=
"sponsor!=null and sponsor!=''"
>
AND kp.sponsor = #{sponsor}
</if>
</where>
<!-- <if test="orderItem!=''">-->
<!-- ORDER BY ${orderItem} ${orderSc}-->
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
7f4b1097
...
...
@@ -108,7 +108,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Autowired
private
KylinOrderTicketEntitiesMapper
entitiesMapper
;
ArrayList
<
Integer
>
canBuyStatus
=
new
ArrayList
(){{
ArrayList
<
Integer
>
canBuyStatus
=
new
ArrayList
()
{{
add
(
6
);
add
(
8
);
add
(
9
);
...
...
@@ -200,11 +200,11 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
int
performanceMemberLimit
=
performanceData
.
getLimitCountMember
();
//会员演出限购
int
isTrueName
=
ticketData
.
getIsTrueName
();
//是否演出实名
if
(!
canBuyStatus
.
contains
(
performanceData
.
getAppStatus
()))
{
if
(!
canBuyStatus
.
contains
(
performanceData
.
getAppStatus
()))
{
return
ResponseDto
.
failure
(
"当前不可购买"
);
//没有会员权限
}
if
(!
canBuyStatus
.
contains
(
performanceData
.
getAppStatus
()))
{
if
(!
canBuyStatus
.
contains
(
performanceData
.
getAppStatus
()))
{
return
ResponseDto
.
failure
(
"当前不可购买"
);
//没有会员权限
}
...
...
@@ -624,7 +624,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
log
.
debug
(
"mongo 添加 订单 -> time:"
+
(
currentTime
)
+
"毫秒"
);
currentTime
=
System
.
currentTimeMillis
();
mongoVoUtils
.
resetOrderListVo
(
uid
,
1
,
orderTicketVo
.
getOrderTicketsId
(),
orderTicketVo
);
mongoVoUtils
.
resetOrderListVo
(
uid
,
1
,
orderTicketVo
.
getOrderTicketsId
(),
orderTicketVo
);
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"redis 修改订单列表 -> time:"
+
(
currentTime
)
+
"毫秒"
);
...
...
@@ -846,7 +846,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
//生成vo redis
dataUtils
.
delOrderTicketRedis
(
orderTickets
.
getOrderTicketsId
());
mongoVoUtils
.
resetOrderListVo
(
orderTicketData
.
getUserId
(),
2
,
orderTicketData
.
getOrderTicketsId
(),
null
);
mongoVoUtils
.
resetOrderListVo
(
orderTicketData
.
getUserId
(),
2
,
orderTicketData
.
getOrderTicketsId
(),
null
);
// 发短信
KylinPerformanceVo
performanceData
=
dataUtils
.
getPerformanceVo
(
orderTicketData
.
getPerformanceId
());
...
...
@@ -1015,22 +1015,25 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override
public
boolean
checkOrderTime
(
String
userId
)
{
String
lock
=
"order_lock:checkOrderTime:"
+
userId
;
if
(
redisLockUtil
.
tryLock
(
lock
,
1
,
3600
))
{
try
{
List
<
OrderScriptDto
>
dtoData
=
orderTicketsMapper
.
orderScriptDto
(
userId
);
HashMap
<
String
,
Integer
>
map2
=
new
HashMap
<>();
Integer
count
=
0
;
Integer
mqCount
=
0
;
Integer
Acount
=
0
;
Integer
Ecount
=
0
;
for
(
OrderScriptDto
item
:
dtoData
)
{
count
+=
1
;
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
String
lock
=
"order_lock:"
+
item
.
getOrderCode
();
// if (!redisLockUtil.tryLock(lock, 30, 240)) {
// continue;
// }
if
(
item
.
getStatus
()
==
KylinTableStatusConst
.
ORDER_STATUS0
)
{
if
(
item
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
LocalDateTime
now
=
LocalDateTime
.
now
();
try
{
KylinOrderTicketVo
vo
=
dataUtils
.
getOrderTicketVo
(
item
.
getOrderTicketsId
());
//
if (vo.getStatus() != 0) {
//
continue;
//
}
if
(
vo
.
getStatus
()
!=
0
)
{
continue
;
}
//mysql
KylinOrderTickets
orderTickets
=
new
KylinOrderTickets
();
...
...
@@ -1057,14 +1060,13 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
vo
.
setChangeDate
(
now
);
vo
.
setStatus
(
KylinTableStatusConst
.
ORDER_STATUS2
);
vo
.
setUpdatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmssSSS
.
format
(
now
));
redisUtil
.
set
(
KylinRedisConst
.
ORDER
+
vo
.
getOrderTicketsId
(),
vo
);
redisUtil
.
set
(
KylinRedisConst
.
ORDER
+
vo
.
getOrderTicketsId
(),
vo
);
map2
.
put
(
vo
.
getTicketId
(),
map2
.
get
(
vo
.
getTicketId
())
==
null
?
vo
.
getNumber
()
:
map2
.
get
(
vo
.
getTicketId
())
+
vo
.
getNumber
());
mongoVoUtils
.
resetOrderListVo
(
item
.
getUserId
(),
2
,
item
.
getOrderTicketsId
(),
vo
);
mongoVoUtils
.
resetOrderListVo
(
item
.
getUserId
(),
2
,
item
.
getOrderTicketsId
(),
vo
);
Acount
+=
1
;
// List<KylinOrderTicketEntities> entities = entitiesMapper.selectList(new UpdateWrapper<KylinOrderTicketEntities>().eq("order_id", item.getOrderTicketsId()));
List
<
KylinOrderTicketEntitiesVo
>
entities
=
vo
.
getEntitiesVoList
();
// entitiesMapper.selectList(new UpdateWrapper<KylinOrderTicketEntities>().eq("order_id", item.getOrderTicketsId()));
for
(
int
i
=
0
;
i
<
entities
.
size
();
i
++)
{
KylinOrderTicketEntitiesVo
items
=
entities
.
get
(
i
);
dataUtils
.
changeBuyInfo
(
items
.
getUserId
(),
items
.
getEnterIdCode
(),
items
.
getPerformanceId
(),
items
.
getTicketId
(),
-
1
);
...
...
@@ -1083,23 +1085,31 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
sqlsDataC
.
add
(
new
Object
[]{
orderTickets
.
getUpdatedAt
(),
orderTickets
.
getOrderTicketsId
(),
strTime
,
strTime
});
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_CLOSE
,
MQConst
.
ROUTING_KEY_SQL_ORDER_CLOSE
,
SqlMapping
.
gets
(
sqls
,
sqlsDataA
,
sqlsDataB
,
sqlsDataC
));
mqCount
+=
1
;
}
catch
(
Exception
e
)
{
//redisLockUtil.unlock(lock);
log
.
debug
(
"CHECK TIME SYNC = "
+
e
.
getMessage
());
log
.
debug
(
"CHECK TIME SYNC = "
+
e
.
getMessage
());
e
.
printStackTrace
();
return
false
;
}
}
else
{
//redisLockUtil.unlock(lock)
;
}
else
{
Ecount
+=
1
;
}
}
log
.
debug
(
"COUNT 1 = "
+
count
);
log
.
debug
(
"COUNT 2 = "
+
mqCount
);
log
.
debug
(
"COUNT 3 = "
+
Acount
);
log
.
debug
(
"COUNT 4 = "
+
Ecount
);
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map2
.
entrySet
())
{
dataUtils
.
changeSurplusGeneral
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
redisLockUtil
.
unlock
(
lock
);
}
}
else
{
log
.
debug
(
"WARNING LOCKING"
);
}
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