记得上下班打卡 | 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
2f4b79c8
Commit
2f4b79c8
authored
Jan 06, 2023
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 支出多店铺 erp
parent
730ff243
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
156 additions
and
173 deletions
+156
-173
IGoblinErpService.java
...m/liquidnet/service/goblin/service/IGoblinErpService.java
+2
-2
ErpWdtClient.java
...n/java/com/liquidnet/service/erp/config/ErpWdtClient.java
+3
-9
application-dev.yml
liquidnet-bus-config/liquidnet-config/application-dev.yml
+0
-15
application-test.yml
liquidnet-bus-config/liquidnet-config/application-test.yml
+0
-15
WdtController.java
...iquidnet/service/goblin/controller/erp/WdtController.java
+8
-5
WdtServiceImpl.java
...idnet/service/goblin/service/impl/erp/WdtServiceImpl.java
+110
-93
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+9
-9
GoblinNftOrderServiceImpl.java
...service/order/service/impl/GoblinNftOrderServiceImpl.java
+1
-1
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+1
-1
MixOrderServiceImpl.java
...idnet/service/order/service/impl/MixOrderServiceImpl.java
+2
-2
GoblinOrderUtils.java
...a/com/liquidnet/service/order/utils/GoblinOrderUtils.java
+10
-17
GoblinRedisUtils.java
...a/com/liquidnet/service/order/utils/GoblinRedisUtils.java
+10
-4
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinErpService.java
View file @
2f4b79c8
...
@@ -4,12 +4,12 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -4,12 +4,12 @@ import com.liquidnet.service.base.ResponseDto;
public
interface
IGoblinErpService
{
public
interface
IGoblinErpService
{
ResponseDto
<
Boolean
>
initErpStock
(
String
spuId
,
int
min
);
ResponseDto
<
Boolean
>
initErpStock
(
String
spuId
,
int
min
,
String
storeId
);
ResponseDto
<
Boolean
>
pushTrade
(
String
orderId
);
ResponseDto
<
Boolean
>
pushTrade
(
String
orderId
);
ResponseDto
<
Boolean
>
syncErpLogistic
();
ResponseDto
<
Boolean
>
syncErpLogistic
();
ResponseDto
<
Boolean
>
checkGoodsNo
(
String
specNo
,
String
goodsNo
);
ResponseDto
<
Boolean
>
checkGoodsNo
(
String
specNo
,
String
goodsNo
,
String
storeId
);
}
}
liquidnet-bus-common/liquident-common-erp/src/main/java/com/liquidnet/service/erp/config/ErpWdtClient.java
View file @
2f4b79c8
...
@@ -16,12 +16,6 @@ import java.util.*;
...
@@ -16,12 +16,6 @@ import java.util.*;
@Slf4j
@Slf4j
public
class
ErpWdtClient
{
public
class
ErpWdtClient
{
@Value
(
"${liquidnet.erp.wdt.api.appKey}"
)
private
String
appkey
;
@Value
(
"${liquidnet.erp.wdt.api.sid}"
)
private
String
sid
;
@Value
(
"${liquidnet.erp.wdt.api.appsecret}"
)
private
String
appSecret
;
@Value
(
"${liquidnet.erp.wdt.url}"
)
@Value
(
"${liquidnet.erp.wdt.url}"
)
private
String
baseUrl
;
private
String
baseUrl
;
...
@@ -67,12 +61,12 @@ public class ErpWdtClient {
...
@@ -67,12 +61,12 @@ public class ErpWdtClient {
return
length
;
return
length
;
}
}
public
String
execute
(
String
url
,
Map
<
String
,
String
>
param
)
{
public
String
execute
(
String
url
,
Map
<
String
,
String
>
param
,
String
appKey
,
String
sid
,
String
appSecret
)
{
MultiValueMap
<
String
,
String
>
header
=
CollectionUtil
.
linkedMultiValueMapStringString
();
MultiValueMap
<
String
,
String
>
header
=
CollectionUtil
.
linkedMultiValueMapStringString
();
header
.
add
(
"Accept"
,
"application/json;charset=UTF-8"
);
header
.
add
(
"Accept"
,
"application/json;charset=UTF-8"
);
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
param
.
put
(
"appkey"
,
this
.
appk
ey
);
param
.
put
(
"appkey"
,
appK
ey
);
param
.
put
(
"sid"
,
this
.
sid
);
param
.
put
(
"sid"
,
sid
);
param
.
put
(
"timestamp"
,
Long
.
toString
(
System
.
currentTimeMillis
()
/
1000
));
param
.
put
(
"timestamp"
,
Long
.
toString
(
System
.
currentTimeMillis
()
/
1000
));
param
.
put
(
"sign"
,
getErpSign
(
param
,
appSecret
));
param
.
put
(
"sign"
,
getErpSign
(
param
,
appSecret
));
params
.
setAll
(
param
);
params
.
setAll
(
param
);
...
...
liquidnet-bus-config/liquidnet-config/application-dev.yml
View file @
2f4b79c8
...
@@ -245,20 +245,5 @@ liquidnet:
...
@@ -245,20 +245,5 @@ liquidnet:
erp
:
erp
:
wdt
:
wdt
:
url
:
https://sandbox.wangdian.cn/openapi2/
url
:
https://sandbox.wangdian.cn/openapi2/
api
:
sid
:
apidevnew2
appKey
:
mdtk2-test
appsecret
:
09335107b
client
:
sid
:
apidevnew2
appKey
:
mdtk2-test
appsecret
:
292c3b92
store
:
shop_no
:
mdtk2-test
warehouse_no
:
mdtk2-test
platform_id
:
127
contentSize
:
50
redisSize
:
1
#application-dev-end
#application-dev-end
\ No newline at end of file
liquidnet-bus-config/liquidnet-config/application-test.yml
View file @
2f4b79c8
...
@@ -245,19 +245,4 @@ liquidnet:
...
@@ -245,19 +245,4 @@ liquidnet:
erp
:
erp
:
wdt
:
wdt
:
url
:
https://sandbox.wangdian.cn/openapi2/
url
:
https://sandbox.wangdian.cn/openapi2/
api
:
sid
:
apidevnew2
appKey
:
mdtk2-test
appsecret
:
09335107b
client
:
sid
:
apidevnew2
appKey
:
mdtk2-test
appsecret
:
292c3b92
store
:
shop_no
:
mdtk2-test
warehouse_no
:
mdtk2-test
platform_id
:
127
contentSize
:
50
redisSize
:
1
#application-test-end
#application-test-end
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/erp/WdtController.java
View file @
2f4b79c8
...
@@ -23,13 +23,15 @@ public class WdtController {
...
@@ -23,13 +23,15 @@ public class WdtController {
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"spuId"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"spuId"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"Integer"
,
name
=
"min"
,
value
=
"间隔时间"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"Integer"
,
name
=
"min"
,
value
=
"间隔时间"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺id"
),
})
})
public
ResponseDto
<
Boolean
>
initErpStock
(
@RequestParam
(
value
=
"spuId"
,
required
=
false
)
String
spuId
,
public
ResponseDto
<
Boolean
>
initErpStock
(
@RequestParam
(
value
=
"spuId"
,
required
=
false
)
String
spuId
,
@RequestParam
(
value
=
"min"
,
required
=
false
)
Integer
min
)
{
@RequestParam
(
value
=
"min"
,
required
=
false
)
Integer
min
,
@RequestParam
(
value
=
"storeId"
,
required
=
false
)
String
storeId
)
{
if
(
min
==
null
||
min
<=
0
)
{
if
(
min
==
null
||
min
<=
0
)
{
min
=
5
;
min
=
5
;
}
}
return
goblinErpService
.
initErpStock
(
spuId
,
min
);
return
goblinErpService
.
initErpStock
(
spuId
,
min
,
storeId
);
}
}
...
@@ -55,12 +57,13 @@ public class WdtController {
...
@@ -55,12 +57,13 @@ public class WdtController {
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spec_no"
,
value
=
"商家编码"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spec_no"
,
value
=
"商家编码"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"goods_no"
,
value
=
"货品编号"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"goods_no"
,
value
=
"货品编号"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"store_id"
,
value
=
"店铺id"
),
})
})
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
Boolean
>
checkGoodsNo
(
@RequestParam
(
value
=
"spec_no"
)
String
spec_no
,
public
ResponseDto
<
Boolean
>
checkGoodsNo
(
@RequestParam
(
value
=
"spec_no"
)
String
spec_no
,
@RequestParam
(
value
=
"goods_no"
)
String
goods_no
)
{
@RequestParam
(
value
=
"goods_no"
)
String
goods_no
,
return
goblinErpService
.
checkGoodsNo
(
spec_no
,
goods_no
);
@RequestParam
(
value
=
"store_id"
)
String
store_id
)
{
return
goblinErpService
.
checkGoodsNo
(
spec_no
,
goods_no
,
store_id
);
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/erp/WdtServiceImpl.java
View file @
2f4b79c8
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
2f4b79c8
...
@@ -2901,26 +2901,26 @@ public class GoblinRedisUtils {
...
@@ -2901,26 +2901,26 @@ public class GoblinRedisUtils {
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
List
<
Object
>
list
=
redisUtil
.
getRange
(
rdk
);
List
<
Object
>
list
=
redisUtil
.
getRange
(
rdk
);
List
<
String
>
data
=
CollectionUtil
.
arrayListString
();
List
<
String
>
data
=
CollectionUtil
.
arrayListString
();
for
(
Object
str
:
list
)
{
for
(
Object
str
:
list
)
{
data
.
add
((
String
)
str
);
data
.
add
((
String
)
str
);
}
}
return
data
;
return
data
;
}
}
public
String
erpLeftPop
(
int
index
)
{
public
String
erpLeftPop
(
String
shopNo
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
shopNo
);
Object
obj
=
redisUtil
.
leftPop
(
rdk
);
Object
obj
=
redisUtil
.
leftPop
(
rdk
);
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
return
null
;
return
null
;
}
else
{
}
else
{
return
(
String
)
obj
;
return
(
String
)
obj
;
}
}
}
}
//添加erp订单
//添加erp订单
public
int
erpAdd
Push
(
int
index
,
String
orderId
)
{
public
int
erpAdd
ErrorPush
(
String
shopNo
,
String
orderId
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
"error:"
+
shopNo
);
return
(
int
)
redisUtil
.
rightPush
(
rdk
,
orderId
);
return
(
int
)
redisUtil
.
rightPush
(
rdk
,
orderId
);
}
}
/* ---------------------------------------- ---------------------------------------- */
/* ---------------------------------------- ---------------------------------------- */
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinNftOrderServiceImpl.java
View file @
2f4b79c8
...
@@ -748,7 +748,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
...
@@ -748,7 +748,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
String
uid
=
orderVo
.
getUserId
();
String
uid
=
orderVo
.
getUserId
();
Integer
orderStatusOld
=
orderVo
.
getStatus
();
Integer
orderStatusOld
=
orderVo
.
getStatus
();
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
goblinOrderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
());
goblinOrderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
()
,
orderVo
.
getStoreId
()
);
// 更新订单信息
// 更新订单信息
if
(
StringUtil
.
isEmpty
(
syncOrderParam
.
getPaymentType
()))
{
if
(
StringUtil
.
isEmpty
(
syncOrderParam
.
getPaymentType
()))
{
orderVo
.
setPaymentType
(
""
);
orderVo
.
setPaymentType
(
""
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
2f4b79c8
...
@@ -831,7 +831,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -831,7 +831,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
());
orderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
()
,
orderVo
.
getStoreId
()
);
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/service/impl/MixOrderServiceImpl.java
View file @
2f4b79c8
...
@@ -640,7 +640,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
...
@@ -640,7 +640,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
log
.
error
(
"Mix订单Id为 {} 的订单正在退款 或者已退款"
,
orderId
);
log
.
error
(
"Mix订单Id为 {} 的订单正在退款 或者已退款"
,
orderId
);
}
else
if
(
status
==
1
)
{
}
else
if
(
status
==
1
)
{
log
.
error
(
"Mix订单Id {} 的订单正常流程"
,
orderId
);
log
.
error
(
"Mix订单Id {} 的订单正常流程"
,
orderId
);
orderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
());
orderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
()
,
orderVo
.
getStoreId
()
);
storeOrder
.
setPaymentType
(
paymentType
);
storeOrder
.
setPaymentType
(
paymentType
);
storeOrder
.
setPaymentId
(
paymentId
);
storeOrder
.
setPaymentId
(
paymentId
);
storeOrder
.
setPayCode
(
code
);
storeOrder
.
setPayCode
(
code
);
...
@@ -736,7 +736,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
...
@@ -736,7 +736,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
String
uid
=
orderVo
.
getUserId
();
String
uid
=
orderVo
.
getUserId
();
Integer
orderStatusOld
=
orderVo
.
getStatus
();
Integer
orderStatusOld
=
orderVo
.
getStatus
();
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
orderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
());
orderUtils
.
addErpPush
(
orderVo
.
getOrderId
(),
orderVo
.
getErpHosting
()
,
orderVo
.
getStoreId
()
);
// 更新订单信息
// 更新订单信息
if
(
StringUtil
.
isEmpty
(
paymentType
))
{
if
(
StringUtil
.
isEmpty
(
paymentType
))
{
orderVo
.
setPaymentType
(
""
);
orderVo
.
setPaymentType
(
""
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinOrderUtils.java
View file @
2f4b79c8
...
@@ -39,10 +39,6 @@ public class GoblinOrderUtils {
...
@@ -39,10 +39,6 @@ public class GoblinOrderUtils {
private
String
candyUrl
;
private
String
candyUrl
;
@Value
(
"${liquidnet.service.order.url-pay.goblinRefundUrl}"
)
@Value
(
"${liquidnet.service.order.url-pay.goblinRefundUrl}"
)
private
String
synUrl
;
private
String
synUrl
;
@Value
(
"${liquidnet.erp.wdt.contentSize}"
)
private
int
contentSize
;
@Value
(
"${liquidnet.erp.wdt.redisSize}"
)
private
int
redisSize
;
@Autowired
@Autowired
private
IDragonOrderRefundsService
dragonOrderRefundsService
;
private
IDragonOrderRefundsService
dragonOrderRefundsService
;
...
@@ -256,8 +252,8 @@ public class GoblinOrderUtils {
...
@@ -256,8 +252,8 @@ public class GoblinOrderUtils {
GoblinUseResultVo
returnVo
=
GoblinUseResultVo
.
getNew
();
GoblinUseResultVo
returnVo
=
GoblinUseResultVo
.
getNew
();
List
<
CouponOutLineVo
>
couponList
=
redisUtils
.
getOutLineCoupon
();
List
<
CouponOutLineVo
>
couponList
=
redisUtils
.
getOutLineCoupon
();
boolean
isOutLine
=
false
;
boolean
isOutLine
=
false
;
for
(
CouponOutLineVo
data:
couponList
)
{
for
(
CouponOutLineVo
data
:
couponList
)
{
if
(
data
.
getStoreCouponId
().
equals
(
ucouponId
))
{
if
(
data
.
getStoreCouponId
().
equals
(
ucouponId
))
{
isOutLine
=
true
;
isOutLine
=
true
;
BigDecimal
tempPrice
=
totalPrice
.
subtract
(
totalPrice
.
multiply
(
BigDecimal
.
valueOf
(
data
.
getDiscount
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_DOWN
));
BigDecimal
tempPrice
=
totalPrice
.
subtract
(
totalPrice
.
multiply
(
BigDecimal
.
valueOf
(
data
.
getDiscount
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_DOWN
));
returnVo
.
setSpuIds
(
CollectionUtil
.
linkedListString
());
returnVo
.
setSpuIds
(
CollectionUtil
.
linkedListString
());
...
@@ -265,7 +261,7 @@ public class GoblinOrderUtils {
...
@@ -265,7 +261,7 @@ public class GoblinOrderUtils {
returnVo
.
setCouType
(
data
.
getCouType
());
returnVo
.
setCouType
(
data
.
getCouType
());
}
}
}
}
if
(
isOutLine
)
{
if
(
isOutLine
)
{
return
returnVo
;
return
returnVo
;
}
}
try
{
try
{
...
@@ -571,18 +567,15 @@ public class GoblinOrderUtils {
...
@@ -571,18 +567,15 @@ public class GoblinOrderUtils {
}
}
public
void
addErpPush
(
String
orderId
,
int
erpHosting
)
{
public
void
addErpPush
(
String
orderId
,
int
erpHosting
,
String
storeId
)
{
if
(
erpHosting
==
0
)
{
if
(
erpHosting
==
0
)
{
}
else
{
}
else
{
redisUtils
.
erpAddPush
(
0
,
orderId
);
GoblinStoreErpConfigVo
vo
=
redisUtils
.
getStoreErpConfigVoByStoreId
(
storeId
);
// for (int i = 0; i < redisSize; i++) {
if
(
vo
==
null
||
vo
.
getShopNo
().
equals
(
""
))
{
// boolean isFull = redisUtils.erpAddPush(i, orderId) > contentSize;
// if (isFull) {
}
else
{
// redisUtils.erpPopPush(i);
redisUtils
.
erpAddPush
(
vo
.
getShopNo
(),
orderId
);
// } else {
}
// break;
// }
// }
}
}
}
}
}
}
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinRedisUtils.java
View file @
2f4b79c8
...
@@ -746,14 +746,20 @@ public class GoblinRedisUtils {
...
@@ -746,14 +746,20 @@ public class GoblinRedisUtils {
//添加erp订单
//添加erp订单
public
int
erpAddPush
(
int
index
,
String
orderId
)
{
public
int
erpAddPush
(
String
shopNo
,
String
orderId
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
shopNo
);
return
(
int
)
redisUtil
.
rightPush
(
rdk
,
orderId
);
return
(
int
)
redisUtil
.
rightPush
(
rdk
,
orderId
);
}
}
//移除erp订单
//移除erp订单
public
String
erpPopPush
(
int
index
)
{
public
String
erpPopPush
(
String
shopNo
)
{
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
index
+
""
);
String
rdk
=
GoblinRedisConst
.
ERP_GOBLIN_GOODS_LIST
.
concat
(
shopNo
);
return
(
String
)
redisUtil
.
rightPop
(
rdk
);
return
(
String
)
redisUtil
.
rightPop
(
rdk
);
}
}
public
GoblinStoreErpConfigVo
getStoreErpConfigVoByStoreId
(
String
storeId
)
{
String
rk
=
GoblinRedisConst
.
BASIC_STORE_ERP_CONF
.
concat
(
storeId
);
GoblinStoreErpConfigVo
vo
=
(
GoblinStoreErpConfigVo
)
redisUtil
.
get
(
rk
);
return
vo
;
}
}
}
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