记得上下班打卡 | 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
f9c4c2ad
Commit
f9c4c2ad
authored
Dec 31, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 正在下单配置
parent
6f2ef7ed
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
26 deletions
+20
-26
IGoblinStorePurchasingService.java
.../goblin/service/manage/IGoblinStorePurchasingService.java
+1
-1
GoblinStorePurchasingController.java
...in/controller/manage/GoblinStorePurchasingController.java
+2
-4
GoblinStorePurchasingServiceImpl.java
...service/impl/manage/GoblinStorePurchasingServiceImpl.java
+7
-7
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+2
-3
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+8
-11
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinStorePurchasingService.java
View file @
f9c4c2ad
...
...
@@ -65,7 +65,7 @@ public interface IGoblinStorePurchasingService {
* @param marketId 活动秒杀id
* @return
*/
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
String
marketId
,
String
storeId
);
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
String
marketId
);
/**
* 获取活动内spu列表
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStorePurchasingController.java
View file @
f9c4c2ad
...
...
@@ -82,11 +82,9 @@ public class GoblinStorePurchasingController {
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"商铺id"
,
example
=
"1"
),
})
public
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
)
{
return
goblinStorePurchasingService
.
purchasingDetails
(
marketId
,
storeId
);
public
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
)
{
return
goblinStorePurchasingService
.
purchasingDetails
(
marketId
);
}
@GetMapping
(
"purchasing/spu"
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStorePurchasingServiceImpl.java
View file @
f9c4c2ad
...
...
@@ -78,15 +78,15 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
GoblinStoreMarketVo
vo
=
GoblinStoreMarketVo
.
getNew
();
vo
.
setStatus
(
status
);
goblinMongoUtils
.
updateStoreMarket
(
marketId
,
storeId
,
vo
);
vo
=
goblinRedisUtils
.
getGoblinStoreMarketVo
(
marketId
,
storeId
);
vo
=
goblinRedisUtils
.
getGoblinStoreMarketVo
(
marketId
);
vo
.
setStatus
(
status
);
goblinRedisUtils
.
setGoblinStoreMarketVo
(
marketId
,
storeId
,
vo
);
goblinRedisUtils
.
setGoblinStoreMarketVo
(
marketId
,
vo
);
break
;
case
-
1
:
bean
.
setStatus
(
7
);
bean
.
setDelFlag
(
1
);
goblinMongoUtils
.
delStoreMarket
(
marketId
,
storeId
);
goblinRedisUtils
.
delGoblinStoreMarketVo
(
marketId
,
storeId
);
goblinRedisUtils
.
delGoblinStoreMarketVo
(
marketId
);
break
;
}
//mysql
...
...
@@ -125,7 +125,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
//mongo
goblinMongoUtils
.
insertStoreMarket
(
vo
);
//redis
goblinRedisUtils
.
setGoblinStoreMarketVo
(
storeMarketId
,
storeId
,
vo
);
goblinRedisUtils
.
setGoblinStoreMarketVo
(
storeMarketId
,
vo
);
//mysql
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
SqlMapping
.
get
(
"goblin.store.market.insert"
,
bean
.
getStoreMarketId
(),
bean
.
getName
(),
bean
.
getType
(),
bean
.
getStatus
(),
bean
.
getStoreId
(),
bean
.
getStartTime
(),
bean
.
getEndTime
(),
bean
.
getDelFlag
(),
bean
.
getIsPre
(),
bean
.
getPreTime
(),
bean
.
getCreatedAt
()));
...
...
@@ -156,7 +156,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
//mongo
goblinMongoUtils
.
updateStoreMarket
(
marketId
,
storeId
,
vo
);
//redis
goblinRedisUtils
.
setGoblinStoreMarketVo
(
marketId
,
storeId
,
vo
);
goblinRedisUtils
.
setGoblinStoreMarketVo
(
marketId
,
vo
);
//mysql
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
SqlMapping
.
get
(
"goblin.store.market.update"
,
bean
.
getName
(),
bean
.
getType
(),
bean
.
getStatus
(),
bean
.
getStoreId
(),
bean
.
getDescribes
(),
bean
.
getStartTime
(),
bean
.
getEndTime
(),
bean
.
getDelFlag
(),
bean
.
getIsPre
(),
bean
.
getPreTime
(),
bean
.
getUpdatedAt
(),
marketId
,
bean
.
getStoreId
()));
...
...
@@ -164,8 +164,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
}
@Override
public
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
String
marketId
,
String
storeId
)
{
return
ResponseDto
.
success
(
goblinRedisUtils
.
getGoblinStoreMarketVo
(
marketId
,
storeId
));
public
ResponseDto
<
GoblinStoreMarketVo
>
purchasingDetails
(
String
marketId
)
{
return
ResponseDto
.
success
(
goblinRedisUtils
.
getGoblinStoreMarketVo
(
marketId
));
}
@Override
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
f9c4c2ad
...
...
@@ -209,11 +209,10 @@ public class GoblinMongoUtils {
* 获取 商铺活动 mongo
*
* @param marketId
* @param storeId
* @return
*/
public
GoblinStoreMarketVo
getStoreMarket
(
String
marketId
,
String
storeId
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"storeMarketId"
).
is
(
marketId
)
.
and
(
"storeId"
).
is
(
storeId
)
),
GoblinStoreMarketVo
.
class
,
GoblinStoreMarketVo
.
class
.
getSimpleName
());
public
GoblinStoreMarketVo
getStoreMarket
(
String
marketId
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"storeMarketId"
).
is
(
marketId
)),
GoblinStoreMarketVo
.
class
,
GoblinStoreMarketVo
.
class
.
getSimpleName
());
}
/**
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
f9c4c2ad
...
...
@@ -151,12 +151,11 @@ public class GoblinRedisUtils {
* 覆盖 商铺活动vo
*
* @param storeMarketId
* @param storeId
* @param vo
* @return
*/
public
boolean
setGoblinStoreMarketVo
(
String
storeMarketId
,
String
storeId
,
GoblinStoreMarketVo
vo
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET
.
concat
(
storeMarketId
)
.
concat
(
":store_id:"
+
storeId
)
;
public
boolean
setGoblinStoreMarketVo
(
String
storeMarketId
,
GoblinStoreMarketVo
vo
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET
.
concat
(
storeMarketId
);
return
redisUtil
.
set
(
redisKey
,
vo
);
}
...
...
@@ -164,15 +163,14 @@ public class GoblinRedisUtils {
* 获取 商铺活动vo
*
* @param storeMarketId
* @param storeId
* @return
*/
public
GoblinStoreMarketVo
getGoblinStoreMarketVo
(
String
storeMarketId
,
String
storeId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET
.
concat
(
storeMarketId
)
.
concat
(
":store_id:"
+
storeId
)
;
public
GoblinStoreMarketVo
getGoblinStoreMarketVo
(
String
storeMarketId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET
.
concat
(
storeMarketId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
GoblinStoreMarketVo
vo
=
goblinMongoUtils
.
getStoreMarket
(
storeMarketId
,
storeId
);
setGoblinStoreMarketVo
(
storeMarketId
,
storeId
,
vo
);
GoblinStoreMarketVo
vo
=
goblinMongoUtils
.
getStoreMarket
(
storeMarketId
);
setGoblinStoreMarketVo
(
storeMarketId
,
vo
);
return
vo
;
}
else
{
return
(
GoblinStoreMarketVo
)
obj
;
...
...
@@ -183,11 +181,10 @@ public class GoblinRedisUtils {
* 删除 商铺活动vo
*
* @param storeMarketId
* @param storeId
* @return
*/
public
void
delGoblinStoreMarketVo
(
String
storeMarketId
,
String
storeId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET
.
concat
(
storeMarketId
)
.
concat
(
":store_id:"
+
storeId
)
;
public
void
delGoblinStoreMarketVo
(
String
storeMarketId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_STORE_MARKET
.
concat
(
storeMarketId
);
redisUtil
.
del
(
redisKey
);
}
...
...
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