记得上下班打卡 | 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
1a958d1d
Commit
1a958d1d
authored
Jun 21, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
ce088405
ab1f06c1
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
572 additions
and
318 deletions
+572
-318
remote_search.css
...admin-web/src/main/resources/static/css/remote_search.css
+35
-0
remote-search.js
...t-admin-web/src/main/resources/static/js/remote-search.js
+172
-0
include.html
...lient-admin-web/src/main/resources/templates/include.html
+223
-219
detail.html
...urces/templates/zhengzai/adam/order/orderList/detail.html
+12
-13
order.html
...ources/templates/zhengzai/adam/order/orderList/order.html
+8
-8
add.html
.../templates/zhengzai/kylin/performances/recommend/add.html
+35
-12
MemberOrderDto.java
...n/java/com/liquidnet/service/adam/dto/MemberOrderDto.java
+1
-0
AdamMemberMapper.xml
...es/com/liquidnet/service/adam/mapper/AdamMemberMapper.xml
+0
-31
AdamMemberOrderMapper.xml
...m/liquidnet/service/adam/mapper/AdamMemberOrderMapper.xml
+60
-0
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+26
-35
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/static/css/remote_search.css
0 → 100644
View file @
1a958d1d
.remote_search
{
/*display: none;*/
position
:
absolute
;
left
:
0
;
/*top: 35px;*/
width
:
100%
;
z-index
:
999
;
background
:
#fff
;
max-height
:
200px
;
overflow
:
auto
;
box-shadow
:
0px
0px
8px
#b3c5ff
!important
;
border-radius
:
4px
!important
;
}
.remote_search_top
{
top
:
35px
;
}
.remote_search_bottom
{
bottom
:
35px
;
}
.remote_search
li
{
height
:
32px
;
line-height
:
32px
;
padding
:
0
10px
;
width
:
100%
;
box-sizing
:
border-box
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.remote_search
li
:hover
{
background-color
:
#E6F7FF
;
cursor
:
pointer
;
}
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/static/js/remote-search.js
0 → 100644
View file @
1a958d1d
;(
function
(
$
)
{
//这里放入插件代码
var
RemoteSearch
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
);
this
.
options
=
$
.
extend
(
true
,
{},
$
.
fn
.
remoteSearch
.
defaults
,
options
);
this
.
id
=
$
(
element
).
attr
(
'id'
);
this
.
ulID
=
'#'
+
this
.
id
+
'_ul'
;
this
.
ulFoucus
=
false
;
// Method overrides
this
.
render
=
this
.
options
.
render
||
this
.
render
;
this
.
select
=
this
.
options
.
select
||
this
.
select
;
this
.
ajax
=
$
.
extend
({},
$
.
fn
.
remoteSearch
.
defaults
.
ajax
,
this
.
options
.
ajax
);
this
.
listen
();
}
RemoteSearch
.
prototype
=
{
listen
:
function
()
{
this
.
$element
.
on
(
'blur'
,
$
.
proxy
(
this
.
blur
,
this
))
.
on
(
'keyup'
,
$
.
proxy
(
this
.
keyup
,
this
));
this
.
$element
.
parent
(
'div.remote_wrapper'
).
on
(
'click'
,
this
.
ulID
,
$
.
proxy
(
this
.
click
,
this
));
},
blur
:
function
(
e
)
{
var
that
=
this
;
e
.
stopPropagation
();
e
.
preventDefault
();
setTimeout
(
function
()
{
if
(
!
that
.
ulFoucus
)
{
that
.
$element
.
val
(
that
.
$element
.
attr
(
'data-name'
));
that
.
hide
();
}
},
150
)
},
keyup
:
function
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
switch
(
e
.
keyCode
)
{
case
40
:
// down arrow
case
38
:
// up arrow
break
;
case
9
:
// tab
case
13
:
// enter
break
;
case
27
:
// escape
break
;
default
:
this
.
ajaxer
();
}
},
hide
:
function
()
{
$
(
this
.
ulID
).
remove
();
return
this
;
},
ajaxer
:
function
()
{
var
that
=
this
,
query
=
that
.
$element
.
val
();
// Query changed
that
.
query
=
query
;
// Cancel last timer if set
if
(
that
.
ajax
.
timerId
)
{
clearTimeout
(
that
.
ajax
.
timerId
);
that
.
ajax
.
timerId
=
null
;
}
// Query is good to send, set a timer
that
.
ajax
.
timerId
=
setTimeout
(
function
()
{
var
params
=
{
query
:
query
};
var
jAjax
=
(
that
.
ajax
.
method
===
"post"
)
?
$
.
post
:
$
.
get
;
jAjax
(
that
.
ajax
.
url
,
params
,
function
(
data
){
console
.
log
(
data
);
return
that
.
render
(
data
.
value
);
});
that
.
ajax
.
timerId
=
null
;
},
that
.
ajax
.
timeout
);
return
that
;
},
render
:
function
(
data
)
{
console
.
log
(
data
);
this
.
ulFoucus
=
false
;
var
liList
=
data
||
[];
var
num
=
this
.
_getNum
();
//添加 ul
if
(
$
(
this
.
ulID
).
length
==
0
)
{
this
.
$element
.
after
(
"<ul id='"
+
this
.
id
+
"_ul' class='remote_search remote_search_top'></ul>"
);
};
//添加li
var
str
=
""
;
if
(
num
)
{
if
(
liList
.
length
)
{
for
(
var
i
=
0
;
i
<
liList
.
length
;
i
++
)
{
str
+=
"<li data-id='"
+
liList
[
i
].
performancesId
+
"' data-name='"
+
liList
[
i
].
title
+
"' title='"
+
liList
[
i
].
title
+
"' value='"
+
liList
[
i
].
performancesId
+
"'>"
+
liList
[
i
].
title
+
"</li>"
;
}
}
else
{
str
=
"<li data-id='' data-name=''>搜索无数据</li>"
}
}
else
{
this
.
$element
.
attr
(
'data-name'
,
""
);
this
.
$element
.
attr
(
'data-id'
,
""
);
}
$
(
this
.
ulID
).
html
(
str
);
var
bodyHeight
=
$
(
document
.
body
).
height
();
var
offsetTop
=
this
.
$element
.
offset
().
top
;
var
height
=
$
(
this
.
ulID
).
outerHeight
(
true
);
if
(
offsetTop
+
height
>
bodyHeight
){
$
(
this
.
ulID
).
addClass
(
'remote_search_bottom'
).
removeClass
(
'remote_search_top'
);
}
else
{
$
(
this
.
ulID
).
addClass
(
'remote_search_top'
).
removeClass
(
'remote_search_bottom'
);
}
return
this
;
},
click
:
function
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
var
dataName
=
$
(
e
.
target
).
attr
(
'data-name'
);
var
dataID
=
$
(
e
.
target
).
attr
(
'data-id'
);
this
.
$element
.
val
(
dataName
);
this
.
$element
.
attr
(
'data-name'
,
dataName
);
this
.
$element
.
attr
(
'data-id'
,
dataID
);
this
.
options
.
chose
(
dataName
,
dataID
);
this
.
ulFoucus
=
true
;
return
this
.
hide
();
},
_getNum
:
function
(){
return
this
.
$element
.
val
().
length
;
}
}
$
.
fn
.
remoteSearch
=
function
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
),
data
=
$this
.
data
(
'remoteSearch'
),
options
=
typeof
option
===
'object'
&&
option
;
if
(
!
data
)
{
$this
.
data
(
'remoteSearch'
,
(
data
=
new
RemoteSearch
(
this
,
options
)));
}
if
(
typeof
option
===
'string'
)
{
data
[
option
]();
}
});
}
$
.
fn
.
remoteSearch
.
defaults
=
{
hiddenVal
:
''
,
chose
:
function
()
{
},
ajax
:
{
url
:
null
,
timeout
:
300
,
method
:
'get'
,
timerId
:
null
},
success
:
function
(
res
){
console
.
log
(
'==parent==success=='
);
console
.
log
(
res
);
}
}
$
.
fn
.
remoteSearch
.
Constructor
=
RemoteSearch
;
})(
jQuery
);
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/include.html
View file @
1a958d1d
This diff is collapsed.
Click to expand it.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/adam/order/orderList/detail.html
View file @
1a958d1d
...
...
@@ -9,64 +9,63 @@
<form
class=
"form-horizontal m"
id=
"form-order-edit"
th:object=
"${orderDetailsVo}"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
订单状态:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"state"
th:field=
"*{adamMemberOrderVo.state}"
class=
"form-control"
type=
"text"
>
<div
class=
"col-sm-8"
th:text=
"*{@dict.getLabel('zhengzai_member_order_status',adamMemberOrderVo.state)}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
价格:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"pricePaid"
th:field=
"*{adamMemberOrderVo.price
Paid}"
class=
"form-control"
type=
"text"
>
<input
name=
"pricePaid"
th:field=
"*{adamMemberOrderVo.price
}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
可用时间(天):
</label>
<div
class=
"col-sm-8"
>
<input
name=
"days"
th:field=
"*{adamMemberOrderVo.days}"
class=
"form-control"
type=
"text"
>
<input
name=
"days"
th:field=
"*{adamMemberOrderVo.days}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
订单号:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"orderNo"
th:field=
"*{adamMemberOrderVo.orderNo}"
class=
"form-control"
type=
"text"
>
<input
name=
"orderNo"
th:field=
"*{adamMemberOrderVo.orderNo}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
生成时间:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"createdAt"
th:field=
"*{adamMemberOrderVo.createdAt}"
class=
"form-control"
type=
"text"
>
<input
name=
"createdAt"
th:field=
"*{adamMemberOrderVo.createdAt}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
购买人手机号:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"memberName"
th:field=
"*{adam
MemberOrderVo.memberName}"
class=
"form-control"
type=
"text"
>
<input
name=
"memberName"
th:field=
"*{adam
User.mobile}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
版本:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"version"
th:field=
"*{adamMemberOrderVo.version}"
class=
"form-control"
type=
"text"
>
<input
name=
"version"
th:field=
"*{adamMemberOrderVo.version}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
客户端:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"source"
th:field=
"*{adamMemberOrderVo.source}"
class=
"form-control"
type=
"text"
>
<input
name=
"source"
th:field=
"*{adamMemberOrderVo.source}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<!-- <!– 会员卡信息–>-->
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
会员卡ID:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"memberNo"
th:field=
"*{adamMemberOrderVo.memberId}"
class=
"form-control"
type=
"text"
>
<input
name=
"memberNo"
th:field=
"*{adamMemberOrderVo.memberId}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
会员卡名称:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"state"
th:field=
"*{adamMemberOrderVo.memberName}"
class=
"form-control"
type=
"text"
>
<input
name=
"state"
th:field=
"*{adamMemberOrderVo.memberName}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
<!-- <div class="form-group">-->
...
...
@@ -85,8 +84,8 @@
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
用户生日:
</label>
<div
class=
"col-sm-8"
>
<div
class=
"input-group
date
"
>
<input
name=
"birthday"
th:value=
"*{adamMemberOrderVo.birthday}"
class=
"form-control"
placeholder=
"yyyy-MM-dd"
type=
"text"
>
<div
class=
"input-group"
>
<input
th:value=
"*{adamMemberOrderVo.birthday}"
class=
"form-control"
type=
"text"
readonly
>
</div>
</div>
</div>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/adam/order/orderList/order.html
View file @
1a958d1d
...
...
@@ -20,36 +20,36 @@
</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>
</li>
<li>
<label>
订单状态:
</label>
<select
name=
"
orderStatus
"
th:with=
"type=${@dict.getType('zhengzai_member_order_status')}"
>
<select
name=
"
state
"
th:with=
"type=${@dict.getType('zhengzai_member_order_status')}"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
></option>
</select>
</li>
<li>
<label>
购买方式:
</label>
<select
name=
"
buyM
ode"
th:with=
"type=${@dict.getType('zhengzai_buy_mode')}"
>
<select
name=
"
m
ode"
th:with=
"type=${@dict.getType('zhengzai_buy_mode')}"
>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
></option>
</select>
</li>
<li>
<label>
客户端:
</label>
<select
name=
"
orderS
ource"
th:with=
"type=${@dict.getType('zhengzai_order_source')}"
>
<select
name=
"
s
ource"
th:with=
"type=${@dict.getType('zhengzai_order_source')}"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
></option>
</select>
</li>
<li
class=
"select-time"
>
<label>
支付时间:
</label>
<input
type=
"text"
class=
"time-input"
id=
"time
PayStart"
placeholder=
"开始日期"
name=
"params[beginTime]
"
/>
<input
type=
"text"
class=
"time-input"
id=
"time
Start"
placeholder=
"开始日期"
name=
"paymentAtStart
"
/>
<span>
-
</span>
<input
type=
"text"
class=
"time-input"
id=
"time
PayEnd"
placeholder=
"结束日期"
name=
"params[endTime]
"
/>
<input
type=
"text"
class=
"time-input"
id=
"time
End"
placeholder=
"结束日期"
name=
"paymentAtEnd
"
/>
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
...
...
@@ -132,13 +132,13 @@
title
:
'用户ID'
},
{
field
:
'm
emberPriceId
'
,
field
:
'm
obile
'
,
title
:
'手机号'
},
{
field
:
'source'
,
title
:
'客户端'
}
}
,
// {
// field: 'state',
// title: '快递状态'
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performances/recommend/add.html
View file @
1a958d1d
...
...
@@ -7,6 +7,7 @@
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-roadShow-add"
>
<p>
演出名称:
</p>
<!--
<div class="row">
<input name="ids" type="hidden">
<div class="input-group">
...
...
@@ -20,6 +21,11 @@
</div>
</div>
</div>
-->
<div
class=
"remote_wrapper"
style=
"position: relative;"
>
<input
name=
"ids"
type=
"hidden"
>
<input
type=
"text"
id=
"remoteSearch11"
>
</div>
</br>
<p>
推荐排序:
</p>
<div
class=
"row"
>
...
...
@@ -33,6 +39,7 @@
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-suggest-js"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"kylin/performances/recommend"
;
$
(
"#form-roadShow-add"
).
validate
({
...
...
@@ -45,18 +52,34 @@
}
}
function
getPerformanceTitle
()
{
var
testBsSuggest
=
$
(
"#suggest-demo-2"
).
bsSuggest
({
url
:
prefix
+
"/performance/status?status=(3,6,7,9,10)&title="
+
document
.
getElementById
(
"suggest-demo-2"
).
value
,
showBtn
:
false
,
idField
:
"performancesId"
,
keyField
:
"title"
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
}).
on
(
'onSetSelectValue'
,
function
(
e
,
keyword
)
{
document
.
getElementsByName
(
"ids"
)[
0
].
value
=
keyword
.
id
;
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
});
}
// function getPerformanceTitle() {
// var testBsSuggest = $("#suggest-demo-2").bsSuggest({
// url: prefix + "/performance/status?status=(3,6,7,9,10)&title=" + document.getElementById("suggest-demo-2").value,
// showBtn: false,
// idField: "performancesId",
// keyField: "title"
// }).on('onDataRequestSuccess', function (e, result) {
// }).on('onSetSelectValue', function (e, keyword) {
// document.getElementsByName("ids")[0].value = keyword.id;
// }).on('onUnsetSelectValue', function (e) {
// });
// }
$
(
'#remoteSearch11'
).
remoteSearch
({
ajax
:{
url
:
prefix
+
"/performance/status?status=(3,6,7,9,10)&title="
+
document
.
getElementById
(
"remoteSearch11"
).
value
,
type
:
"get"
},
chose
:
function
(
text
,
val
){
document
.
getElementsByName
(
"ids"
)[
0
].
value
=
val
;
console
.
log
(
'remoteSearch===========chose='
);
console
.
log
(
text
)
console
.
log
(
val
)
},
success
:
function
(){
console
.
log
(
'==success===='
);
}
})
</script>
</body>
</html>
liquidnet-bus-do/liquidnet-service-adam-do/src/main/java/com/liquidnet/service/adam/dto/MemberOrderDto.java
View file @
1a958d1d
...
...
@@ -25,4 +25,5 @@ public class MemberOrderDto {
private
String
createdAt
;
private
String
mobile
;
private
String
source
;
private
String
mode
;
}
liquidnet-bus-do/liquidnet-service-adam-do/src/main/resources/com/liquidnet/service/adam/mapper/AdamMemberMapper.xml
View file @
1a958d1d
...
...
@@ -22,18 +22,6 @@
<result
column=
"created_at"
property=
"createdAt"
/>
<result
column=
"updated_at"
property=
"updatedAt"
/>
</resultMap>
<resultMap
id=
"orderListResult"
type=
"com.liquidnet.service.adam.dto.MemberOrderDto"
>
<result
column=
"member_id"
property=
"uid"
/>
<result
column=
"name"
property=
"orderNo"
/>
<result
column=
"title"
property=
"state"
/>
<result
column=
"sub_title"
property=
"payType"
/>
<result
column=
"start_no"
property=
"price"
/>
<result
column=
"icon"
property=
"pricePaid"
/>
<result
column=
"avatar"
property=
"paymentAt"
/>
<result
column=
"type"
property=
"createdAt"
/>
<result
column=
"interests_detail"
property=
"mobile"
/>
<result
column=
"notes"
property=
"source"
/>
</resultMap>
<!-- sql -->
<select
id=
"getFirstMember"
resultMap=
"MemberResult"
>
SELECT
...
...
@@ -59,23 +47,4 @@
FROM adam_member
limit 0,1
</select>
<select
id=
"getMemberOrderList"
resultMap=
"orderListResult"
>
select amo.uid,
amo.order_no,
amo.state,
amo.pay_type,
amo.price,
amo.price_paid,
amo.payment_at,
amo.created_at,
au.mobile,
amo.source
from adam_member_order amo
inner join adam_user_member aum
on amo.uid = aum.uid
inner join adam_user au on aum.uid = au.uid
<where>
<if
test=
"userId != null and userId != ''"
>
and kot.user_id = #{userId}
</if>
</where>
</select>
</mapper>
liquidnet-bus-do/liquidnet-service-adam-do/src/main/resources/com/liquidnet/service/adam/mapper/AdamMemberOrderMapper.xml
0 → 100644
View file @
1a958d1d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.adam.mapper.AdamMemberOrderMapper"
>
<resultMap
id=
"orderListResult"
type=
"com.liquidnet.service.adam.dto.MemberOrderDto"
>
<result
column=
"uid"
property=
"uid"
/>
<result
column=
"order_no"
property=
"orderNo"
/>
<result
column=
"state"
property=
"state"
/>
<result
column=
"pay_type"
property=
"payType"
/>
<result
column=
"price"
property=
"price"
/>
<result
column=
"price_paid"
property=
"pricePaid"
/>
<result
column=
"payment_at"
property=
"paymentAt"
/>
<result
column=
"created_at"
property=
"createdAt"
/>
<result
column=
"mobile"
property=
"mobile"
/>
<result
column=
"source"
property=
"source"
/>
<result
column=
"mode"
property=
"mode"
/>
</resultMap>
<select
id=
"getMemberOrderList"
resultMap=
"orderListResult"
>
select amo.uid,
amo.order_no,
amo.state,
amo.pay_type,
amo.price,
amo.price_paid,
amo.payment_at,
amo.created_at,
au.mobile,
amo.source,
amo.mode
from adam_member_order amo
inner join adam_user_member aum
on amo.uid = aum.uid
inner join adam_user au on aum.uid = au.uid
<where>
<if
test=
"orderNo != null and orderNo != ''"
>
and amo.order_no = #{orderNo}
</if>
<if
test=
"mobile != null and mobile != ''"
>
and au.mobile = #{mobile}
</if>
<if
test=
"payType != null and payType != ''"
>
and amo.pay_type = #{payType}
</if>
<if
test=
"state != null and state != ''"
>
and amo.state = #{state}
</if>
<if
test=
"mode != null and mode != ''"
>
and amo.mode = #{mode}
</if>
<if
test=
"source != null and source != ''"
>
and amo.source = #{source}
</if>
<if
test=
"paymentAtStart != null and paymentAtStart != ''"
>
and amo.payment_at
>
#{paymentAtStart}
</if>
<if
test=
"paymentAtEnd != null and paymentAtEnd != ''"
>
and amo.payment_at
<
#{paymentAtEnd}
</if>
</where>
</select>
</mapper>
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
1a958d1d
...
...
@@ -1016,7 +1016,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override
public
boolean
checkOrderTime
(
String
userId
)
{
String
lock
=
"order_lock:checkOrderTime:"
+
userId
;
String
lock
=
"order
s
_lock:checkOrderTime:"
+
userId
;
if
(
redisLockUtil
.
tryLock
(
lock
,
1
,
3600
))
{
try
{
List
<
OrderScriptDto
>
dtoData
=
orderTicketsMapper
.
orderScriptDto
(
userId
);
...
...
@@ -1032,9 +1032,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
// KylinOrderTicketVo vo = dataUtils.getOrderTicketVo(item.getOrderTicketsId());
// if (vo.getStatus() != 0) {
// continue;
// }
//mysql
// }//mysql
// KylinOrderTickets orderTickets = new KylinOrderTickets();
// orderTickets.setOrderTicketsId(item.getOrderTicketsId());
// orderTickets.setUpdatedAt(now);
...
...
@@ -1043,7 +1041,6 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
// orderTicketStatus.setOrderId(item.getOrderTicketsId());
// orderTicketStatus.setStatus(KylinTableStatusConst.ORDER_STATUS2);
// orderTicketStatus.setUpdatedAt(now);
//vo
mapMongo
.
put
(
"status"
,
KylinTableStatusConst
.
ORDER_STATUS2
);
mapMongo
.
put
(
"updatedAt"
,
DateUtil
.
Formatter
.
yyyyMMddHHmmssSSS
.
format
(
now
));
...
...
@@ -1053,16 +1050,12 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
// Query.query(Criteria.where("orderTicketsId").is(orderTickets.getOrderTicketsId())).getQueryObject(),
// new BasicDBObject("$set", mongoConverter.convertToMongoType(map))
// );
// vo.setChangeDate(now);
// vo.setStatus(KylinTableStatusConst.ORDER_STATUS2);
// vo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssSSS.format(now));
// redisUtil.set(KylinRedisConst.ORDER + orderTickets.getOrderTicketsId(), vo);
mapSurplusGeneral
.
put
(
item
.
getTicketId
(),
mapSurplusGeneral
.
get
(
item
.
getTicketId
())
==
null
?
item
.
getNumber
()
:
mapSurplusGeneral
.
get
(
item
.
getTicketId
())
+
item
.
getNumber
());
// mongoVoUtils.resetOrderListVo(item.getUserId(), 2, item.getOrderTicketsId(), vo);
// List<KylinOrderTicketEntitiesVo> entities = vo.getEntitiesVoList();
// for (int i = 0; i < entities.size(); i++) {
// KylinOrderTicketEntitiesVo items = entities.get(i);
...
...
@@ -1085,48 +1078,46 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"redis 库存 -> time:"
+
(
currentTime
)
+
"毫秒"
);
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
//mysql
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
String
orderStr
=
""
;
for
(
int
i
=
0
;
i
<
orderIdList
.
size
();
i
++)
{
String
orderTicketId
=
orderIdList
.
get
(
i
).
split
(
","
)[
0
];
orderStr
=
order
TicketId
+
"
,"
;
orderStr
=
order
Str
+
"'"
+
orderTicketId
+
"'
,"
;
}
orderStr
=
orderStr
.
substring
(
0
,
orderStr
.
length
()
-
1
);
sqls
.
add
(
"UPDATE kylin_order_tickets SET updated_at =
"
+
now
+
" WHERE
order_tickets_id in ("
+
orderStr
+
") "
);
sqls
.
add
(
"UPDATE kylin_order_ticket_status SET `status` = 2,updated_at =
"
+
now
+
"
WHERE order_id in ("
+
orderStr
+
") "
);
sqls
.
add
(
"UPDATE kylin_order_ticket_relations SET updated_at =
"
+
now
+
" WHERE
order_id in ("
+
orderStr
+
")"
);
sqls
.
add
(
"UPDATE kylin_order_tickets SET updated_at =
'"
+
now
+
"' WHERE
order_tickets_id in ("
+
orderStr
+
") "
);
sqls
.
add
(
"UPDATE kylin_order_ticket_status SET `status` = 2,updated_at =
'"
+
now
+
"'
WHERE order_id in ("
+
orderStr
+
") "
);
sqls
.
add
(
"UPDATE kylin_order_ticket_relations SET updated_at =
'"
+
now
+
"' WHERE
order_id in ("
+
orderStr
+
")"
);
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_CLOSE
,
MQConst
.
ROUTING_KEY_SQL_ORDER_CLOSE
,
SqlMapping
.
gets
(
sqls
));
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"mysql -> time:"
+
(
currentTime
)
+
"毫秒"
);
//mongo
mongoTemplate
.
getCollection
(
KylinOrderTicketVo
.
class
.
getSimpleName
()).
update
One
(
mongoTemplate
.
getCollection
(
KylinOrderTicketVo
.
class
.
getSimpleName
()).
update
Many
(
Query
.
query
(
Criteria
.
where
(
"orderTicketsId"
).
in
(
orderIdList
)).
getQueryObject
(),
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
mapMongo
))
);
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"mongo -> time:"
+
(
currentTime
)
+
"毫秒"
);
redisLockUtil
.
unlock
(
lock
);
Thread
thread
=
new
Thread
(
new
Runnable
(){
public
void
run
(){
//redis 列表
orderIdList
.
forEach
(
t
->
{
String
orderTicketId
=
t
.
split
(
","
)[
0
];
String
uid
=
t
.
split
(
","
)[
1
];
KylinOrderTicketVo
vo
=
dataUtils
.
getOrderTicketVo
(
orderTicketId
);
redisUtil
.
set
(
KylinRedisConst
.
ORDER
+
orderTicketId
,
vo
);
mongoVoUtils
.
resetOrderListVo
(
uid
,
2
,
orderTicketId
,
vo
);
// redis 限购
for
(
int
i
=
0
;
i
<
vo
.
getEntitiesVoList
().
size
();
i
++)
{
KylinOrderTicketEntitiesVo
items
=
vo
.
getEntitiesVoList
().
get
(
i
);
dataUtils
.
changeBuyInfo
(
items
.
getUserId
(),
items
.
getEnterIdCode
(),
items
.
getPerformanceId
(),
items
.
getTicketId
(),
-
1
);
}
});
}});
// redisLockUtil.unlock(lock);
Thread
thread
=
new
Thread
(()
->
{
//redis 列表
orderIdList
.
forEach
(
t
->
{
String
orderTicketId
=
t
.
split
(
","
)[
0
];
String
uid
=
t
.
split
(
","
)[
1
];
KylinOrderTicketVo
vo
=
dataUtils
.
getOrderTicketVo
(
orderTicketId
);
redisUtil
.
set
(
KylinRedisConst
.
ORDER
+
orderTicketId
,
vo
);
mongoVoUtils
.
resetOrderListVo
(
uid
,
2
,
orderTicketId
,
vo
);
// redis 限购
for
(
int
i
=
0
;
i
<
vo
.
getEntitiesVoList
().
size
();
i
++)
{
KylinOrderTicketEntitiesVo
items
=
vo
.
getEntitiesVoList
().
get
(
i
);
dataUtils
.
changeBuyInfo
(
items
.
getUserId
(),
items
.
getEnterIdCode
(),
items
.
getPerformanceId
(),
items
.
getTicketId
(),
-
1
);
}
});
});
thread
.
start
();
}
...
...
@@ -1134,7 +1125,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
redisLockUtil
.
unlock
(
lock
);
//
redisLockUtil.unlock(lock);
}
}
else
{
log
.
debug
(
"WARNING LOCKING"
);
...
...
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