记得上下班打卡 | 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
d46d3b1c
Commit
d46d3b1c
authored
Jun 18, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
65f80be2
99a90bbb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
160 deletions
+61
-160
db_liquidnet_admin_data.sql
...quidnet-client-admin-web/docu/db_liquidnet_admin_data.sql
+4
-1
performancesStatic.html
...lates/zhengzai/kylin/performances/performancesStatic.html
+13
-153
PerformanceOrderStatisticalDao.java
...net/service/kylin/dao/PerformanceOrderStatisticalDao.java
+1
-1
mongo_db_ddl.sql
...-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl.sql
+19
-0
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+20
-2
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+4
-3
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/docu/db_liquidnet_admin_data.sql
View file @
d46d3b1c
...
@@ -72,6 +72,7 @@ INSERT INTO test_ln_scene.sys_dict_type (dict_id, dict_name, dict_type, status,
...
@@ -72,6 +72,7 @@ INSERT INTO test_ln_scene.sys_dict_type (dict_id, dict_name, dict_type, status,
INSERT
INTO
test_ln_scene
.
sys_dict_type
(
dict_id
,
dict_name
,
dict_type
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
106
,
'购买方式'
,
'zhengzai_buy_mode'
,
'0'
,
'admin'
,
'2021-06-08 14:03:35'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_type
(
dict_id
,
dict_name
,
dict_type
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
106
,
'购买方式'
,
'zhengzai_buy_mode'
,
'0'
,
'admin'
,
'2021-06-08 14:03:35'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_type
(
dict_id
,
dict_name
,
dict_type
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
107
,
'支付状态'
,
'zhengzai_payment_type'
,
'0'
,
'admin'
,
'2021-06-11 16:01:37'
,
''
,
null
,
'票务状态'
);
INSERT
INTO
test_ln_scene
.
sys_dict_type
(
dict_id
,
dict_name
,
dict_type
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
107
,
'支付状态'
,
'zhengzai_payment_type'
,
'0'
,
'admin'
,
'2021-06-11 16:01:37'
,
''
,
null
,
'票务状态'
);
INSERT
INTO
test_ln_scene
.
sys_dict_type
(
dict_id
,
dict_name
,
dict_type
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
108
,
'出票状态'
,
'zhengzai_ticket_status'
,
'0'
,
'admin'
,
'2021-06-11 16:03:36'
,
''
,
null
,
'订单出票状态'
);
INSERT
INTO
test_ln_scene
.
sys_dict_type
(
dict_id
,
dict_name
,
dict_type
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
108
,
'出票状态'
,
'zhengzai_ticket_status'
,
'0'
,
'admin'
,
'2021-06-11 16:03:36'
,
''
,
null
,
'订单出票状态'
);
INSERT
INTO
test_ln_scene
.
sys_dict_type
(
dict_id
,
dict_name
,
dict_type
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
109
,
'票种类型'
,
'zhengzai_ticket_type'
,
'0'
,
'admin'
,
'2021-06-18 11:12:28'
,
''
,
null
,
null
);
-- sys_dict_data
-- sys_dict_data
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
100
,
2
,
'支付宝'
,
'alipay'
,
'zhengzai_pay_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-07 10:39:11'
,
''
,
null
,
'支付宝'
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
100
,
2
,
'支付宝'
,
'alipay'
,
'zhengzai_pay_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-07 10:39:11'
,
''
,
null
,
'支付宝'
);
...
@@ -106,4 +107,6 @@ INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_
...
@@ -106,4 +107,6 @@ INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
130
,
3
,
'退票中'
,
'2'
,
'zhengzai_payment_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:06:35'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
130
,
3
,
'退票中'
,
'2'
,
'zhengzai_payment_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:06:35'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
131
,
4
,
'已退款'
,
'3'
,
'zhengzai_payment_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:06:52'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
131
,
4
,
'已退款'
,
'3'
,
'zhengzai_payment_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:06:52'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
132
,
1
,
'未出票'
,
'0'
,
'zhengzai_ticket_status'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:07:27'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
132
,
1
,
'未出票'
,
'0'
,
'zhengzai_ticket_status'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:07:27'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
133
,
2
,
'已出票'
,
'1'
,
'zhengzai_ticket_status'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:07:41'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
133
,
2
,
'已出票'
,
'1'
,
'zhengzai_ticket_status'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-11 16:07:41'
,
''
,
null
,
null
);
\ No newline at end of file
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
134
,
1
,
'单日票'
,
'1'
,
'zhengzai_ticket_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-18 11:13:08'
,
''
,
null
,
null
);
INSERT
INTO
test_ln_scene
.
sys_dict_data
(
dict_code
,
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
css_class
,
list_class
,
is_default
,
status
,
create_by
,
create_time
,
update_by
,
update_time
,
remark
)
VALUES
(
135
,
2
,
'通票'
,
'2'
,
'zhengzai_ticket_type'
,
null
,
null
,
'Y'
,
'0'
,
'admin'
,
'2021-06-18 11:13:36'
,
''
,
null
,
null
);
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performances/performancesStatic.html
View file @
d46d3b1c
...
@@ -41,12 +41,12 @@
...
@@ -41,12 +41,12 @@
<div
th:text=
"*{totalExchange}"
>
0
</div>
<div
th:text=
"*{totalExchange}"
>
0
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-lg-1"
>
<!-- <div class="col-lg-1">--
>
<div
>
<!-- <div>--
>
<div>
兑换库存(张)
</div
>
<!-- <div>兑换库存(张)</div>--
>
<div
th:text=
"*{totalExchange}"
>
0
</div
>
<!-- <div th:text="*{totalExchange}">0</div>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
class=
"col-lg-1"
>
<div
class=
"col-lg-1"
>
<div>
<div>
<div>
购买人数(人)
</div>
<div>
购买人数(人)
</div>
...
@@ -100,9 +100,9 @@
...
@@ -100,9 +100,9 @@
<th>
<th>
<div
class=
"cell"
>
销售额(元)
</div>
<div
class=
"cell"
>
销售额(元)
</div>
</th>
</th>
<!-- <th colspan="1" rowspan="1" class="el-table_5_column_42 is-leaf">--
>
<th
>
<!-- <div class="cell">兑换数量</div>--
>
<div
class=
"cell"
>
兑换数量
</div
>
<!-- </th>--
>
</th
>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
<div
class=
"cell"
th:text=
"${respBean.price}"
>
180.00
</div>
<div
class=
"cell"
th:text=
"${respBean.price}"
>
180.00
</div>
</td>
</td>
<td>
<td>
<div
class=
"cell"
th:text=
"${
respBean.type}"
>
单日票
</div>
<div
class=
"cell"
th:text=
"${
@dict.getLabel('zhengzai_ticket_type',respBean.type)}"
>
0
</div>
</td>
</td>
<td>
<td>
<div
class=
"cell"
th:text=
"${respBean.useStart}"
>
2021-03-06
</div>
<div
class=
"cell"
th:text=
"${respBean.useStart}"
>
2021-03-06
</div>
...
@@ -137,150 +137,10 @@
...
@@ -137,150 +137,10 @@
<td>
<td>
<div
class=
"cell"
th:text=
"${respBean.totalSalePrice}"
>
0
</div>
<div
class=
"cell"
th:text=
"${respBean.totalSalePrice}"
>
0
</div>
</td>
</td>
<!-- <td>--
>
<td
>
<!-- <div class="cell" th:text="${respBean.price}">0</div>--
>
<div
class=
"cell"
th:text=
"${respBean.totalExchange}"
>
0
</div
>
<!-- </td>--
>
</td
>
</tr>
</tr>
<!-- <tr class="el-table__row el-table__row--striped">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">680元区</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell">680.00</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell">单日票</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell">2021-03-06</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">19</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">9</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">1</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">10</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">12920</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr class="el-table__row">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">480元区</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell">480.00</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell">单日票</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell">2021-03-06</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">21</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">3</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">9</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">10080</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr class="el-table__row el-table__row--striped">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">380元区</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell">380.00</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell">单日票</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell">2021-03-06</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">15</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">8</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">5</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">5700</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr class="el-table__row">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">总计</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell"></div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell"></div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell"></div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">55</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">20</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">25</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">24</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">28700</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr><!––>-->
</tbody>
</tbody>
</table>
</table>
<div
style=
"display: none;"
>
<div
style=
"display: none;"
>
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/dao/PerformanceOrderStatisticalDao.java
View file @
d46d3b1c
...
@@ -21,7 +21,7 @@ public class PerformanceOrderStatisticalDao {
...
@@ -21,7 +21,7 @@ public class PerformanceOrderStatisticalDao {
private
String
title
;
private
String
title
;
private
BigDecimal
price
;
private
BigDecimal
price
;
private
Integer
type
;
private
Integer
type
;
private
LocalDateTime
useStart
;
private
String
useStart
;
private
BigDecimal
totalGeneral
=
BigDecimal
.
ZERO
;
private
BigDecimal
totalGeneral
=
BigDecimal
.
ZERO
;
private
BigDecimal
saleGeneral
=
BigDecimal
.
ZERO
;
private
BigDecimal
saleGeneral
=
BigDecimal
.
ZERO
;
private
BigDecimal
surplusGeneral
=
BigDecimal
.
ZERO
;
private
BigDecimal
surplusGeneral
=
BigDecimal
.
ZERO
;
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl.sql
0 → 100644
View file @
d46d3b1c
use
test_ln_scene
;
#
创建集合
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinOrderTicketEntitiesVo"
);
#
创建索引
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderCode
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
userId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
#
创建分片
sh
.
enableSharding
(
"test_ln_scene"
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
\ 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 @
d46d3b1c
...
@@ -110,6 +110,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -110,6 +110,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override
@Override
public
ResponseDto
<
PayResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
)
{
public
ResponseDto
<
PayResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
)
{
Long
currentTime
=
System
.
currentTimeMillis
();
boolean
isDownGeneral
=
false
;
boolean
isDownGeneral
=
false
;
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
lock
=
"userId:"
+
uid
;
String
lock
=
"userId:"
+
uid
;
...
@@ -118,6 +119,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -118,6 +119,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
// }
// }
try
{
try
{
KylinPerformanceVo
performanceData
=
dataUtils
.
getPerformanceVo
(
payOrderParam
.
getPerformanceId
());
KylinPerformanceVo
performanceData
=
dataUtils
.
getPerformanceVo
(
payOrderParam
.
getPerformanceId
());
log
.
debug
(
"获取演出详情 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
KylinTicketTimesVo
ticketTimesData
=
null
;
KylinTicketTimesVo
ticketTimesData
=
null
;
KylinTicketVo
ticketData
=
null
;
KylinTicketVo
ticketData
=
null
;
for
(
int
x
=
0
;
x
<
performanceData
.
getTicketTimeList
().
size
();
x
++)
{
for
(
int
x
=
0
;
x
<
performanceData
.
getTicketTimeList
().
size
();
x
++)
{
...
@@ -156,6 +158,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -156,6 +158,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
String
timeEnd
=
ticketData
.
getTimeEnd
();
// 购票停售时间
String
timeEnd
=
ticketData
.
getTimeEnd
();
// 购票停售时间
String
timeExpressEnd
=
ticketData
.
getTimeEndExpress
();
// 快递停售时间
String
timeExpressEnd
=
ticketData
.
getTimeEndExpress
();
// 快递停售时间
boolean
isMember
=
feignAdamBaseClient
.
isMember
(
uid
).
getData
();
//获取是否是会员
boolean
isMember
=
feignAdamBaseClient
.
isMember
(
uid
).
getData
();
//获取是否是会员
log
.
debug
(
"fegin 会员 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
// boolean isMember = true;
// boolean isMember = true;
int
memberType
;
//会员状态 不需要判断会员 1判断会员逻辑 2会员专属
int
memberType
;
//会员状态 不需要判断会员 1判断会员逻辑 2会员专属
if
(
ticketData
.
getIsExclusive
()
==
1
)
{
if
(
ticketData
.
getIsExclusive
()
==
1
)
{
...
@@ -225,8 +228,10 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -225,8 +228,10 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
// 判断库存
// 判断库存
int
surplusGeneral
=
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
-
payOrderParam
.
getNumber
());
int
surplusGeneral
=
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
-
payOrderParam
.
getNumber
());
log
.
debug
(
"获取库存 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
if
(
surplusGeneral
<
0
)
{
//库存回滚
if
(
surplusGeneral
<
0
)
{
//库存回滚
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
payOrderParam
.
getNumber
());
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
payOrderParam
.
getNumber
());
log
.
debug
(
"修改库存 售罄 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
//redisLockUtil.unlock(lock);
//redisLockUtil.unlock(lock);
return
ResponseDto
.
failure
(
"该票种已售罄"
);
//没抢到
return
ResponseDto
.
failure
(
"该票种已售罄"
);
//没抢到
}
else
{
}
else
{
...
@@ -246,6 +251,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -246,6 +251,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
}
}
}
}
}
log
.
debug
(
"获取 feign 入场人 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
}
}
//限购判断 如果实名 则身份证维度限购 如果不实名则数量限购
//限购判断 如果实名 则身份证维度限购 如果不实名则数量限购
...
@@ -258,6 +264,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -258,6 +264,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
if
(
entersVoList
.
size
()
>
0
)
{
if
(
entersVoList
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
entersVoList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
entersVoList
.
size
();
i
++)
{
String
res1
=
orderUtils
.
judgeOrderLimit
(
performanceData
.
getType
(),
uid
,
entersVoList
.
get
(
i
).
getIdCard
(),
payOrderParam
.
getPerformanceId
(),
payOrderParam
.
getTicketId
(),
performanceLimit
,
performanceMemberLimit
,
ticketLimit
,
ticketMemberLimit
,
1
,
1
,
memberType
,
isTrueName
);
String
res1
=
orderUtils
.
judgeOrderLimit
(
performanceData
.
getType
(),
uid
,
entersVoList
.
get
(
i
).
getIdCard
(),
payOrderParam
.
getPerformanceId
(),
payOrderParam
.
getTicketId
(),
performanceLimit
,
performanceMemberLimit
,
ticketLimit
,
ticketMemberLimit
,
1
,
1
,
memberType
,
isTrueName
);
log
.
debug
(
"判断库存 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
if
(!
res1
.
equals
(
""
))
{
if
(!
res1
.
equals
(
""
))
{
//redisLockUtil.unlock(lock);
//redisLockUtil.unlock(lock);
return
ResponseDto
.
failure
(
res1
);
//乱七八糟异常
return
ResponseDto
.
failure
(
res1
);
//乱七八糟异常
...
@@ -265,17 +272,19 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -265,17 +272,19 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
}
}
else
{
}
else
{
String
res1
=
orderUtils
.
judgeOrderLimit
(
performanceData
.
getType
(),
uid
,
""
,
payOrderParam
.
getPerformanceId
(),
payOrderParam
.
getTicketId
(),
performanceLimit
,
performanceMemberLimit
,
ticketLimit
,
ticketMemberLimit
,
payOrderParam
.
getNumber
(),
payOrderParam
.
getNumber
(),
memberType
,
isTrueName
);
String
res1
=
orderUtils
.
judgeOrderLimit
(
performanceData
.
getType
(),
uid
,
""
,
payOrderParam
.
getPerformanceId
(),
payOrderParam
.
getTicketId
(),
performanceLimit
,
performanceMemberLimit
,
ticketLimit
,
ticketMemberLimit
,
payOrderParam
.
getNumber
(),
payOrderParam
.
getNumber
(),
memberType
,
isTrueName
);
log
.
debug
(
"判断库存 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
if
(!
res1
.
equals
(
""
))
{
if
(!
res1
.
equals
(
""
))
{
//redisLockUtil.unlock(lock);
//redisLockUtil.unlock(lock);
return
ResponseDto
.
failure
(
res1
);
//乱七八糟异常
return
ResponseDto
.
failure
(
res1
);
//乱七八糟异常
}
}
}
}
//redisLockUtil.unlock(lock);
//redisLockUtil.unlock(lock);
return
order
(
payOrderParam
,
uid
,
isMember
,
isTrueName
,
performanceData
,
ticketData
,
entersVoList
,
isStudent
,
ticketTimesData
);
return
order
(
payOrderParam
,
uid
,
isMember
,
isTrueName
,
performanceData
,
ticketData
,
entersVoList
,
isStudent
,
ticketTimesData
,
currentTime
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
isDownGeneral
)
{
if
(
isDownGeneral
)
{
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
payOrderParam
.
getNumber
());
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
payOrderParam
.
getNumber
());
log
.
debug
(
"修改库存 异常 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
}
}
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
"Kylin Order Pay Error = "
+
e
.
getMessage
());
log
.
error
(
"Kylin Order Pay Error = "
+
e
.
getMessage
());
...
@@ -284,7 +293,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -284,7 +293,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
}
}
}
private
ResponseDto
<
PayResultVo
>
order
(
PayOrderParam
payOrderParam
,
String
uid
,
boolean
isMember
,
int
isTrueName
,
KylinPerformanceVo
performanceData
,
KylinTicketVo
ticketData
,
List
<
AdamEntersVo
>
entersVoList
,
Integer
isStudent
,
KylinTicketTimesVo
ticketTimesData
)
{
private
ResponseDto
<
PayResultVo
>
order
(
PayOrderParam
payOrderParam
,
String
uid
,
boolean
isMember
,
int
isTrueName
,
KylinPerformanceVo
performanceData
,
KylinTicketVo
ticketData
,
List
<
AdamEntersVo
>
entersVoList
,
Integer
isStudent
,
KylinTicketTimesVo
ticketTimesData
,
Long
currentTime
)
{
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
String
source
=
CurrentUtil
.
getCliSource
()
==
null
?
""
:
CurrentUtil
.
getCliSource
();
String
source
=
CurrentUtil
.
getCliSource
()
==
null
?
""
:
CurrentUtil
.
getCliSource
();
String
version
=
CurrentUtil
.
getCliVersion
()
==
null
?
""
:
CurrentUtil
.
getCliVersion
();
String
version
=
CurrentUtil
.
getCliVersion
()
==
null
?
""
:
CurrentUtil
.
getCliVersion
();
...
@@ -333,6 +342,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -333,6 +342,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTickets
.
setExpressAddress
(
addressesVo
.
getAddress
());
orderTickets
.
setExpressAddress
(
addressesVo
.
getAddress
());
orderTickets
.
setExpressPhone
(
addressesVo
.
getPhone
());
orderTickets
.
setExpressPhone
(
addressesVo
.
getPhone
());
orderTickets
.
setGetTicketType
(
"express"
);
orderTickets
.
setGetTicketType
(
"express"
);
log
.
debug
(
"feign 获取入场人 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
}
else
{
}
else
{
orderTickets
.
setExpressContacts
(
""
);
orderTickets
.
setExpressContacts
(
""
);
orderTickets
.
setExpressAddress
(
""
);
orderTickets
.
setExpressAddress
(
""
);
...
@@ -421,7 +431,9 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -421,7 +431,9 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketEntitiesVo
.
setUpdatedAt
(
null
);
orderTicketEntitiesVo
.
setUpdatedAt
(
null
);
orderTicketEntitiesVo
.
setChangeDate
(
orderTicketEntities
.
getCreatedAt
());
orderTicketEntitiesVo
.
setChangeDate
(
orderTicketEntities
.
getCreatedAt
());
mongoTemplate
.
insert
(
orderTicketEntitiesVo
,
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
());
mongoTemplate
.
insert
(
orderTicketEntitiesVo
,
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
());
log
.
debug
(
"mongo 添加入场人 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
dataUtils
.
changeBuyInfo
(
orderTicketEntitiesVo
.
getUserId
(),
orderTicketEntitiesVo
.
getEnterIdCode
(),
orderTicketEntitiesVo
.
getPerformanceId
(),
orderTicketEntitiesVo
.
getTicketId
(),
1
);
dataUtils
.
changeBuyInfo
(
orderTicketEntitiesVo
.
getUserId
(),
orderTicketEntitiesVo
.
getEnterIdCode
(),
orderTicketEntitiesVo
.
getPerformanceId
(),
orderTicketEntitiesVo
.
getTicketId
(),
1
);
log
.
debug
(
"redis 修改 限购 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
}
}
}
else
{
}
else
{
for
(
int
i
=
0
;
i
<
payOrderParam
.
getNumber
();
i
++)
{
for
(
int
i
=
0
;
i
<
payOrderParam
.
getNumber
();
i
++)
{
...
@@ -457,7 +469,9 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -457,7 +469,9 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketEntitiesVo
.
setUpdatedAt
(
null
);
orderTicketEntitiesVo
.
setUpdatedAt
(
null
);
orderTicketEntitiesVo
.
setChangeDate
(
orderTicketEntities
.
getCreatedAt
());
orderTicketEntitiesVo
.
setChangeDate
(
orderTicketEntities
.
getCreatedAt
());
mongoTemplate
.
insert
(
orderTicketEntitiesVo
,
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
());
mongoTemplate
.
insert
(
orderTicketEntitiesVo
,
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
());
log
.
debug
(
"mongo 添加入场人 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
dataUtils
.
changeBuyInfo
(
orderTicketEntitiesVo
.
getUserId
(),
orderTicketEntitiesVo
.
getEnterIdCode
(),
orderTicketEntitiesVo
.
getPerformanceId
(),
orderTicketEntitiesVo
.
getTicketId
(),
1
);
dataUtils
.
changeBuyInfo
(
orderTicketEntitiesVo
.
getUserId
(),
orderTicketEntitiesVo
.
getEnterIdCode
(),
orderTicketEntitiesVo
.
getPerformanceId
(),
orderTicketEntitiesVo
.
getTicketId
(),
1
);
log
.
debug
(
"redis 修改限购 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
}
}
}
}
// 调用支付
// 调用支付
...
@@ -490,6 +504,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -490,6 +504,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
}
String
returnData
=
HttpUtil
.
post
(
payUrl
+
payOrderParam
.
getDeviceFrom
()
+
"/"
+
payOrderParam
.
getPayType
(),
httpData
);
String
returnData
=
HttpUtil
.
post
(
payUrl
+
payOrderParam
.
getDeviceFrom
()
+
"/"
+
payOrderParam
.
getPayType
(),
httpData
);
log
.
debug
(
"调用 PHP 支付 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
PayResultVo
payResultVo
=
JsonUtils
.
fromJson
(
returnData
,
PayResultVo
.
class
);
PayResultVo
payResultVo
=
JsonUtils
.
fromJson
(
returnData
,
PayResultVo
.
class
);
payResultVo
.
setOrder_id
(
orderTicketId
);
payResultVo
.
setOrder_id
(
orderTicketId
);
payResultVo
.
setPrice
(
orderTickets
.
getPriceActual
());
payResultVo
.
setPrice
(
orderTickets
.
getPriceActual
());
...
@@ -515,13 +530,16 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -515,13 +530,16 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketVo
.
setCreatedAt
(
orderTickets
.
getCreatedAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
orderTicketVo
.
setCreatedAt
(
orderTickets
.
getCreatedAt
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
orderTicketVo
.
setChangeDate
(
orderTickets
.
getCreatedAt
());
orderTicketVo
.
setChangeDate
(
orderTickets
.
getCreatedAt
());
mongoTemplate
.
insert
(
orderTicketVo
,
KylinOrderTicketVo
.
class
.
getSimpleName
());
mongoTemplate
.
insert
(
orderTicketVo
,
KylinOrderTicketVo
.
class
.
getSimpleName
());
log
.
debug
(
"mongo 添加 订单 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
mongoVoUtils
.
resetOrderListVo
(
uid
,
1
,
orderTicketVo
.
getOrderTicketsId
());
mongoVoUtils
.
resetOrderListVo
(
uid
,
1
,
orderTicketVo
.
getOrderTicketsId
());
log
.
debug
(
"redis 修改订单列表 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
// 执行sql
// 执行sql
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlsDataB
,
sqlsDataC
,
sqlsDataD
,
sqlsDataA
);
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlsDataB
,
sqlsDataC
,
sqlsDataD
,
sqlsDataA
);
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_CREADE
,
MQConst
.
ROUTING_KEY_SQL_ORDER_CREATE
,
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_CREADE
,
MQConst
.
ROUTING_KEY_SQL_ORDER_CREATE
,
sqlData
);
sqlData
);
log
.
debug
(
"MQ 发送 -> time:"
+(
System
.
currentTimeMillis
()-
currentTime
)+
"毫秒"
);
return
ResponseDto
.
success
(
payResultVo
);
return
ResponseDto
.
success
(
payResultVo
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
d46d3b1c
...
@@ -146,7 +146,8 @@ public class DataUtils {
...
@@ -146,7 +146,8 @@ public class DataUtils {
}
else
{
}
else
{
KylinPerformanceVo
performanceData
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
KylinPerformanceVo
performanceData
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
List
<
KylinPerformanceVo
>
roadList
=
new
ArrayList
();
List
<
KylinPerformanceVo
>
roadList
=
new
ArrayList
();
if
(
Integer
.
parseInt
(
performanceData
.
getRoadShowId
())
>
0
)
{
if
(
null
!=
performanceData
.
getRoadShowId
()
&&
Integer
.
parseInt
(
performanceData
.
getRoadShowId
())
>
0
)
{
roadList
=
dataUtils
.
getRoadList
(
performanceData
.
getRoadShowId
());
roadList
=
dataUtils
.
getRoadList
(
performanceData
.
getRoadShowId
());
}
}
redisUtil
.
set
(
KylinRedisConst
.
PERFORMANCES
+
performanceId
,
performanceData
);
redisUtil
.
set
(
KylinRedisConst
.
PERFORMANCES
+
performanceId
,
performanceData
);
...
@@ -311,9 +312,9 @@ public class DataUtils {
...
@@ -311,9 +312,9 @@ public class DataUtils {
//查询 mysql 数据
//查询 mysql 数据
KylinPerformanceVo
vo
;
KylinPerformanceVo
vo
;
if
(
null
==
paramVo
)
{
if
(
null
==
paramVo
)
{
vo
=
mongoVoUtils
.
combinePerformanceVoData
(
performanceIds
);
vo
=
mongoVoUtils
.
combinePerformanceVoData
(
performanceIds
);
}
else
{
}
else
{
vo
=
paramVo
;
vo
=
paramVo
;
}
}
if
(
vo
!=
null
)
{
if
(
vo
!=
null
)
{
try
{
try
{
...
...
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