记得上下班打卡 | 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
70d055ee
Commit
70d055ee
authored
Jun 26, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 admin 退款 订单列表bug
parent
2bdbb061
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
MongoVoUtils.java
...idnet/client/admin/zhengzai/kylin/utils/MongoVoUtils.java
+13
-10
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/utils/MongoVoUtils.java
View file @
70d055ee
...
...
@@ -161,24 +161,27 @@ public class MongoVoUtils {
* @param type 1新增 2修改
* @param orderId 订单id [需要新增或者修改的订单id]
*/
public
Boolean
resetOrderListVo
(
String
userId
,
Integer
type
,
String
orderId
,
KylinOrderTicketVo
dataSingle
)
{
public
Boolean
resetOrderListVo
(
String
userId
,
Integer
type
,
String
orderId
,
KylinOrderTicketVo
dataSingle
)
{
List
<
KylinOrderListVo
>
vo
=
new
ArrayList
<>();
List
<
KylinOrderListVo
>
redisVo
=
new
ArrayList
();
KylinOrderListVo
voItem
=
new
KylinOrderListVo
();
KylinOrderTicketVo
data
;
if
(
dataSingle
==
null
)
{
data
=
dataUtils
.
getOrderTicketVo
(
orderId
);
data
=
(
KylinOrderTicketVo
)
redisUtil
.
get
(
KylinRedisConst
.
ORDER
+
orderId
);
}
else
{
data
=
dataSingle
;
}
BeanUtils
.
copyProperties
(
data
,
voItem
);
redisVo
.
add
(
voItem
);
List
<
KylinOrderListVo
>
redisData
=
dataUtils
.
getOrderList
(
userId
);
if
(
redisData
.
size
()
>
0
)
{
if
(
redisData
.
get
(
0
).
getOrderTicketsId
().
equals
(
orderId
))
{
redisData
.
remove
(
0
);
List
<
KylinOrderListVo
>
redisData
=
(
List
<
KylinOrderListVo
>)
redisUtil
.
get
(
KylinRedisConst
.
ORDER_LIST
+
userId
);
if
(
type
==
1
)
{
redisVo
.
add
(
voItem
);
if
(
redisData
.
size
()
>
0
)
{
if
(
redisData
.
get
(
0
).
getOrderTicketsId
().
equals
(
orderId
))
{
redisData
.
remove
(
0
);
}
}
}
redisVo
.
addAll
(
redisData
);
switch
(
type
)
{
...
...
@@ -190,13 +193,13 @@ public class MongoVoUtils {
if
(
i
==
0
)
{
vo
.
add
(
voItem
);
}
else
{
vo
.
add
(
redisVo
.
get
(
i
-
1
));
vo
.
add
(
redisVo
.
get
(
i
));
}
}
if
(
redisVo
.
size
()
==
0
)
{
vo
.
add
(
voItem
);
}
dataUtils
.
setOrderList
(
userId
,
vo
);
redisUtil
.
set
(
KylinRedisConst
.
ORDER_LIST
+
userId
,
vo
);
return
true
;
case
2
:
for
(
int
i
=
0
;
i
<
redisVo
.
size
();
i
++)
{
...
...
@@ -209,7 +212,7 @@ public class MongoVoUtils {
vo
.
add
(
redisVo
.
get
(
i
));
}
}
dataUtils
.
setOrderList
(
userId
,
vo
);
redisUtil
.
set
(
KylinRedisConst
.
ORDER_LIST
+
userId
,
vo
);
return
true
;
default
:
return
false
;
...
...
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