记得上下班打卡 | 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
b31e5831
Commit
b31e5831
authored
Apr 13, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改预约逻辑
parent
a2bc79f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
GoblinGoodsAnticipateController.java
...ce/goblin/controller/GoblinGoodsAnticipateController.java
+1
-2
GoblinGoodsAnticipateServiceImpl.java
...goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
+2
-2
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+1
-2
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinGoodsAnticipateController.java
View file @
b31e5831
...
@@ -30,8 +30,7 @@ public class GoblinGoodsAnticipateController {
...
@@ -30,8 +30,7 @@ public class GoblinGoodsAnticipateController {
@ApiOperation
(
"用户预约 (只能预约不能取消)"
)
@ApiOperation
(
"用户预约 (只能预约不能取消)"
)
@PostMapping
(
"/userAbout"
)
@PostMapping
(
"/userAbout"
)
public
ResponseDto
<
Object
>
userAbout
(
HttpServletRequest
request
,
public
ResponseDto
<
Object
>
userAbout
(
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
,
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
,
@RequestParam
(
name
=
"uid"
,
required
=
true
)
String
uid
,
@RequestParam
(
name
=
"uid"
,
required
=
true
)
String
uid
,
@RequestParam
(
name
=
"phone"
,
required
=
true
)
String
phone
)
{
@RequestParam
(
name
=
"phone"
,
required
=
true
)
String
phone
)
{
return
goblinGoodsAnticipateService
.
userAbout
(
skuId
,
uid
,
phone
);
return
goblinGoodsAnticipateService
.
userAbout
(
skuId
,
uid
,
phone
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
View file @
b31e5831
...
@@ -56,7 +56,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
...
@@ -56,7 +56,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
if
(
anticipateValueVo
!=
null
)
{
if
(
anticipateValueVo
!=
null
)
{
anticipateValueVo
.
setState
(
setState
(
anticipateValueVo
.
getAboutStartDate
(),
anticipateValueVo
.
getAboutEndDate
()));
anticipateValueVo
.
setState
(
setState
(
anticipateValueVo
.
getAboutStartDate
(),
anticipateValueVo
.
getAboutEndDate
()));
if
(!
anticipateValueVo
.
getState
().
equals
(
1
))
{
if
(!
anticipateValueVo
.
getState
().
equals
(
1
))
{
return
ResponseDto
.
failure
(
"
预约尚未开始或已结束
!"
);
return
ResponseDto
.
failure
(
"
该商品预约尚未开始或已经结束,不可预约
!"
);
}
}
//查询该用户是否预
//查询该用户是否预
GoblinGoodAnticipateUserVo
userVo
=
goblinRedisUtils
.
getUserAboutAut
(
skuId
,
uid
);
GoblinGoodAnticipateUserVo
userVo
=
goblinRedisUtils
.
getUserAboutAut
(
skuId
,
uid
);
...
@@ -78,7 +78,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
...
@@ -78,7 +78,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
0
0
});
});
sendRedis
(
"goblin_goods_anticipate_user"
,
sqlValue
);
sendRedis
(
"goblin_goods_anticipate_user"
,
sqlValue
);
goblinRedisUtils
.
setSkuIdPeople
(
skuId
,
0
);
goblinRedisUtils
.
setSkuIdPeople
(
skuId
);
//储存用户头像
//储存用户头像
userAvatar
(
skuId
);
userAvatar
(
skuId
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
b31e5831
...
@@ -99,12 +99,11 @@ public class GoblinRedisUtils {
...
@@ -99,12 +99,11 @@ public class GoblinRedisUtils {
/**
/**
* 实际预约人数修改
* 实际预约人数修改
*/
*/
public
void
setSkuIdPeople
(
String
skuId
,
Integer
state
)
{
public
void
setSkuIdPeople
(
String
skuId
)
{
BigInteger
num
=
(
BigInteger
)
redisUtil
.
get
(
GoblinRedisConst
.
ANTICIPATE_PEOPLE
.
concat
(
skuId
));
BigInteger
num
=
(
BigInteger
)
redisUtil
.
get
(
GoblinRedisConst
.
ANTICIPATE_PEOPLE
.
concat
(
skuId
));
num
=
num
!=
null
?
num:
BigInteger
.
valueOf
(
0
);
num
=
num
!=
null
?
num:
BigInteger
.
valueOf
(
0
);
//新预约 +1
//新预约 +1
redisUtil
.
set
(
GoblinRedisConst
.
ANTICIPATE_PEOPLE
.
concat
(
skuId
),
num
.
add
(
BigInteger
.
valueOf
(
1
)));
redisUtil
.
set
(
GoblinRedisConst
.
ANTICIPATE_PEOPLE
.
concat
(
skuId
),
num
.
add
(
BigInteger
.
valueOf
(
1
)));
}
}
/**
/**
...
...
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