记得上下班打卡 | 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
e0fa12dc
Commit
e0fa12dc
authored
Dec 12, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试 nft 同步订单
parent
88b1bf88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
WdtController.java
...uidnet/service/platform/controller/erp/WdtController.java
+2
-2
WdtServiceImpl.java
...net/service/platform/service/impl/erp/WdtServiceImpl.java
+14
-1
GoblinRedisUtils.java
...om/liquidnet/service/platform/utils/GoblinRedisUtils.java
+11
-1
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/erp/WdtController.java
View file @
e0fa12dc
...
...
@@ -37,9 +37,9 @@ public class WdtController {
@ApiOperation
(
"推送订单"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
tru
e
,
dataType
=
"String"
,
name
=
"orderId"
,
value
=
"orderId"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
fals
e
,
dataType
=
"String"
,
name
=
"orderId"
,
value
=
"orderId"
),
})
public
ResponseDto
<
Boolean
>
pushTrade
(
@RequestParam
(
value
=
"orderId"
)
String
orderId
)
{
public
ResponseDto
<
Boolean
>
pushTrade
(
@RequestParam
(
value
=
"orderId"
,
required
=
false
)
String
orderId
)
{
return
goblinErpService
.
pushTrade
(
orderId
);
}
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/erp/WdtServiceImpl.java
View file @
e0fa12dc
...
...
@@ -93,7 +93,9 @@ public class WdtServiceImpl implements IGoblinErpService {
}
}
else
{
int
pageSize
=
40
;
int
allCount
=
(
int
)
mongoTemplate
.
count
(
Query
.
query
(
Criteria
.
where
(
"erpHosting"
).
is
(
1
)),
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
//总条数
int
allCount
=
(
int
)
mongoTemplate
.
count
(
Query
.
query
(
Criteria
.
where
(
"erpHosting"
).
is
(
1
)
// .and("skuType").is("0")
),
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
//总条数
int
pageCount
=
(
allCount
/
pageSize
)
+
1
;
param
.
put
(
"page_size"
,
pageSize
+
""
);
for
(
int
i
=
0
;
i
<
pageCount
;
i
++)
{
...
...
@@ -181,6 +183,13 @@ public class WdtServiceImpl implements IGoblinErpService {
orderIdList
.
add
(
list
);
//todo 删除redis key
}
// List<String> list = CollectionUtil.arrayListString();
// for (int i = 0; i < contentSize; i++) {
// String orderId = goblinRedisUtils.erpLeftPop(i);
// list.add(orderId);
// }
// orderIdList.add(list);
}
else
{
List
<
String
>
a
=
CollectionUtil
.
arrayListString
();
a
.
add
(
singleId
);
...
...
@@ -199,6 +208,10 @@ public class WdtServiceImpl implements IGoblinErpService {
param
.
put
(
"trade_list"
,
JSON
.
toJSONString
(
listOrder
));
String
json
=
erpWdtClient
.
execute
(
ErpEnum
.
WdtAPI
.
TRADE_PUSH
.
getUri
(),
param
);
TradePushVo
data
=
JsonUtils
.
fromJson
(
json
,
TradePushVo
.
class
);
int
newCount
=
data
.
getNew_count
();
if
(
listOrder
.
size
()<
newCount
){
log
.
error
(
"同步 erp 失败 "
);
}
}
return
ResponseDto
.
success
();
}
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/GoblinRedisUtils.java
View file @
e0fa12dc
...
...
@@ -401,7 +401,7 @@ public class GoblinRedisUtils {
}
//
移除
erp订单
//
获取
erp订单
public
List
<
String
>
getRange
(
int
index
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
List
<
Object
>
list
=
getRedis
().
getRange
(
rdk
);
...
...
@@ -412,6 +412,16 @@ public class GoblinRedisUtils {
return
data
;
}
public
String
erpLeftPop
(
int
index
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
Object
obj
=
getRedis
().
leftPop
(
rdk
);
if
(
obj
==
null
){
return
null
;
}
else
{
return
(
String
)
obj
;
}
}
/* ---------------------------------------- ---------------------------------------- */
/* ---------------------------------------- ---------------------------------------- */
/* ---------------------------------------- ---------------------------------------- */
...
...
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