记得上下班打卡 | 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
7365d574
Commit
7365d574
authored
Jul 02, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
d437b584
08c5ba76
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
269 additions
and
615 deletions
+269
-615
KylinRedisConst.java
...com/liquidnet/service/kylin/constant/KylinRedisConst.java
+2
-1
KylinOrderListVo.java
...uidnet/service/kylin/dto/vo/returns/KylinOrderListVo.java
+1
-3
OrderDetailsVo.java
...iquidnet/service/kylin/dto/vo/returns/OrderDetailsVo.java
+1
-3
db_liquidnet_admin_data.sql
...quidnet-client-admin-web/docu/db_liquidnet_admin_data.sql
+5
-5
PerformancesExpressController.java
...troller/zhengzai/kylin/PerformancesExpressController.java
+40
-10
performanceOrderList.html
...ngzai/kylin/performancesExpress/performanceOrderList.html
+1
-1
performancesList.html
.../zhengzai/kylin/performancesExpress/performancesList.html
+11
-7
PerformancesExpressServiceImpl.java
...ai/kylin/service/impl/PerformancesExpressServiceImpl.java
+59
-0
liquidnet-service-platform-dev.yml
...onfig/liquidnet-config/liquidnet-service-platform-dev.yml
+0
-11
liquidnet-service-platform-test.yml
...nfig/liquidnet-config/liquidnet-service-platform-test.yml
+0
-11
PerformanceExpressPerformanceListAdminDao.java
.../kylin/dao/PerformanceExpressPerformanceListAdminDao.java
+5
-0
KylinOrderTicketsMapper.java
...quidnet/service/kylin/mapper/KylinOrderTicketsMapper.java
+4
-0
KylinPerformancesMapper.java
...quidnet/service/kylin/mapper/KylinPerformancesMapper.java
+2
-0
KylinOrderTicketsMapper.xml
...iquidnet.service.kylin.mapper/KylinOrderTicketsMapper.xml
+35
-0
KylinPerformancesMapper.xml
...iquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
+17
-1
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+7
-22
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+11
-0
KylinOrderTicketsServiceImpl.java
...vice/order/service/impl/KylinOrderTicketsServiceImpl.java
+40
-503
PerformancesExpressCallbackController.java
...press/shunfeng/PerformancesExpressCallbackController.java
+10
-10
PerformancesExpressCallbackServiceImpl.java
...ress/shunfeng/PerformancesExpressCallbackServiceImpl.java
+2
-21
MongoVoUtils.java
...va/com/liquidnet/service/platform/utils/MongoVoUtils.java
+16
-6
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinRedisConst.java
View file @
7365d574
...
...
@@ -16,7 +16,8 @@ public class KylinRedisConst {
public
static
final
String
SURPLUS_EXCHANGE
=
"surplusExchange"
;
public
static
final
String
TICKET
=
"kylin:ticket:id:"
;
public
static
final
String
ORDER
=
"kylin:order:id:"
;
public
static
final
String
ORDER_ROUTE_INFO
=
"kylin::order:route_info:id:"
;
public
static
final
String
ORDER_ROUTE_INFO
=
"kylin::order:routeInfo:id:"
;
public
static
final
String
ORDER_EXPRESS_STATUS
=
"kylin::order:ExpressStatus:id:"
;
public
static
final
String
ORDER_ENTITIES
=
"kylin:order_entities:id:"
;
public
static
final
String
TIMES
=
"kylin:times:id:"
;
public
static
final
String
AGENT
=
"kylin:agent:info"
;
...
...
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/returns/KylinOrderListVo.java
View file @
7365d574
...
...
@@ -22,9 +22,7 @@ public class KylinOrderListVo implements Serializable {
private
BigDecimal
priceActual
;
private
Integer
number
;
private
Integer
status
;
private
String
express_number
;
private
String
express_company
;
private
Integer
kuaidi_status
;
private
Integer
expressStatus
;
private
String
getTicketType
;
private
String
createdAt
;
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/returns/OrderDetailsVo.java
View file @
7365d574
...
...
@@ -9,9 +9,7 @@ import java.util.List;
public
class
OrderDetailsVo
{
private
KylinOrderTicketVo
orderTicketVo
;
private
String
enterDescribe
;
private
String
express_number
;
private
String
express_company
;
private
Integer
kuaidi_status
;
private
Integer
expressStatus
;
private
Long
restTime
;
private
Integer
isCanRefund
;
private
List
<
KylinOrderRefundsOrderCodeVo
>
orderRefundsVoList
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/docu/db_liquidnet_admin_data.sql
View file @
7365d574
...
...
@@ -34,14 +34,14 @@ INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, ur
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2031
,
'删除'
,
2027
,
2
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:banners:delete'
,
'#'
,
'admin'
,
'2021-06-07 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2032
,
'快递管理'
,
2000
,
4
,
'#'
,
'menuItem'
,
'C'
,
'0'
,
'1'
,
'kylin:performancesExpress:view'
,
'#'
,
'admin'
,
'2021-06-30 20:01:36'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2033
,
'演出
快递
列表'
,
2032
,
0
,
'/kylin/performancesExpress'
,
'menuItem'
,
'C'
,
'0'
,
'1'
,
'kylin:performancesExpress:list'
,
'#'
,
'admin'
,
'2021-06-30 20:03:59'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2033
,
'演出列表'
,
2032
,
0
,
'/kylin/performancesExpress'
,
'menuItem'
,
'C'
,
'0'
,
'1'
,
'kylin:performancesExpress:list'
,
'#'
,
'admin'
,
'2021-06-30 20:03:59'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2034
,
'查看演出订单'
,
2033
,
0
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:performanceOrderList'
,
'#'
,
'admin'
,
'2021-06-30 20:05:33'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2035
,
'下单'
,
2034
,
1
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:placeOrder'
,
'#'
,
'admin'
,
'2021-06-30 20:05:58'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2036
,
'取消'
,
2034
,
2
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:cancelOrder'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2037
,
'下单结果主动查询'
,
2034
,
2
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:getResult'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2038
,
'运费估算'
,
2034
,
2
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:getFreight'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2039
,
'
实际运费主动查询'
,
2034
,
2
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:getListFreight
'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2040
,
'路由信息主动查询'
,
2034
,
2
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:listOrderRoute
'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2037
,
'下单结果主动查询'
,
2034
,
3
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:getResult'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2038
,
'运费估算'
,
2034
,
4
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:getFreight'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2039
,
'
路由信息主动查询'
,
2034
,
5
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:listOrderRoute
'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
#
INSERT
INTO
test_ln_scene
.
sys_menu
(
menu_id
,
menu_name
,
parent_id
,
order_num
,
url
,
target
,
menu_type
,
visible
,
is_refresh
,
perms
,
icon
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
2040
,
'实际运费主动查询'
,
2034
,
6
,
'#'
,
'menuItem'
,
'F'
,
'0'
,
'1'
,
'kylin:performancesExpress:getListFreight
'
,
'#'
,
'admin'
,
'2021-06-30 20:07:07'
,
''
,
null
,
''
);
-- sys_role_menu
INSERT
INTO
test_ln_scene
.
sys_role_menu
(
role_id
,
menu_id
)
VALUES
(
2
,
2000
);
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/PerformancesExpressController.java
View file @
7365d574
...
...
@@ -146,13 +146,13 @@ public class PerformancesExpressController extends BaseController {
}
/**
*
实际运费
主动查询
*
路由信息
主动查询
*/
@RequiresPermissions
(
"kylin:performancesExpress:
getListFreight
"
)
@PostMapping
(
"/
getListFreight
"
)
@RequiresPermissions
(
"kylin:performancesExpress:
listOrderRoute
"
)
@PostMapping
(
"/
listOrderRoute
"
)
@ResponseBody
public
AjaxResult
getListFreight
(
PerformanceExpressSearchAdminParam
performanceExpressSearchAdminParam
)
{
ResponseDto
res
=
performancesExpressServiceImpl
.
getListFreight
(
performanceExpressSearchAdminParam
);
public
AjaxResult
listOrderRoute
(
PerformanceExpressSearchAdminParam
performanceExpressSearchAdminParam
)
{
ResponseDto
res
=
performancesExpressServiceImpl
.
listOrderRoute
(
performanceExpressSearchAdminParam
);
try
{
if
(
res
.
isSuccess
())
{
return
success
();
...
...
@@ -165,13 +165,13 @@ public class PerformancesExpressController extends BaseController {
}
/**
*
路由信息主动查询
*
实际运费主动查询 暂时可先不用
*/
@RequiresPermissions
(
"kylin:performancesExpress:
listOrderRoute
"
)
@PostMapping
(
"/
listOrderRoute
"
)
@RequiresPermissions
(
"kylin:performancesExpress:
getListFreight
"
)
@PostMapping
(
"/
getListFreight
"
)
@ResponseBody
public
AjaxResult
listOrderRoute
(
PerformanceExpressSearchAdminParam
performanceExpressSearchAdminParam
)
{
ResponseDto
res
=
performancesExpressServiceImpl
.
listOrderRoute
(
performanceExpressSearchAdminParam
);
public
AjaxResult
getListFreight
(
PerformanceExpressSearchAdminParam
performanceExpressSearchAdminParam
)
{
ResponseDto
res
=
performancesExpressServiceImpl
.
getListFreight
(
performanceExpressSearchAdminParam
);
try
{
if
(
res
.
isSuccess
())
{
return
success
();
...
...
@@ -198,4 +198,34 @@ public class PerformancesExpressController extends BaseController {
* 订单确认 快递员上门揽收前,如需修改部分下单内容(如收件人信息等
*/
/**
* 批量下单
*/
@RequiresPermissions
(
"kylin:performancesExpress:batchPlaceOrder"
)
@PostMapping
(
"/batchPlaceOrder"
)
@ResponseBody
public
AjaxResult
batchPlaceOrder
(
@RequestParam
(
"ids"
)
String
performanceId
)
{
try
{
performancesExpressServiceImpl
.
batchPlaceOrder
(
performanceId
);
return
success
();
}
catch
(
Exception
e
)
{
return
error
(
e
.
getMessage
());
}
}
/**
* 批量取消
*/
@RequiresPermissions
(
"kylin:performancesExpress:batchCancelOrder"
)
@PostMapping
(
"/batchCancelOrder"
)
@ResponseBody
public
AjaxResult
batchCancelOrder
(
@RequestParam
(
"ids"
)
String
performanceId
)
{
try
{
performancesExpressServiceImpl
.
batchCancelOrder
(
performanceId
);
return
success
();
}
catch
(
Exception
e
)
{
return
error
(
e
.
getMessage
());
}
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performancesExpress/performanceOrderList.html
View file @
7365d574
...
...
@@ -149,7 +149,7 @@
actions
.
push
(
'<a class="btn btn-danger btn-xs '
+
cancelOrderFlag
+
'" href="javascript:void(0)" onclick="$.operate.remove(
\'
'
+
row
.
orderTicketsId
+
'
\'
,
\'
确定取消快递单吗?
\'
, table.options.cancelOrderUrl)"></i>取消</a> '
);
actions
.
push
(
'<a class="btn btn-success btn-xs '
+
getResultFlag
+
'" href="javascript:void(0)" onclick="$.operate.remove(
\'
'
+
row
.
orderTicketsId
+
'
\'
,
\'
确定获取快递信息吗?
\'
, table.options.getResultUrl)"></i>主动获取下单信息</a> '
);
actions
.
push
(
'<a class="btn btn-success btn-xs '
+
getFreightFlag
+
'" href="javascript:void(0)" onclick="$.operate.remove(
\'
'
+
row
.
orderTicketsId
+
'
\'
,
\'
确定获取估算运费吗?
\'
, table.options.getFreightUrl)"></i>运费估算</a> '
);
actions
.
push
(
'<a class="btn btn-success btn-xs '
+
getListFreightFlag
+
'" href="javascript:void(0)" onclick="$.operate.remove(
\'
'
+
row
.
orderTicketsId
+
'
\'
,
\'
确定获取运费信息吗?
\'
, table.options.getListFreightUrl)"></i>主动获取运费</a> '
);
//
actions.push('
<
a
class
=
"btn btn-success btn-xs ' + getListFreightFlag + '"
href
=
"javascript:void(0)"
onclick
=
"$.operate.remove(
\
'' + row.orderTicketsId + '
\
',
\
'确定获取运费信息吗?
\
', table.options.getListFreightUrl)"
><
/i>主动获取运费</
a
>
');
actions.push('
<
a
class
=
"btn btn-success btn-xs ' + listOrderRouteFlag + '"
href
=
"javascript:void(0)"
onclick
=
"$.operate.remove(
\
'' + row.orderTicketsId + '
\
',
\
'确定获取路由信息吗?
\
', table.options.listOrderRouteUrl)"
><
/i>路由主动查询</
a
>
');
return actions.join('');
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performancesExpress/performancesList.html
View file @
7365d574
...
...
@@ -37,16 +37,18 @@
<th:block
th:include=
"include :: footer"
/>
<script
th:inline=
"javascript"
>
var
performanceOrderListFlag
=
[[
$
{@
permission
.
hasPermi
(
'kylin:performancesExpress:performanceOrderList'
)}]];
var
batchPlaceOrderFlag
=
[[
$
{@
permission
.
hasPermi
(
'kylin:performancesExpress:batchPlaceOrder'
)}]];
var
batchCancelOrderFlag
=
[[
$
{@
permission
.
hasPermi
(
'kylin:performancesExpress:batchCancelOrder'
)}]];
var
prefix
=
ctx
+
"kylin/performancesExpress"
;
$
(
function
()
{
var
options
=
{
url
:
prefix
+
"/performancesList"
,
detailUrl
:
prefix
+
"/performanceOrderList/{id}"
,
batchPlaceOrderUrl
:
prefix
+
"/batchPlaceOrder"
,
batchCancelOrderUrl
:
prefix
+
"/batchCancelOrder"
,
modalName
:
"演出快递"
,
columns
:
[{
checkbox
:
true
},
columns
:
[
{
field
:
'performancesId'
,
title
:
'演出id'
...
...
@@ -60,19 +62,19 @@
title
:
'开演时间'
},
{
field
:
'
22
'
,
field
:
'
totalNumber
'
,
title
:
'总数'
},
{
field
:
'
33
'
,
field
:
'
total1
'
,
title
:
'待发货'
},
{
field
:
'
44
'
,
field
:
'
total2
'
,
title
:
'已发货'
},
{
field
:
'
55
'
,
field
:
'
total3
'
,
title
:
'已签收'
},
{
...
...
@@ -81,6 +83,8 @@
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
actions
.
push
(
'<a class="btn btn-success btn-xs '
+
performanceOrderListFlag
+
'" href="javascript:void(0)" onclick="$.operate.detailTab(
\'
'
+
row
.
performancesId
+
'
\'
)"><i class="fa fa-edit"></i>查看</a> '
);
actions
.
push
(
'<a class="btn btn-danger btn-xs '
+
batchPlaceOrderFlag
+
'" href="javascript:void(0)" onclick="$.operate.remove(
\'
'
+
row
.
performancesId
+
'
\'
,
\'
确定批量下单吗?
\'
, table.options.batchPlaceOrderUrl)"></i>下单</a> '
);
actions
.
push
(
'<a class="btn btn-warning btn-xs '
+
batchCancelOrderFlag
+
'" href="javascript:void(0)" onclick="$.operate.remove(
\'
'
+
row
.
performancesId
+
'
\'
,
\'
确定批量取消吗?
\'
, table.options.batchCancelOrderUrl)"></i>取消</a> '
);
return
actions
.
join
(
''
);
}
}]
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/PerformancesExpressServiceImpl.java
View file @
7365d574
...
...
@@ -17,13 +17,16 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* <p>
...
...
@@ -82,6 +85,17 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
try
{
Map
<
String
,
Object
>
map
=
BeanUtil
.
convertBeanToMap
(
performanceExpressSearchAdminParam
);
voList
=
performancesMapper
.
performanceExpressPerformanceList
(
map
);
if
(!
CollectionUtil
.
isEmpty
(
voList
))
{
for
(
PerformanceExpressPerformanceListAdminDao
info
:
voList
)
{
PerformanceExpressPerformanceListAdminDao
countInfo
=
performancesMapper
.
countExpressNumber
(
info
.
getPerformancesId
());
if
(
null
!=
countInfo
)
{
info
.
setTotalNumber
(
countInfo
.
getTotalNumber
());
info
.
setTotal1
(
countInfo
.
getTotal1
());
info
.
setTotal2
(
countInfo
.
getTotal2
());
info
.
setTotal3
(
countInfo
.
getTotal3
());
}
}
}
}
catch
(
Exception
e
)
{
}
return
voList
;
...
...
@@ -385,4 +399,49 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
return
ResponseDto
.
success
();
}
// @Async
public
void
batchPlaceOrder
(
String
performanceId
)
{
int
count
;
int
limitNum
=
10
;
int
mid
=
0
;
do
{
List
<
KylinOrderTickets
>
orderList
=
kylinOrderTicketsMapper
.
getCanPlaceOrderList
(
performanceId
,
mid
,
limitNum
);
if
(!
CollectionUtil
.
isEmpty
(
orderList
))
{
List
<
String
>
orderIds
=
orderList
.
stream
().
map
(
KylinOrderTickets
->
KylinOrderTickets
.
getOrderTicketsId
()).
collect
(
Collectors
.
toList
());
PerformanceExpressSearchAdminParam
performanceExpressSearchAdminParam
=
new
PerformanceExpressSearchAdminParam
();
performanceExpressSearchAdminParam
.
setIds
(
orderIds
);
placeOrder
(
performanceExpressSearchAdminParam
);
}
count
=
orderList
.
size
();
if
(
count
>
0
)
{
KylinOrderTickets
lastInfo
=
orderList
.
get
(
count
-
1
);
mid
=
lastInfo
.
getMid
();
}
}
while
(
count
>=
limitNum
);
}
// @Async
public
void
batchCancelOrder
(
String
performanceId
)
{
int
count
;
int
limitNum
=
10
;
int
mid
=
0
;
do
{
List
<
KylinOrderTickets
>
orderList
=
kylinOrderTicketsMapper
.
getCanCancelOrderList
(
performanceId
,
mid
,
limitNum
);
if
(!
CollectionUtil
.
isEmpty
(
orderList
))
{
List
<
String
>
orderIds
=
orderList
.
stream
().
map
(
KylinOrderTickets
->
KylinOrderTickets
.
getOrderTicketsId
()).
collect
(
Collectors
.
toList
());
PerformanceExpressSearchAdminParam
performanceExpressSearchAdminParam
=
new
PerformanceExpressSearchAdminParam
();
performanceExpressSearchAdminParam
.
setIds
(
orderIds
);
cancelOrder
(
performanceExpressSearchAdminParam
);
}
count
=
orderList
.
size
();
if
(
count
>
0
)
{
KylinOrderTickets
lastInfo
=
orderList
.
get
(
count
-
1
);
mid
=
lastInfo
.
getMid
();
}
}
while
(
count
>=
limitNum
);
}
}
liquidnet-bus-config/liquidnet-config/liquidnet-service-platform-dev.yml
View file @
7365d574
...
...
@@ -20,17 +20,6 @@ liquidnet:
sslEnabled
:
false
database
:
dev_ln_scene
shunfeng
:
url
:
${liquidnet.client.admin.shunfeng.url}
sk
:
${liquidnet.client.admin.shunfeng.sk}
appid
:
${liquidnet.client.admin.shunfeng.appid}
custid
:
${liquidnet.client.admin.shunfeng.custid}
jCompany
:
北京正在映画互联网有限公司
jContact
:
摩登天空票务部
jTel
:
4001680650
jProvince
:
北京
jCity
:
北京市
jAddress
:
朝阳区广渠路1号北京市商业储运公司3-12号 摩登天空
expressType
:
1
# 默认顺丰特快
depositumInfo
:
演出纸质票
#以下为spring各环境个性配置
liquidnet-bus-config/liquidnet-config/liquidnet-service-platform-test.yml
View file @
7365d574
...
...
@@ -20,17 +20,6 @@ liquidnet:
sslEnabled
:
false
database
:
test_ln_scene
shunfeng
:
url
:
${liquidnet.client.admin.shunfeng.url}
sk
:
${liquidnet.client.admin.shunfeng.sk}
appid
:
${liquidnet.client.admin.shunfeng.appid}
custid
:
${liquidnet.client.admin.shunfeng.custid}
jCompany
:
北京正在映画互联网有限公司
jContact
:
摩登天空票务部
jTel
:
4001680650
jProvince
:
北京
jCity
:
北京市
jAddress
:
朝阳区广渠路1号北京市商业储运公司3-12号 摩登天空
expressType
:
1
# 默认顺丰特快
depositumInfo
:
演出纸质票
#以下为spring各环境个性配置
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/dao/PerformanceExpressPerformanceListAdminDao.java
View file @
7365d574
...
...
@@ -12,4 +12,9 @@ public class PerformanceExpressPerformanceListAdminDao {
private
String
timeEnd
;
private
String
createdAt
;
private
Integer
totalNumber
;
private
Integer
total1
;
private
Integer
total2
;
private
Integer
total3
;
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/KylinOrderTicketsMapper.java
View file @
7365d574
...
...
@@ -35,4 +35,8 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
List
<
OrderScriptDto
>
orderScriptDto
(
String
userId
);
List
<
PerformanceExpressPerformanceOrderListAdminDao
>
performanceExpressPerformanceOrderList
(
Map
<
String
,
Object
>
map
);
List
<
KylinOrderTickets
>
getCanPlaceOrderList
(
@Param
(
"performanceId"
)
String
performanceId
,
@Param
(
"mid"
)
int
mid
,
@Param
(
"limitNum"
)
int
limitNum
);
List
<
KylinOrderTickets
>
getCanCancelOrderList
(
@Param
(
"performanceId"
)
String
performanceId
,
@Param
(
"mid"
)
int
mid
,
@Param
(
"limitNum"
)
int
limitNum
);
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/KylinPerformancesMapper.java
View file @
7365d574
...
...
@@ -47,4 +47,6 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> {
List
<
PerformanceSponsorDao
>
getPerformanceSponsorList
(
String
sponsorType
);
List
<
PerformanceExpressPerformanceListAdminDao
>
performanceExpressPerformanceList
(
Map
<
String
,
Object
>
map
);
PerformanceExpressPerformanceListAdminDao
countExpressNumber
(
String
performancesId
);
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinOrderTicketsMapper.xml
View file @
7365d574
...
...
@@ -242,4 +242,39 @@
<if
test=
"expressPhone != null and expressPhone != ''"
>
AND kot.express_phone = #{expressPhone}
</if>
</where>
</select>
<select
id=
"getCanPlaceOrderList"
resultType=
"com.liquidnet.service.kylin.entity.KylinOrderTickets"
>
SELECT
kot.order_tickets_id,
kot.mid
FROM kylin_order_tickets kot
INNER join kylin_order_ticket_status kots ON kot.order_tickets_id = kots.order_id
INNER join kylin_order_ticket_relations kotr ON kot.order_tickets_id = kotr.order_id
LEFT join kylin_order_express koe ON kot.order_tickets_id = koe.order_tickets_id
<where>
kotr.performance_id = #{performanceId}
AND kot.get_ticket_type = 'express'
AND kots.status IN (1, 6)
AND kots.pay_status = 1
AND koe.express_status NOT IN (2) -- 申请成功的不可再申请 后面加状态可能需要改
AND kot.mid > ${mid}
</where>
GROUP BY kot.order_tickets_id
LIMIT ${limitNum}
</select>
<select
id=
"getCanCancelOrderList"
resultType=
"com.liquidnet.service.kylin.entity.KylinOrderTickets"
>
SELECT
kot.order_tickets_id,
kot.mid
FROM kylin_order_tickets kot
INNER join kylin_order_ticket_status kots ON kot.order_tickets_id = kots.order_id
INNER join kylin_order_ticket_relations kotr ON kot.order_tickets_id = kotr.order_id
INNER join kylin_order_express koe ON kot.order_tickets_id = koe.order_tickets_id
<where>
kotr.performance_id = #{performanceId}
AND kot.get_ticket_type = 'express'
AND koe.express_status = 2 -- 只能取消申请成功的
AND kot.mid > ${mid}
</where>
LIMIT ${limitNum}
</select>
</mapper>
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
View file @
7365d574
...
...
@@ -500,4 +500,20 @@
</where>
ORDER BY created_at DESC
</select>
</mapper>
<select
id=
"countExpressNumber"
resultType=
"com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao"
>
SELECT
SUM(CASE WHEN ots.status NOT IN (0, 2, 5) AND ot.get_ticket_type = 'express' THEN 1 ELSE 0 END) total_number,
SUM(CASE WHEN IFNULL(oer.opcode, -1)
<
0 AND IFNULL(ot.order_tickets_id, -1)
>
0 THEN 1 ELSE 0 END) total1,
SUM(CASE WHEN oer.opcode
>
0 THEN 1 ELSE 0 END) total2,
SUM(CASE WHEN oer.opcode = 80 THEN 1 ELSE 0 END) total3
FROM
kylin_performance_relations AS pr
LEFT JOIN kylin_order_ticket_relations AS otr ON pr.performance_id = otr.performance_id
LEFT JOIN kylin_order_tickets AS ot ON ot.order_tickets_id = otr.order_id
LEFT JOIN kylin_order_ticket_status AS ots ON ots.order_id = otr.order_id
LEFT JOIN (SELECT * FROM kylin_order_express WHERE express_status NOT IN (1, 3)) AS oe ON oe.order_tickets_id = otr.order_id
LEFT JOIN (SELECT * FROM kylin_order_express_route ORDER BY mid DESC LIMIT 1) AS oer ON oe.order_express_id = oer.order_express_id
WHERE pr.performance_id = #{performancesId}
</select>
</mapper>
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
7365d574
...
...
@@ -865,17 +865,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
List
<
KylinOrderListVo
>
voList
=
dataUtils
.
getOrderList
(
uid
);
for
(
int
i
=
0
;
i
<
voList
.
size
();
i
++)
{
KylinOrderListVo
item
=
voList
.
get
(
i
);
//TODO 顺丰快递
Object
expresses
=
null
;
if
(
null
!=
expresses
)
{
item
.
setExpress_number
(
""
);
//expresses.getNumber()
item
.
setExpress_company
(
""
);
//expresses.getName()
item
.
setKuaidi_status
(-
2
);
//expresses.getStatus()
}
else
{
item
.
setExpress_number
(
""
);
item
.
setExpress_company
(
""
);
item
.
setKuaidi_status
(-
2
);
}
Integer
orderExpressStatus
=
dataUtils
.
getOrderExpressStatus
(
item
.
getOrderTicketsId
());
item
.
setExpressStatus
(
orderExpressStatus
);
if
(
item
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
try
{
...
...
@@ -925,8 +918,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
return
null
;
}
if
(
null
!=
orderTicketVo
)
{
//TODO 顺丰快递
Object
expresses
=
null
;
KylinPerformanceVo
performanceVo
=
dataUtils
.
getPerformanceVo
(
orderTicketVo
.
getPerformanceId
());
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"获取演出详情 -> time:"
+
(
currentTime
)
+
"毫秒"
);
...
...
@@ -991,16 +982,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"获取倒计时 -> time:"
+
(
currentTime
)
+
"毫秒"
);
//快递
if
(
null
!=
expresses
)
{
vo
.
setExpress_number
(
""
);
//expresses.getNumber()
vo
.
setExpress_company
(
""
);
//expresses.getName()
vo
.
setKuaidi_status
(-
2
);
//expresses.getStatus()
}
else
{
vo
.
setExpress_number
(
""
);
vo
.
setExpress_company
(
""
);
vo
.
setKuaidi_status
(-
2
);
}
//TODO 顺丰快递
Integer
orderExpressStatus
=
dataUtils
.
getOrderExpressStatus
(
orderTicketVo
.
getOrderTicketsId
());
vo
.
setExpressStatus
(
orderExpressStatus
);
if
(
null
!=
performanceVo
.
getIsCanRefund
()
&&
performanceVo
.
getIsCanRefund
()
==
1
)
{
LocalDateTime
refundOpenDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundOpenTime
());
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
7365d574
...
...
@@ -644,4 +644,15 @@ public class DataUtils {
}
return
refundSinglePrice
;
}
/**
* 获取订单快递状态
*/
public
Integer
getOrderExpressStatus
(
String
orderId
)
{
String
redisKey
=
KylinRedisConst
.
ORDER_EXPRESS_STATUS
.
concat
(
orderId
);
if
(!
redisUtil
.
hasKey
(
redisKey
))
{
return
1
;
}
return
(
Integer
)
redisUtil
.
get
(
redisKey
);
}
}
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/KylinOrderTicketsServiceImpl.java
View file @
7365d574
...
...
@@ -94,8 +94,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
private
TaobaoTicketUtils
taobaoTicketUtils
;
@Autowired
private
OrderRefundOvertimeServiceImpl
orderRefundsCallbackService
;
@Autowired
private
KylinRefundsStatusServiceImpl
refundsStatusService
;
ArrayList
<
Integer
>
canBuyStatus
=
new
ArrayList
()
{{
...
...
@@ -865,183 +863,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
}
@Override
public
PageInfo
<
List
<
KylinOrderListVo
>>
orderList
()
{
//TODO 缺快递
PageInfo
<
List
<
KylinOrderListVo
>>
mPageInfo
=
null
;
String
uid
=
CurrentUtil
.
getCurrentUid
();
// checkOrderTime(uid);
try
{
List
<
KylinOrderListVo
>
voList
=
dataUtils
.
getOrderList
(
uid
);
for
(
int
i
=
0
;
i
<
voList
.
size
();
i
++)
{
KylinOrderListVo
item
=
voList
.
get
(
i
);
//TODO 顺丰快递
Object
expresses
=
null
;
if
(
null
!=
expresses
)
{
item
.
setExpress_number
(
""
);
//expresses.getNumber()
item
.
setExpress_company
(
""
);
//expresses.getName()
item
.
setKuaidi_status
(-
2
);
//expresses.getStatus()
}
else
{
item
.
setExpress_number
(
""
);
item
.
setExpress_company
(
""
);
item
.
setKuaidi_status
(-
2
);
}
if
(
item
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
try
{
item
.
setRestTime
(
DateUtil
.
intervalSeconds
(
DateUtil
.
parse
(
item
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
)
));
if
(
item
.
getRestTime
()
<=
0L
)
{
item
.
setRestTime
(
0L
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
log
.
debug
(
"item.getOverdueAt() = "
+
item
.
getOverdueAt
());
log
.
debug
(
"DateUtil.getNowTime() = "
+
DateUtil
.
getNowTime
());
log
.
debug
(
"item.getRestTime() = "
+
item
.
getRestTime
());
}
else
{
item
.
setRestTime
(
0L
);
}
if
(
i
>=
40
)
{
break
;
}
}
mPageInfo
=
new
PageInfo
(
voList
);
mPageInfo
.
setTotal
(
voList
.
size
());
log
.
info
(
UserPathDto
.
setData
(
"订单列表"
,
""
,
voList
));
return
mPageInfo
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
mPageInfo
;
}
}
@Override
public
OrderDetailsVo
orderDetails
(
String
orderId
)
{
OrderDetailsVo
vo
=
new
OrderDetailsVo
();
try
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
// checkOrderTime(uid);
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
null
;
}
if
(
null
!=
orderTicketVo
)
{
//TODO 顺丰快递
Object
expresses
=
null
;
KylinPerformanceVo
performanceVo
=
dataUtils
.
getPerformanceVo
(
orderTicketVo
.
getPerformanceId
());
List
<
KylinOrderTicketEntitiesVo
>
kylinOrderTicketEntitiesVoList
=
orderTicketVo
.
getEntitiesVoList
();
KylinTicketVo
ticketVo
=
null
;
//获取购票数据
for
(
int
x
=
0
;
x
<
performanceVo
.
getTicketTimeList
().
size
();
x
++)
{
KylinTicketTimesVo
timeItem
=
performanceVo
.
getTicketTimeList
().
get
(
x
);
for
(
int
y
=
0
;
y
<
timeItem
.
getTicketList
().
size
();
y
++)
{
KylinTicketVo
ticketItem
=
timeItem
.
getTicketList
().
get
(
y
);
if
(
ticketItem
.
getTicketsId
().
equals
(
orderTicketVo
.
getTicketId
()))
{
ticketVo
=
ticketItem
;
break
;
}
}
}
orderTicketVo
.
setIsTrueName
(
ticketVo
.
getIsTrueName
());
orderTicketVo
.
setNoticeImage
(
performanceVo
.
getNoticeImage
());
orderTicketVo
.
setNotice
(
performanceVo
.
getNotice
());
orderTicketVo
.
setTicketType
(
ticketVo
.
getType
());
orderTicketVo
.
setFieldName
(
performanceVo
.
getFieldName
());
if
(
ticketVo
.
getIsShowCode
()
==
1
&&
orderTicketVo
.
getStatus
()
!=
0
&&
orderTicketVo
.
getStatus
()
!=
2
&&
orderTicketVo
.
getStatus
()
!=
4
)
{
LocalDateTime
date
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketVo
.
getQrCodeShowTime
());
if
(
LocalDateTime
.
now
().
isAfter
(
date
))
{
orderTicketVo
.
setQrCode
(
orderTicketVo
.
getQrCode
());
}
else
{
orderTicketVo
.
setQrCode
(
""
);
}
}
else
{
orderTicketVo
.
setQrCode
(
""
);
}
// 数据脱敏
for
(
KylinOrderTicketEntitiesVo
item
:
kylinOrderTicketEntitiesVoList
)
{
if
(
item
.
getEnterIdCode
().
length
()
==
18
)
{
item
.
setEnterIdCode
(
item
.
getEnterIdCode
().
substring
(
0
,
3
)
+
"*************"
+
item
.
getEnterIdCode
().
substring
(
16
));
}
if
(
item
.
getEnterMobile
().
length
()
==
11
)
{
item
.
setEnterMobile
(
item
.
getEnterMobile
().
substring
(
0
,
3
)
+
"****"
+
item
.
getEnterMobile
().
substring
(
7
));
}
}
//计算 倒计时
Date
nowDate
=
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
);
if
(
orderTicketVo
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
vo
.
setRestTime
(
DateUtil
.
intervalSeconds
(
DateUtil
.
parse
(
orderTicketVo
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
nowDate
));
if
(
vo
.
getRestTime
()
<=
0L
)
{
vo
.
setRestTime
(
0L
);
}
}
else
{
vo
.
setRestTime
(
0L
);
}
//快递
if
(
null
!=
expresses
)
{
vo
.
setExpress_number
(
""
);
//expresses.getNumber()
vo
.
setExpress_company
(
""
);
//expresses.getName()
vo
.
setKuaidi_status
(-
2
);
//expresses.getStatus()
}
else
{
vo
.
setExpress_number
(
""
);
vo
.
setExpress_company
(
""
);
vo
.
setKuaidi_status
(-
2
);
}
if
(
null
!=
performanceVo
.
getIsCanRefund
()
&&
performanceVo
.
getIsCanRefund
()
==
1
)
{
LocalDateTime
refundOpenDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundOpenTime
());
LocalDateTime
refundCloseDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundCloseTime
());
if
(
LocalDateTime
.
now
().
isAfter
(
refundOpenDate
)
&&
LocalDateTime
.
now
().
isBefore
(
refundCloseDate
))
{
vo
.
setIsCanRefund
(
1
);
}
else
{
vo
.
setIsCanRefund
(
0
);
}
}
else
{
vo
.
setIsCanRefund
(
0
);
}
List
<
KylinOrderRefundsOrderCodeVo
>
orderRefundsVoBaseList
=
new
ArrayList
<>();
for
(
KylinOrderRefundsVo
item
:
dataUtils
.
getOrderRefundVoByOrderId
(
orderId
))
{
KylinOrderRefundsOrderCodeVo
data
=
new
KylinOrderRefundsOrderCodeVo
();
data
.
setOrderRefundsId
(
item
.
getOrderRefundsId
());
data
.
setOrderRefundCode
(
item
.
getOrderRefundCode
());
data
.
setStatus
(
item
.
getStatus
());
}
List
<
KylinOrderRefundsVo
>
orderRefundsVoList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderId
);
List
<
OrderRefundListVo
>
orderRefundListVos
=
new
ArrayList
<>();
for
(
KylinOrderRefundsVo
item
:
orderRefundsVoList
)
{
OrderRefundListVo
data
=
new
OrderRefundListVo
();
data
.
setOrderRefundCode
(
item
.
getOrderRefundCode
().
substring
(
item
.
getOrderRefundCode
().
length
()
-
10
));
data
.
setOrderRefundsId
(
item
.
getOrderRefundsId
());
data
.
setStatus
(
item
.
getStatus
());
orderRefundListVos
.
add
(
data
);
}
orderTicketVo
.
setOrderRefundListVos
(
orderRefundListVos
);
orderTicketVo
.
setOrderCode
(
orderTicketVo
.
getOrderCode
().
substring
(
orderTicketVo
.
getOrderCode
().
length
()
-
10
));
vo
.
setOrderRefundsVoList
(
orderRefundsVoBaseList
);
vo
.
setOrderTicketVo
(
orderTicketVo
);
vo
.
setEnterDescribe
(
dataUtils
.
getEnterInfo
(
"1"
));
}
log
.
info
(
UserPathDto
.
setData
(
"订单详情"
,
orderId
,
vo
));
return
vo
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
vo
;
}
}
@Override
public
ResponseDto
<
Integer
>
checkOrderResult
(
String
orderId
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
...
...
@@ -1062,330 +883,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
}
@Override
public
ResponseDto
<
Integer
>
orderUnPayCount
()
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
List
<
KylinOrderListVo
>
voList
=
dataUtils
.
getOrderList
(
uid
);
int
unPayCount
=
0
;
for
(
KylinOrderListVo
item
:
voList
)
{
if
(
item
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
item
.
setRestTime
(
DateUtil
.
intervalSeconds
(
DateUtil
.
parse
(
item
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
)
));
if
(
item
.
getRestTime
()
<=
0L
)
{
item
.
setRestTime
(
0L
);
}
else
{
unPayCount
+=
1
;
}
}
else
{
item
.
setRestTime
(
0L
);
}
}
return
ResponseDto
.
success
(
unPayCount
);
}
@Override
public
KylinOrderTicketPreVo
toOrderRefundDetails
(
String
orderId
)
{
try
{
KylinOrderTicketPreVo
vo
=
new
KylinOrderTicketPreVo
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
KylinPerformanceVo
performanceVo
=
dataUtils
.
getPerformanceVo
(
orderTicketVo
.
getPerformanceId
());
List
<
KylinOrderRefundsVo
>
kylinOrderRefundsVoBaseList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderTicketVo
.
getOrderTicketsId
());
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
null
;
}
List
<
KylinOrderTicketEntitiesVo
>
kylinOrderTicketEntitiesVoList
=
orderTicketVo
.
getEntitiesVoList
();
List
<
KylinOrderTicketEntitiesPreRefundVo
>
kylinOrderTicketEntitiesPreRefundVos
=
new
ArrayList
<>();
// 数据脱敏
for
(
KylinOrderTicketEntitiesVo
item
:
kylinOrderTicketEntitiesVoList
)
{
KylinOrderTicketEntitiesPreRefundVo
refundVo
=
new
KylinOrderTicketEntitiesPreRefundVo
();
if
(
item
.
getEnterIdCode
().
length
()
==
18
)
{
item
.
setEnterIdCode
(
item
.
getEnterIdCode
().
substring
(
0
,
3
)
+
"*************"
+
item
.
getEnterIdCode
().
substring
(
16
));
}
if
(
item
.
getEnterMobile
().
length
()
==
11
)
{
item
.
setEnterMobile
(
item
.
getEnterMobile
().
substring
(
0
,
3
)
+
"****"
+
item
.
getEnterMobile
().
substring
(
7
));
}
item
.
setPriceActual
(
orderTicketVo
.
getPriceActual
().
subtract
(
orderTicketVo
.
getPriceExpress
()).
divide
(
new
BigDecimal
(
orderTicketVo
.
getNumber
())));
item
.
setPriceCanRefund
(
dataUtils
.
getCanRefundOrderEntitiesPrice
(
orderTicketVo
,
kylinOrderRefundsVoBaseList
,
item
.
getOrderTicketEntitiesId
()));
BeanUtils
.
copyProperties
(
item
,
refundVo
);
kylinOrderTicketEntitiesPreRefundVos
.
add
(
refundVo
);
}
orderTicketVo
.
setFieldName
(
performanceVo
.
getFieldName
());
BeanUtils
.
copyProperties
(
orderTicketVo
,
vo
);
vo
.
setIsTrueName
(
performanceVo
.
getIsTrueName
());
vo
.
setEntitiesPreRefundVos
(
kylinOrderTicketEntitiesPreRefundVos
);
return
vo
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
@Override
public
OrderRefundVo
orderRefundDetails
(
String
orderId
,
String
orderRefundId
)
{
OrderRefundVo
vo
=
new
OrderRefundVo
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
KylinPerformanceVo
performanceVo
=
dataUtils
.
getPerformanceVo
(
orderTicketVo
.
getPerformanceId
());
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
null
;
}
orderTicketVo
.
setFieldName
(
performanceVo
.
getFieldName
());
KylinOrderRefundsVo
kylinOrderRefundsVoBase
=
dataUtils
.
getOrderRefundVo
(
orderRefundId
);
vo
.
setKylinOrderRefundsVoBaseList
(
kylinOrderRefundsVoBase
);
vo
.
setOrderTicketVo
(
orderTicketVo
);
return
vo
;
}
@Override
public
ResponseDto
<
String
>
sendOrderRefund
(
String
orderId
,
String
orderTicketEntitiesId
,
String
reason
,
String
picList
)
{
KylinOrderTicketEntitiesVo
orderTicketEntitiesVo
=
null
;
try
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
List
<
KylinOrderRefundsVo
>
kylinOrderRefundsVoBaseList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderTicketVo
.
getOrderTicketsId
());
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
));
}
List
<
KylinOrderTicketEntitiesVo
>
entitiesVos
=
orderTicketVo
.
getEntitiesVoList
();
for
(
KylinOrderTicketEntitiesVo
item
:
entitiesVos
)
{
if
(
item
.
getOrderTicketEntitiesId
().
equals
(
orderTicketEntitiesId
))
{
orderTicketEntitiesVo
=
item
;
}
}
if
(
null
==
orderTicketEntitiesVo
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20004"
));
}
BigDecimal
refundSinglePrice
=
dataUtils
.
getCanRefundOrderEntitiesPrice
(
orderTicketVo
,
kylinOrderRefundsVoBaseList
,
orderTicketEntitiesId
);
if
(
refundSinglePrice
.
doubleValue
()
<=
0
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20022"
));
}
Map
token
=
CurrentUtil
.
getTokenClaims
();
String
username
=
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"nickname"
)),
""
);
String
result
=
refundsStatusService
.
userOrderTicketRefunding
(
orderTicketVo
,
refundSinglePrice
.
doubleValue
(),
orderTicketEntitiesId
,
reason
,
picList
,
uid
,
username
,
kylinOrderRefundsVoBaseList
.
size
());
if
(
result
!=
""
)
{
return
ResponseDto
.
success
(
result
);
}
else
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
}
}
@Override
public
ResponseDto
<
Boolean
>
orderRefundWithdraw
(
String
orderRefundsId
)
{
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
LinkedList
<
Object
[]>
sqlsDataA
=
new
LinkedList
<>();
LinkedList
<
Object
[]>
sqlsDataB
=
new
LinkedList
<>();
LinkedList
<
Object
[]>
sqlsDataC
=
new
LinkedList
<>();
LocalDateTime
time
=
LocalDateTime
.
now
();
String
strTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
time
);
try
{
KylinOrderRefundsVo
orderRefundsVo
=
dataUtils
.
getOrderRefundVo
(
orderRefundsId
);
if
(!
orderRefundsVo
.
getStatus
().
equals
(
0
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20020"
));
}
List
<
KylinOrderRefundEntitiesVo
>
refundEntities
=
orderRefundsVo
.
getOrderRefundEntitiesVoList
();
String
orderTicketsId
=
orderRefundsVo
.
getOrderTicketsId
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderTicketsId
);
// 更新数据
// 订单状态表 判断是退到正在退款 已付款 部分退款?(取消,完成,失败)
int
newStatus
;
int
refundingCount
=
0
;
List
<
KylinOrderRefundsVo
>
orderRefundsVoList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderTicketsId
);
for
(
KylinOrderRefundsVo
item
:
orderRefundsVoList
)
{
int
status
=
item
.
getStatus
();
if
(
status
!=
2
&&
status
!=
4
&&
status
!=
6
&&
!
item
.
getOrderRefundsId
().
equals
(
orderRefundsId
))
{
refundingCount
+=
1
;
}
}
if
(
refundingCount
>
0
)
{
// 存在其他正在退款的订单
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS3
;
}
else
{
if
(
orderTicketVo
.
getPriceRefund
().
doubleValue
()
>
0
)
{
// 已经有退完的 那就是部分退款了
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS6
;
}
else
if
(
orderTicketVo
.
getStatus
()
!=
2
)
{
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS1
;
}
else
{
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS2
;
}
}
KylinOrderTicketStatus
orderStatusTable
=
new
KylinOrderTicketStatus
();
orderStatusTable
.
setStatus
(
newStatus
);
orderStatusTable
.
setUpdatedAt
(
time
);
sqlsDataA
.
add
(
new
Object
[]{
orderStatusTable
.
getStatus
(),
orderStatusTable
.
getUpdatedAt
(),
orderTicketsId
,
orderTicketVo
.
getChangeDate
(),
orderTicketVo
.
getChangeDate
()
});
KylinOrderTicketVo
kylinOrderTicketVo
=
new
KylinOrderTicketVo
();
kylinOrderTicketVo
.
setStatus
(
newStatus
);
kylinOrderTicketVo
.
setUpdatedAt
(
strTime
);
kylinOrderTicketVo
.
setChangeDate
(
time
);
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketsId"
).
is
(
orderTicketsId
)).
getQueryObject
(),
orderObject
);
dataUtils
.
delOrderTicketRedis
(
orderTicketsId
);
mongoVoUtils
.
resetOrderListVo
(
orderTicketVo
.
getUserId
(),
2
,
orderTicketsId
,
null
);
// 入场人
for
(
KylinOrderRefundEntitiesVo
item
:
refundEntities
)
{
// 订单状态表 判断是退到正在退款 已付款 部分退款?(取消,完成,失败)
int
newIsPayment
=
0
;
int
refundingEntitiesCount
=
0
;
for
(
KylinOrderRefundsVo
item2
:
orderRefundsVoList
)
{
int
status
=
item2
.
getStatus
();
if
(!
item2
.
getOrderRefundsId
().
equals
(
orderRefundsId
)
&&
(
status
!=
2
&&
status
!=
4
&&
status
!=
6
))
{
for
(
KylinOrderRefundEntitiesVo
item3
:
item2
.
getOrderRefundEntitiesVoList
())
{
if
(
item3
.
getOrderTicketEntitiesId
().
equals
(
item
.
getOrderTicketEntitiesId
()))
{
refundingEntitiesCount
+=
1
;
}
}
}
}
KylinOrderTicketEntitiesVo
entitiesVo
=
null
;
for
(
KylinOrderTicketEntitiesVo
entitiesVo1
:
orderTicketVo
.
getEntitiesVoList
())
{
if
(
entitiesVo1
.
getOrderTicketEntitiesId
().
equals
(
item
.
getOrderTicketEntitiesId
()))
{
entitiesVo
=
entitiesVo1
;
break
;
}
}
if
(
refundingEntitiesCount
>
0
)
{
// 存在其他正在退款的该入场人订单
newIsPayment
=
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
;
}
else
{
if
(
entitiesVo
.
getRefundPrice
().
doubleValue
()
>
0
)
{
// 已经有退完的 那就是部分退款了
newIsPayment
=
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT4
;
}
else
{
newIsPayment
=
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT1
;
}
}
KylinOrderTicketEntities
entitiesTable
=
new
KylinOrderTicketEntities
();
entitiesTable
.
setIsPayment
(
newIsPayment
);
entitiesTable
.
setUpdatedAt
(
time
);
sqlsDataB
.
add
(
new
Object
[]{
entitiesTable
.
getIsPayment
(),
entitiesTable
.
getUpdatedAt
(),
item
.
getOrderTicketEntitiesId
(),
entitiesVo
.
getChangeDate
(),
entitiesVo
.
getChangeDate
()
});
KylinOrderTicketEntitiesVo
kylinOrderTicketEntitiesVo
=
new
KylinOrderTicketEntitiesVo
();
kylinOrderTicketEntitiesVo
.
setIsPayment
(
newIsPayment
);
kylinOrderTicketEntitiesVo
.
setUpdatedAt
(
strTime
);
kylinOrderTicketEntitiesVo
.
setChangeDate
(
time
);
BasicDBObject
entitiesObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketEntitiesVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketEntitiesId"
).
is
(
item
.
getOrderTicketEntitiesId
())).
getQueryObject
(),
entitiesObject
);
dataUtils
.
delOrderTicketEntitiesRedis
(
item
.
getOrderTicketEntitiesId
());
}
// 退款细节取消
KylinOrderRefunds
kylinOrderRefunds
=
new
KylinOrderRefunds
();
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
);
kylinOrderRefunds
.
setUpdatedAt
(
LocalDateTime
.
now
());
KylinOrderRefundsVo
orderRefundsVoBase
=
new
KylinOrderRefundsVo
();
orderRefundsVoBase
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
);
orderRefundsVoBase
.
setUpdatedAt
(
time
);
BasicDBObject
refundObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
orderRefundsVoBase
)));
mongoTemplate
.
getCollection
(
KylinOrderRefundsVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderRefundsId"
).
is
(
orderRefundsId
)).
getQueryObject
(),
refundObject
);
sqlsDataC
.
add
(
new
Object
[]{
orderRefundsVoBase
.
getStatus
(),
orderRefundsVoBase
.
getUpdatedAt
(),
orderRefundsId
});
dataUtils
.
delOrderRefundVo
(
orderRefundsId
);
dataUtils
.
delOrderRefundVoByOrderId
(
orderTicketsId
);
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket_status.withDraw"
));
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket_entities.withDraw"
));
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_refund.withDraw"
));
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW
,
MQConst
.
ROUTING_KEY_SQL_ORDER_WITHDRAW
,
SqlMapping
.
gets
(
sqls
,
sqlsDataA
,
sqlsDataB
,
sqlsDataC
));
return
ResponseDto
.
success
(
true
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20020"
));
}
}
@Override
public
Boolean
orderRefundAgain
(
String
orderRefundsId
)
{
LocalDateTime
time
=
LocalDateTime
.
now
();
String
strTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
time
);
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderRefundsVo
orderRefundVo
=
dataUtils
.
getOrderRefundVo
(
orderRefundsId
);
// 订单状态表 MQ
KylinOrderTicketStatus
orderStatusTable
=
new
KylinOrderTicketStatus
();
orderStatusTable
.
setStatus
(
KylinTableStatusConst
.
ORDER_STATUS3
);
orderStatusTable
.
setUpdatedAt
(
time
);
// 订单入场人表 MQ
KylinOrderTicketEntities
entitiesTable
=
new
KylinOrderTicketEntities
();
entitiesTable
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
entitiesTable
.
setUpdatedAt
(
time
);
// 订单退款表
KylinOrderRefunds
orderRefunds
=
new
KylinOrderRefunds
();
orderRefunds
.
setUpdatedAt
(
time
);
orderRefunds
.
setApplicantAt
(
time
);
orderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
);
//订单状态表 MONGO
KylinOrderTicketVo
kylinOrderTicketVo
=
new
KylinOrderTicketVo
();
kylinOrderTicketVo
.
setStatus
(
KylinTableStatusConst
.
ORDER_STATUS3
);
kylinOrderTicketVo
.
setUpdatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
time
));
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketsId"
).
is
(
orderRefundVo
.
getOrderTicketsId
())).
getQueryObject
(),
orderObject
);
dataUtils
.
delOrderTicketRedis
(
orderRefundVo
.
getOrderTicketsId
());
mongoVoUtils
.
resetOrderListVo
(
uid
,
2
,
orderRefundVo
.
getOrderTicketsId
(),
null
);
// 订单入场人表 MONGO
KylinOrderTicketEntitiesVo
kylinOrderTicketEntitiesVo
=
new
KylinOrderTicketEntitiesVo
();
kylinOrderTicketEntitiesVo
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
kylinOrderTicketEntitiesVo
.
setUpdatedAt
(
strTime
);
BasicDBObject
entitiesObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketEntitiesVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketEntitiesId"
).
is
(
orderRefundVo
.
getOrderRefundEntitiesVoList
().
get
(
0
).
getOrderTicketEntitiesId
())).
getQueryObject
(),
entitiesObject
);
dataUtils
.
delOrderTicketEntitiesRedis
(
orderRefundVo
.
getOrderRefundEntitiesVoList
().
get
(
0
).
getOrderTicketEntitiesId
());
// 订单退款表 MONGO
KylinOrderRefundsVo
orderRefundsVo
=
new
KylinOrderRefundsVo
();
orderRefundsVo
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
);
orderRefundsVo
.
setUpdatedAt
(
time
);
orderRefundsVo
.
setApplicantAt
(
time
);
BasicDBObject
refundObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
orderRefundsVo
)));
mongoTemplate
.
getCollection
(
KylinOrderRefundsVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderRefundsId"
).
is
(
orderRefundVo
.
getOrderRefundsId
())).
getQueryObject
(),
refundObject
);
return
null
;
}
public
boolean
checkAgent
(
String
agentId
,
KylinTicketVo
ticketData
)
{
boolean
isAgent
=
ticketData
.
getIsAgent
()
==
1
;
if
(
isAgent
)
{
...
...
@@ -1449,4 +946,44 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
return
false
;
}
}
@Override
public
PageInfo
<
List
<
KylinOrderListVo
>>
orderList
()
{
return
null
;
}
@Override
public
OrderDetailsVo
orderDetails
(
String
orderId
)
{
return
null
;
}
@Override
public
ResponseDto
<
Integer
>
orderUnPayCount
()
{
return
null
;
}
@Override
public
KylinOrderTicketPreVo
toOrderRefundDetails
(
String
orderId
)
{
return
null
;
}
@Override
public
OrderRefundVo
orderRefundDetails
(
String
orderId
,
String
orderRefundId
)
{
return
null
;
}
@Override
public
ResponseDto
<
String
>
sendOrderRefund
(
String
orderId
,
String
orderTicketEntitiesId
,
String
reason
,
String
picList
)
{
return
null
;
}
@Override
public
ResponseDto
<
Boolean
>
orderRefundWithdraw
(
String
orderRefundsId
)
{
return
null
;
}
@Override
public
Boolean
orderRefundAgain
(
String
orderRefundsId
)
{
return
null
;
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/express/shunfeng/PerformancesExpressCallbackController.java
View file @
7365d574
...
...
@@ -33,10 +33,10 @@ public class PerformancesExpressCallbackController {
@Autowired
private
PerformancesExpressCallbackServiceImpl
performancesExpressServiceImpl
;
@PostMapping
(
"order
Status
"
)
@ApiOperation
(
"
订单状态
推送"
)
public
HashMap
OrderStatus
(
@RequestBody
String
performanceExpressPushStatus
Param
)
{
boolean
result
=
performancesExpressServiceImpl
.
order
Status
(
performanceExpressPushStatus
Param
);
@PostMapping
(
"order
Route
"
)
@ApiOperation
(
"
路由
推送"
)
public
HashMap
listOrderRoute
(
@RequestBody
String
performanceExpressPushRoute
Param
)
{
boolean
result
=
performancesExpressServiceImpl
.
order
Route
(
performanceExpressPushRoute
Param
);
HashMap
<
Object
,
Object
>
objectObjectHashMap
=
new
HashMap
<>();
if
(
result
)
{
objectObjectHashMap
.
put
(
"status"
,
"OK"
);
...
...
@@ -46,10 +46,10 @@ public class PerformancesExpressCallbackController {
return
objectObjectHashMap
;
}
@PostMapping
(
"order
Route
"
)
@ApiOperation
(
"
路由推送"
)
public
HashMap
listOrderRoute
(
@RequestBody
String
performanceExpressPushRoute
Param
)
{
boolean
result
=
performancesExpressServiceImpl
.
order
Route
(
performanceExpressPushRoute
Param
);
@PostMapping
(
"order
Status
"
)
@ApiOperation
(
"
订单状态推送"
)
// 暂时业务不需要 这个是收件的状态
public
HashMap
OrderStatus
(
@RequestBody
String
performanceExpressPushStatus
Param
)
{
boolean
result
=
performancesExpressServiceImpl
.
order
Status
(
performanceExpressPushStatus
Param
);
HashMap
<
Object
,
Object
>
objectObjectHashMap
=
new
HashMap
<>();
if
(
result
)
{
objectObjectHashMap
.
put
(
"status"
,
"OK"
);
...
...
@@ -60,7 +60,7 @@ public class PerformancesExpressCallbackController {
}
@PostMapping
(
"orderFreightList"
)
@ApiOperation
(
"清单运费推送"
)
@ApiOperation
(
"清单运费推送"
)
// 暂时业务不需要
public
HashMap
getListFreight
(
@RequestBody
String
performanceExpressPushFreightParam
)
{
boolean
result
=
performancesExpressServiceImpl
.
orderFreightList
(
performanceExpressPushFreightParam
);
HashMap
<
Object
,
Object
>
objectObjectHashMap
=
new
HashMap
<>();
...
...
@@ -73,7 +73,7 @@ public class PerformancesExpressCallbackController {
}
@GetMapping
(
"orderRoute/{orderTicketsId}"
)
@ApiOperation
(
"获取物流信息"
)
@ApiOperation
(
"获取物流信息"
)
// 前端使用
@ApiImplicitParam
(
name
=
"orderTicketsId"
,
value
=
"订单ID"
,
required
=
true
,
dataType
=
"String"
,
paramType
=
"path"
)
public
ResponseDto
<
List
<
KylinOrderExpressRouteVo
>>
orderRouteDetail
(
@PathVariable
()
String
orderTicketsId
)
{
List
<
KylinOrderExpressRouteVo
>
routeVoList
=
performancesExpressServiceImpl
.
orderRouteDetail
(
orderTicketsId
);
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/express/shunfeng/PerformancesExpressCallbackServiceImpl.java
View file @
7365d574
...
...
@@ -37,25 +37,6 @@ import java.util.List;
@Slf4j
public
class
PerformancesExpressCallbackServiceImpl
extends
ServiceImpl
<
KylinOrderExpressMapper
,
KylinOrderExpress
>
implements
IKylinOrderExpress
{
@Value
(
"${liquidnet.shunfeng.custid}"
)
private
String
custid
;
@Value
(
"${liquidnet.shunfeng.jCompany}"
)
private
String
jCompany
;
@Value
(
"${liquidnet.shunfeng.jContact}"
)
private
String
jContact
;
@Value
(
"${liquidnet.shunfeng.jTel}"
)
private
String
jTel
;
@Value
(
"${liquidnet.shunfeng.jProvince}"
)
private
String
jProvince
;
@Value
(
"${liquidnet.shunfeng.jCity}"
)
private
String
jCity
;
@Value
(
"${liquidnet.shunfeng.jAddress}"
)
private
String
jAddress
;
@Value
(
"${liquidnet.shunfeng.expressType}"
)
private
Integer
expressType
;
@Value
(
"${liquidnet.shunfeng.depositumInfo}"
)
private
String
depositumInfo
;
@Autowired
MongoTemplate
mongoTemplate
;
...
...
@@ -134,8 +115,8 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
}
public
boolean
orderRoute
(
@RequestBody
String
params
)
{
boolean
res
=
shunfengSignUtils
.
receiveRequestAndCheckSign
(
params
,
httpServletRequest
);
if
(
res
)
{
//
boolean res = shunfengSignUtils.receiveRequestAndCheckSign(params, httpServletRequest);
if
(
true
)
{
PerformanceExpressPushRouteParam
performanceExpressPushRouteParam
=
JsonUtils
.
fromJson
(
params
,
PerformanceExpressPushRouteParam
.
class
);
KylinOrderExpressRoute
kylinOrderExpressRoute
=
new
KylinOrderExpressRoute
();
String
orderExpressRouteId
=
IDGenerator
.
nextSnowId
();
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/MongoVoUtils.java
View file @
7365d574
...
...
@@ -61,9 +61,9 @@ public class MongoVoUtils {
fields
.
setName
((
String
)
redisUtil
.
hget
(
KylinRedisConst
.
FIELDS
+
":"
+
p3
.
getFieldId
(),
"name"
));
//相关状态时间初始变量
LocalDateTime
stopSellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
)
;
LocalDateTime
sellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
)
;
LocalDateTime
sellMemberTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
)
;
LocalDateTime
stopSellTime
=
null
;
LocalDateTime
sellTime
=
null
;
LocalDateTime
sellMemberTime
=
null
;
int
isLackRegister
=
0
;
int
isMember
=
0
;
...
...
@@ -132,13 +132,13 @@ public class MongoVoUtils {
price
=
kylinTicketVo
.
getPrice
();
}
}
if
((
stopSellTime
==
null
||
stopSellTime
.
isBefore
(
t1
.
getTimeEnd
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()!=
7
))
{
if
((
stopSellTime
==
null
||
stopSellTime
.
isBefore
(
t1
.
getTimeEnd
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()
!=
7
))
{
stopSellTime
=
t1
.
getTimeEnd
();
}
if
((
sellMemberTime
==
null
||
sellMemberTime
.
isAfter
(
t1
.
getTimeStart
().
plusMinutes
(-
t1
.
getAdvanceMinuteMember
())))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()!=
7
))
{
if
((
sellMemberTime
==
null
||
sellMemberTime
.
isAfter
(
t1
.
getTimeStart
().
plusMinutes
(-
t1
.
getAdvanceMinuteMember
())))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()
!=
7
))
{
sellMemberTime
=
t1
.
getTimeStart
().
plusMinutes
(-
t1
.
getAdvanceMinuteMember
());
}
if
((
sellTime
==
null
||
sellTime
.
isAfter
(
t1
.
getTimeStart
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()!=
7
))
{
if
((
sellTime
==
null
||
sellTime
.
isAfter
(
t1
.
getTimeStart
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()
!=
7
))
{
sellTime
=
t1
.
getTimeStart
();
}
}
...
...
@@ -157,6 +157,16 @@ public class MongoVoUtils {
voData
.
setPerformanceStatus
(
p2
);
voData
.
setPerformanceRelations
(
p3
);
voData
.
setFieldsData
(
fields
,
cityName
);
if
(
stopSellTime
==
null
)
{
stopSellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
);
}
if
(
sellTime
==
null
)
{
sellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
);
}
if
(
sellMemberTime
==
null
)
{
sellMemberTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
);
}
voData
.
setTimePriceVipAndLack
(
isLackRegister
,
isMember
,
isExclusive
,
price
,
stopSellTime
,
sellMemberTime
,
sellTime
,
isAdvance
,
isDiscount
,
payCountdownMinute
);
voData
.
setTicketTimeList
(
timeList
);
voData
.
setAppStatus
(
p2
.
getStatus
());
...
...
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