记得上下班打卡 | 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
9f0c5ad1
Commit
9f0c5ad1
authored
Dec 30, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
7bc16ba2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
120 additions
and
31 deletions
+120
-31
GoblinMarketSpuListVo.java
...iquidnet/service/goblin/dto/vo/GoblinMarketSpuListVo.java
+34
-0
GoblinStoreMarketIsConfigVo.java
...et/service/goblin/dto/vo/GoblinStoreMarketIsConfigVo.java
+27
-0
IGoblinStorePurchasingService.java
.../goblin/service/manage/IGoblinStorePurchasingService.java
+3
-2
RedisUtil.java
...java/com.liquidnet.common.cache/redis/util/RedisUtil.java
+3
-3
GoblinStorePurchasingController.java
...in/controller/manage/GoblinStorePurchasingController.java
+6
-9
GoblinStorePurchasingServiceImpl.java
...service/impl/manage/GoblinStorePurchasingServiceImpl.java
+27
-10
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+15
-7
ObjectUtil.java
...in/java/com/liquidnet/service/goblin/util/ObjectUtil.java
+5
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinMarketSpuListVo.java
0 → 100644
View file @
9f0c5ad1
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
@ApiModel
(
value
=
"GoblinStoreMarketRelationVo"
,
description
=
"前端用 商铺活动 关联 spu sku"
)
@Data
public
class
GoblinMarketSpuListVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
2353354057235207502L
;
@ApiModelProperty
(
position
=
11
,
value
=
"spuId"
)
private
String
marketSpuId
;
@ApiModelProperty
(
position
=
12
,
value
=
"封面图片地址"
)
private
String
coverPic
;
@ApiModelProperty
(
position
=
12
,
value
=
"价格区间MIN[20,2]"
)
private
BigDecimal
priceGe
;
@ApiModelProperty
(
position
=
12
,
value
=
"价格区间MAX[20,2]"
)
private
BigDecimal
priceLe
;
@ApiModelProperty
(
position
=
12
,
value
=
"商品名称"
)
private
String
name
;
private
static
final
GoblinMarketSpuListVo
obj
=
new
GoblinMarketSpuListVo
();
public
static
GoblinMarketSpuListVo
getNew
()
{
try
{
return
(
GoblinMarketSpuListVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinMarketSpuListVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinStoreMarketIsConfigVo.java
0 → 100644
View file @
9f0c5ad1
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@ApiModel
(
value
=
"GoblinStoreMarketRelationVo"
,
description
=
"前端用 商铺活动 关联 spu sku"
)
@Data
public
class
GoblinStoreMarketIsConfigVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
2353354057235207502L
;
@ApiModelProperty
(
position
=
11
,
value
=
"spuId"
)
private
String
spuId
;
@ApiModelProperty
(
position
=
12
,
value
=
"spuId 活动"
)
private
String
marketSpuId
;
private
static
final
GoblinStoreMarketIsConfigVo
obj
=
new
GoblinStoreMarketIsConfigVo
();
public
static
GoblinStoreMarketIsConfigVo
getNew
()
{
try
{
return
(
GoblinStoreMarketIsConfigVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinStoreMarketIsConfigVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinStorePurchasingService.java
View file @
9f0c5ad1
...
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
...
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMarketSpuListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -66,13 +67,13 @@ public interface IGoblinStorePurchasingService {
...
@@ -66,13 +67,13 @@ public interface IGoblinStorePurchasingService {
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
String
marketId
,
String
storeId
);
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
String
marketId
,
String
storeId
);
/**
/**
* 获取活动内s
k
u列表
* 获取活动内s
p
u列表
*
*
* @param marketId 活动秒杀id
* @param marketId 活动秒杀id
* @param page 页数
* @param page 页数
* @return
* @return
*/
*/
ResponseDto
<
String
>
purchasingSkuList
(
String
marketId
,
String
storeId
,
int
page
);
//TODO 返回值
ResponseDto
<
List
<
GoblinMarketSpuListVo
>>
purchasingSpuList
(
String
marketId
,
String
storeId
,
int
page
);
/**
/**
* 添加活动相关sku
* 添加活动相关sku
...
...
liquidnet-bus-common/liquidnet-common-cache/liquidnet-common-cache-redis/src/main/java/com.liquidnet.common.cache/redis/util/RedisUtil.java
View file @
9f0c5ad1
...
@@ -17,7 +17,7 @@ import org.springframework.stereotype.Component;
...
@@ -17,7 +17,7 @@ import org.springframework.stereotype.Component;
*/
*/
@Slf4j
@Slf4j
@Component
(
"redisUtil"
)
@Component
(
"redisUtil"
)
public
final
class
RedisUtil
extends
AbstractRedisUtil
{
public
final
class
RedisUtil
extends
AbstractRedisUtil
{
@Autowired
@Autowired
private
RedisConfig
redisConfig
;
private
RedisConfig
redisConfig
;
...
@@ -34,8 +34,8 @@ public final class RedisUtil extends AbstractRedisUtil{
...
@@ -34,8 +34,8 @@ public final class RedisUtil extends AbstractRedisUtil{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
[]
keys
=
{
String
[]
keys
=
{
"s
tone:user:773650
"
,
"s
weet:luckDraw:num:20211230:surplus
"
,
"s
tone:item:logs:list:773650
"
"s
weet:luckDraw:num:20211230:all
"
};
};
for
(
String
key
:
keys
)
{
for
(
String
key
:
keys
)
{
long
value
=
key
.
hashCode
();
long
value
=
key
.
hashCode
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStorePurchasingController.java
View file @
9f0c5ad1
...
@@ -3,13 +3,10 @@ package com.liquidnet.service.goblin.controller.manage;
...
@@ -3,13 +3,10 @@ package com.liquidnet.service.goblin.controller.manage;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseParam
;
import
com.liquidnet.service.goblin.dto.vo.GoblinPurchasingVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMarketSpuListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinStoreInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo
;
import
com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService
;
import
com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -91,7 +88,7 @@ public class GoblinStorePurchasingController {
...
@@ -91,7 +88,7 @@ public class GoblinStorePurchasingController {
return
goblinStorePurchasingService
.
purchasingDetails
(
marketId
,
storeId
);
return
goblinStorePurchasingService
.
purchasingDetails
(
marketId
,
storeId
);
}
}
@GetMapping
(
"purchasing/s
k
u"
)
@GetMapping
(
"purchasing/s
p
u"
)
@ApiOperation
(
"活动详情-限时秒杀-sku列表"
)
@ApiOperation
(
"活动详情-限时秒杀-sku列表"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -99,10 +96,10 @@ public class GoblinStorePurchasingController {
...
@@ -99,10 +96,10 @@ public class GoblinStorePurchasingController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"商铺id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"商铺id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
example
=
"1"
),
})
})
public
ResponseDto
<
String
>
purchasingSk
uList
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
public
ResponseDto
<
List
<
GoblinMarketSpuListVo
>>
purchasingSp
uList
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"page"
)
@Valid
Integer
page
)
{
@RequestParam
(
"page"
)
@Valid
Integer
page
)
{
return
goblinStorePurchasingService
.
purchasingS
k
uList
(
marketId
,
storeId
,
page
);
return
goblinStorePurchasingService
.
purchasingS
p
uList
(
marketId
,
storeId
,
page
);
}
}
@PostMapping
(
"purchasing/sku"
)
@PostMapping
(
"purchasing/sku"
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStorePurchasingServiceImpl.java
View file @
9f0c5ad1
...
@@ -10,15 +10,13 @@ import com.liquidnet.service.base.constant.MQConst;
...
@@ -10,15 +10,13 @@ import com.liquidnet.service.base.constant.MQConst;
import
com.liquidnet.service.goblin.constant.GoblinStatusConst
;
import
com.liquidnet.service.goblin.constant.GoblinStatusConst
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.*
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMarketRelationVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo
;
import
com.liquidnet.service.goblin.entity.GoblinStoreMarketPurchasing
;
import
com.liquidnet.service.goblin.entity.GoblinStoreMarketPurchasing
;
import
com.liquidnet.service.goblin.entity.GoblinStoreMarketing
;
import
com.liquidnet.service.goblin.entity.GoblinStoreMarketing
;
import
com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService
;
import
com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService
;
import
com.liquidnet.service.goblin.util.GoblinMongoUtils
;
import
com.liquidnet.service.goblin.util.GoblinMongoUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.util.ObjectUtil
;
import
com.liquidnet.service.goblin.util.QueueUtils
;
import
com.liquidnet.service.goblin.util.QueueUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -28,6 +26,7 @@ import java.time.LocalDateTime;
...
@@ -28,6 +26,7 @@ import java.time.LocalDateTime;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
...
@@ -165,10 +164,28 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -165,10 +164,28 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
}
}
@Override
@Override
public
ResponseDto
<
String
>
purchasingSkuList
(
String
marketId
,
String
storeId
,
int
page
)
{
public
ResponseDto
<
List
<
GoblinMarketSpuListVo
>>
purchasingSpuList
(
String
marketId
,
String
storeId
,
int
page
)
{
List
<
String
>
spuIds
=
goblinRedisUtils
.
getStoreMarketIsConfig
(
marketId
,
storeId
);
int
size
=
20
;
List
<
GoblinStoreMarketIsConfigVo
>
spuIds
=
goblinRedisUtils
.
getStoreMarketIsConfig
(
marketId
,
storeId
);
return
null
;
List
<
String
>
marketSpuList
=
spuIds
.
stream
().
map
(
GoblinStoreMarketIsConfigVo:
:
getMarketSpuId
).
collect
(
Collectors
.
toList
());
List
<
GoblinMarketSpuListVo
>
voList
=
ObjectUtil
.
getGoblinMarketSpuListVoArrayList
();
int
count
=
page
*
40
;
int
startCount
=
(
page
-
1
)
*
40
;
if
(
count
>=
marketSpuList
.
size
())
{
count
=
marketSpuList
.
size
();
}
for
(
int
i
=
startCount
;
i
<
count
;
i
++)
{
GoblinMarketSpuListVo
vo
=
GoblinMarketSpuListVo
.
getNew
();
String
marketSpuId
=
marketSpuList
.
get
(
i
);
GoblinGoodsInfoVo
spuVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
marketSpuId
);
vo
.
setMarketSpuId
(
marketSpuId
);
vo
.
setCoverPic
(
spuVo
.
getCoverPic
());
vo
.
setName
(
spuVo
.
getName
());
vo
.
setPriceGe
(
spuVo
.
getPriceGe
());
vo
.
setPriceLe
(
spuVo
.
getPriceLe
());
voList
.
add
(
vo
);
}
return
ResponseDto
.
success
(
voList
);
}
}
@Override
@Override
...
@@ -226,7 +243,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -226,7 +243,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinRedisUtils
.
setGoodsInfoVo
(
spuVo
);
goblinRedisUtils
.
setGoodsInfoVo
(
spuVo
);
relationVo
.
setSkuList
(
skuList
);
relationVo
.
setSkuList
(
skuList
);
goblinRedisUtils
.
addMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
(),
params
.
getStoreMarketId
(),
relationVo
);
goblinRedisUtils
.
addMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
(),
params
.
getStoreMarketId
(),
relationVo
);
goblinRedisUtils
.
addStoreMarketIsConfig
(
params
.
getStoreMarketId
(),
params
.
getStoreId
(),
params
.
getSpuId
(),
marketSpuId
);
goblinRedisUtils
.
addStoreMarketIsConfig
(
params
.
getStoreMarketId
(),
params
.
getStoreId
(),
params
.
getSpuId
(),
marketSpuId
);
// 执行sql
// 执行sql
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlsData
);
String
sqlData
=
SqlMapping
.
gets
(
sqls
,
sqlsData
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
...
@@ -291,7 +308,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -291,7 +308,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
//redis
//redis
goblinRedisUtils
.
delGoodsInfoVo
(
marketSpuId
);
goblinRedisUtils
.
delGoodsInfoVo
(
marketSpuId
);
goblinRedisUtils
.
removeMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
(),
marketId
,
spuId
);
goblinRedisUtils
.
removeMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
(),
marketId
,
spuId
);
goblinRedisUtils
.
delStoreMarketIsConfig
(
marketId
,
storeId
,
spuId
,
marketSpuId
);
goblinRedisUtils
.
delStoreMarketIsConfig
(
marketId
,
storeId
,
spuId
,
marketSpuId
);
//mysql
//mysql
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
SqlMapping
.
get
(
"goblin.store.market.delSpuRelation"
,
bean
.
getDelFlag
(),
bean
.
getUpdatedAt
(),
marketId
,
storeId
,
spuId
));
SqlMapping
.
get
(
"goblin.store.market.delSpuRelation"
,
bean
.
getDelFlag
(),
bean
.
getUpdatedAt
(),
marketId
,
storeId
,
spuId
));
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
9f0c5ad1
...
@@ -119,27 +119,35 @@ public class GoblinRedisUtils {
...
@@ -119,27 +119,35 @@ public class GoblinRedisUtils {
* @param marketId
* @param marketId
* @param storeId
* @param storeId
*/
*/
public
List
<
String
>
getStoreMarketIsConfig
(
String
marketId
,
String
storeId
)
{
public
List
<
GoblinStoreMarketIsConfigVo
>
getStoreMarketIsConfig
(
String
marketId
,
String
storeId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
return
CollectionUtil
.
arrayListString
();
return
new
ArrayList
();
}
else
{
}
else
{
return
(
List
<
String
>)
obj
;
return
(
List
<
GoblinStoreMarketIsConfigVo
>)
obj
;
}
}
}
}
public
void
addStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
,
String
marketSpuId
)
{
public
void
addStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
,
String
marketSpuId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
List
<
String
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
List
<
GoblinStoreMarketIsConfigVo
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
voList
.
add
(
spuId
+
","
+
marketSpuId
);
GoblinStoreMarketIsConfigVo
vo
=
GoblinStoreMarketIsConfigVo
.
getNew
();
vo
.
setMarketSpuId
(
marketSpuId
);
vo
.
setSpuId
(
spuId
);
voList
.
add
(
vo
);
redisUtil
.
set
(
redisKey
,
voList
);
redisUtil
.
set
(
redisKey
,
voList
);
}
}
public
void
delStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
,
String
marketSpuId
)
{
public
void
delStoreMarketIsConfig
(
String
marketId
,
String
storeId
,
String
spuId
,
String
marketSpuId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET_ISCONFIG
.
concat
(
marketId
).
concat
(
":store_id:"
+
storeId
);
List
<
String
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
List
<
GoblinStoreMarketIsConfigVo
>
voList
=
getStoreMarketIsConfig
(
marketId
,
storeId
);
voList
.
remove
(
spuId
+
","
+
marketSpuId
);
for
(
int
i
=
0
;
i
<
voList
.
size
();
i
++){
String
itemSpuId
=
voList
.
get
(
i
).
getSpuId
();
if
(
spuId
.
equals
(
itemSpuId
)){
voList
.
remove
(
i
);
}
}
redisUtil
.
set
(
redisKey
,
voList
);
redisUtil
.
set
(
redisKey
,
voList
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/ObjectUtil.java
View file @
9f0c5ad1
...
@@ -22,6 +22,7 @@ public class ObjectUtil {
...
@@ -22,6 +22,7 @@ public class ObjectUtil {
private
static
final
ArrayList
<
GoblinGoodsTagVo
>
goblinGoodsTagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsTagVo
>
goblinGoodsTagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsServiceSupportVo
>
goblinGoodsServiceSupportVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsServiceSupportVo
>
goblinGoodsServiceSupportVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsExtagVo
>
goblinGoodsExtagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsExtagVo
>
goblinGoodsExtagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMarketSpuListVo
>
goblinMarketSpuListVoArrayList
=
new
ArrayList
<>();
private
static
final
BasicDBObject
basicDBObject
=
new
BasicDBObject
();
private
static
final
BasicDBObject
basicDBObject
=
new
BasicDBObject
();
...
@@ -29,6 +30,10 @@ public class ObjectUtil {
...
@@ -29,6 +30,10 @@ public class ObjectUtil {
return
goblinStoreMgtGoodsVoPagedResult
.
clone
();
return
goblinStoreMgtGoodsVoPagedResult
.
clone
();
}
}
public
static
ArrayList
<
GoblinMarketSpuListVo
>
getGoblinMarketSpuListVoArrayList
()
{
return
(
ArrayList
<
GoblinMarketSpuListVo
>)
goblinMarketSpuListVoArrayList
.
clone
();
}
public
static
ArrayList
<
GoblinFrontBannerVo
>
goblinFrontBannerVoArrayList
()
{
public
static
ArrayList
<
GoblinFrontBannerVo
>
goblinFrontBannerVoArrayList
()
{
return
(
ArrayList
<
GoblinFrontBannerVo
>)
goblinFrontBannerVoArrayList
.
clone
();
return
(
ArrayList
<
GoblinFrontBannerVo
>)
goblinFrontBannerVoArrayList
.
clone
();
}
}
...
...
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