记得上下班打卡 | 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
2d366b3c
Commit
2d366b3c
authored
Dec 09, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp 添加订单
parent
cc290cf3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
1 deletion
+81
-1
GoblinRedisConst.java
...m/liquidnet/service/goblin/constant/GoblinRedisConst.java
+3
-0
AbstractRedisUtil.java
....liquidnet.common.cache/redis/util/AbstractRedisUtil.java
+39
-1
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+1
-0
GoblinOrderUtils.java
...a/com/liquidnet/service/order/utils/GoblinOrderUtils.java
+19
-0
GoblinRedisUtils.java
...a/com/liquidnet/service/order/utils/GoblinRedisUtils.java
+19
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinRedisConst.java
View file @
2d366b3c
...
@@ -392,6 +392,9 @@ public class GoblinRedisConst {
...
@@ -392,6 +392,9 @@ public class GoblinRedisConst {
public
static
final
String
NFT_TRANSFER_CONF_AGAIN
=
PREFIX
.
concat
(
"nft_trans_conf_again"
);
public
static
final
String
NFT_TRANSFER_CONF_AGAIN
=
PREFIX
.
concat
(
"nft_trans_conf_again"
);
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
public
static
final
String
ERP_GOBLIN_GOODS_LIST
=
PREFIX
.
concat
(
"erp:push:order:"
);
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
...
...
liquidnet-bus-common/liquidnet-common-cache/liquidnet-common-cache-redis/src/main/java/com.liquidnet.common.cache/redis/util/AbstractRedisUtil.java
View file @
2d366b3c
...
@@ -768,10 +768,48 @@ public abstract class AbstractRedisUtil {
...
@@ -768,10 +768,48 @@ public abstract class AbstractRedisUtil {
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
delete
(
key
);
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
delete
(
key
);
}
}
/**
* list 末尾添加
* @param key
*/
public
long
rightPush
(
String
key
,
Object
value
)
{
key
=
this
.
fillingKey
(
key
);
return
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
opsForList
().
rightPush
(
key
,
value
);
}
/**
* list 头部获取
* @param key
*/
public
Object
rightPop
(
String
key
)
{
key
=
this
.
fillingKey
(
key
);
return
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
opsForList
().
rightPop
(
key
);
}
/**
* list 头部获取
* @param key
*/
public
Object
leftPop
(
String
key
)
{
key
=
this
.
fillingKey
(
key
);
return
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
opsForList
().
leftPop
(
key
);
}
/**
* list 长度
* @param key
*/
public
long
listSize
(
String
key
)
{
key
=
this
.
fillingKey
(
key
);
return
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
opsForList
().
size
(
key
);
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
[]
keys
=
{
String
[]
keys
=
{
"kylin:order:id:302739831268147207565446"
"test:goblin:erp:push:order:0"
,
"test:goblin:erp:push:order:1"
,
"test:goblin:erp:push:order:2"
,
};
};
for
(
String
key
:
keys
)
{
for
(
String
key
:
keys
)
{
long
value
=
key
.
hashCode
();
long
value
=
key
.
hashCode
();
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
2d366b3c
...
@@ -817,6 +817,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -817,6 +817,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
log
.
error
(
"订单号为 {} 的订单正在退款 或者已退款"
,
syncOrderParam
.
getOrderCode
());
log
.
error
(
"订单号为 {} 的订单正在退款 或者已退款"
,
syncOrderParam
.
getOrderCode
());
}
else
if
(
syncOrderParam
.
getStatus
().
equals
(
1
)
&&
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_0
.
getValue
())
{
}
else
if
(
syncOrderParam
.
getStatus
().
equals
(
1
)
&&
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_0
.
getValue
())
{
log
.
error
(
"订单号为 {} 的订单正常流程"
,
syncOrderParam
.
getOrderCode
());
log
.
error
(
"订单号为 {} 的订单正常流程"
,
syncOrderParam
.
getOrderCode
());
orderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
());
storeOrder
.
setPaymentType
(
syncOrderParam
.
getPaymentType
());
storeOrder
.
setPaymentType
(
syncOrderParam
.
getPaymentType
());
storeOrder
.
setPaymentId
(
syncOrderParam
.
getPaymentId
());
storeOrder
.
setPaymentId
(
syncOrderParam
.
getPaymentId
());
storeOrder
.
setPayCode
(
syncOrderParam
.
getCode
());
storeOrder
.
setPayCode
(
syncOrderParam
.
getCode
());
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinOrderUtils.java
View file @
2d366b3c
...
@@ -551,4 +551,23 @@ public class GoblinOrderUtils {
...
@@ -551,4 +551,23 @@ public class GoblinOrderUtils {
public
boolean
noZhengzaiOrder
(
String
uid
)
{
public
boolean
noZhengzaiOrder
(
String
uid
)
{
return
!
uid
.
equals
(
"zhengzai"
);
return
!
uid
.
equals
(
"zhengzai"
);
}
}
public
void
addErpPush
(
String
orderId
,
int
erpHosting
)
{
int
contentSize
=
5
;
int
redisSize
=
255
;
if
(
erpHosting
==
0
)
{
}
else
{
for
(
int
i
=
0
;
i
<
redisSize
;
i
++)
{
// log.error("i:{},add:{}",i,orderId);
boolean
isFull
=
redisUtils
.
erpAddPush
(
i
,
orderId
)
>
contentSize
;
if
(
isFull
)
{
redisUtils
.
erpPopPush
(
i
);
// log.error("i:{},remove:{}",i,redisUtils.erpPopPush(i));
}
else
{
break
;
}
}
}
}
}
}
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinRedisUtils.java
View file @
2d366b3c
...
@@ -734,4 +734,23 @@ public class GoblinRedisUtils {
...
@@ -734,4 +734,23 @@ public class GoblinRedisUtils {
return
BigDecimal
.
valueOf
((
int
)
obj
);
return
BigDecimal
.
valueOf
((
int
)
obj
);
}
}
}
}
//添加erp订单
public
int
erpAddPush
(
int
index
,
String
orderId
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
return
(
int
)
redisUtil
.
rightPush
(
rdk
,
orderId
);
}
//添加erp订单
public
String
erpPopPush
(
int
index
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
return
(
String
)
redisUtil
.
rightPop
(
rdk
);
}
//获取erp订单长度
public
int
erpPushSize
(
int
index
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
return
(
int
)
redisUtil
.
listSize
(
rdk
);
}
}
}
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