记得上下班打卡 | 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
f92ef493
Commit
f92ef493
authored
Apr 27, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit 助力失败文案提示
parent
02beec69
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
18 deletions
+38
-18
IGoblinGoodsAnticipateService.java
...service/goblin/service/IGoblinGoodsAnticipateService.java
+2
-1
GoblinGoodsAnticipateController.java
...ce/goblin/controller/GoblinGoodsAnticipateController.java
+11
-2
GoblinGoodsAnticipateMgController.java
.../controller/manage/GoblinGoodsAnticipateMgController.java
+5
-5
GoblinGoodsAnticipateServiceImpl.java
...goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
+20
-9
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+0
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinGoodsAnticipateService.java
View file @
f92ef493
...
@@ -40,7 +40,7 @@ public interface IGoblinGoodsAnticipateService {
...
@@ -40,7 +40,7 @@ public interface IGoblinGoodsAnticipateService {
* @param sid 分享id
* @param sid 分享id
* @return Boolean
* @return Boolean
*/
*/
ResponseDto
<
Boolean
>
help
(
String
sid
);
ResponseDto
<
String
>
help
(
String
sid
);
/**
/**
* 获取当前助力信息
* 获取当前助力信息
...
@@ -56,4 +56,5 @@ public interface IGoblinGoodsAnticipateService {
...
@@ -56,4 +56,5 @@ public interface IGoblinGoodsAnticipateService {
*/
*/
ResponseDto
<
String
>
getTurnOnHelp
(
String
skuId
);
ResponseDto
<
String
>
getTurnOnHelp
(
String
skuId
);
ResponseDto
<
Boolean
>
helpSid
(
String
sid
);
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinGoodsAnticipateController.java
View file @
f92ef493
...
@@ -64,10 +64,19 @@ public class GoblinGoodsAnticipateController {
...
@@ -64,10 +64,19 @@ public class GoblinGoodsAnticipateController {
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"sid"
,
value
=
"创建分享生成的sid"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"sid"
,
value
=
"创建分享生成的sid"
),
})
})
public
ResponseDto
<
Boolean
>
help
(
@RequestParam
(
name
=
"sid"
)
String
sid
)
{
public
ResponseDto
<
String
>
help
(
@RequestParam
(
name
=
"sid"
)
String
sid
)
{
return
goblinGoodsAnticipateService
.
help
(
sid
);
return
goblinGoodsAnticipateService
.
help
(
sid
);
}
}
@ApiOperation
(
"查询用户是否助力该分享"
)
@GetMapping
(
"helpSid"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"sid"
,
value
=
"创建分享生成的sid"
),
})
public
ResponseDto
<
Boolean
>
helpSid
(
@RequestParam
(
name
=
"sid"
)
String
sid
)
{
return
goblinGoodsAnticipateService
.
helpSid
(
sid
);
}
@ApiOperation
(
"获取当前助力信息"
)
@ApiOperation
(
"获取当前助力信息"
)
@PostMapping
(
"getHelpValue"
)
@PostMapping
(
"getHelpValue"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -82,7 +91,7 @@ public class GoblinGoodsAnticipateController {
...
@@ -82,7 +91,7 @@ public class GoblinGoodsAnticipateController {
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
),
})
})
public
ResponseDto
<
String
>
getTurnOnHelp
(
@RequestParam
(
name
=
"skuId"
)
String
skuId
){
public
ResponseDto
<
String
>
getTurnOnHelp
(
@RequestParam
(
name
=
"skuId"
)
String
skuId
)
{
return
goblinGoodsAnticipateService
.
getTurnOnHelp
(
skuId
);
return
goblinGoodsAnticipateService
.
getTurnOnHelp
(
skuId
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinGoodsAnticipateMgController.java
View file @
f92ef493
...
@@ -66,10 +66,10 @@ public class GoblinGoodsAnticipateMgController {
...
@@ -66,10 +66,10 @@ public class GoblinGoodsAnticipateMgController {
// return goblinGoodsAnticipateMgService.delete(skuId);
// return goblinGoodsAnticipateMgService.delete(skuId);
// }
// }
@ApiOperation
(
"更具sku获取信息"
)
//
@ApiOperation("更具sku获取信息")
@GetMapping
(
"/getAnticipateValueBySkuId"
)
//
@GetMapping("/getAnticipateValueBySkuId")
public
AnticipateValueVo
getAnticipateValueBySkuId
(
@RequestParam
(
name
=
"skuId"
)
String
skuId
){
//
public AnticipateValueVo getAnticipateValueBySkuId(@RequestParam(name = "skuId") String skuId){
return
goblinGoodsAnticipateMgService
.
getAnticipateValueBySkuId
(
skuId
,
1
);
//
return goblinGoodsAnticipateMgService.getAnticipateValueBySkuId(skuId,1);
}
//
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
View file @
f92ef493
...
@@ -195,24 +195,24 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
...
@@ -195,24 +195,24 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
}
}
@Override
@Override
public
ResponseDto
<
Boolean
>
help
(
String
sid
)
{
public
ResponseDto
<
String
>
help
(
String
sid
)
{
//查询是否可以预约
//查询是否可以预约
GoblinGoodsAnticipateShareVo
shareVo
=
goblinRedisUtils
.
getShareVo
(
sid
);
GoblinGoodsAnticipateShareVo
shareVo
=
goblinRedisUtils
.
getShareVo
(
sid
);
if
(
shareVo
==
null
)
{
if
(
shareVo
==
null
)
{
return
ResponseDto
.
failure
(
"
分享不存在,
!"
);
return
ResponseDto
.
failure
(
"
203"
,
"分享不存在
!"
);
}
}
Integer
integer
=
GoblinAnticipateUtils
.
setState
(
shareVo
.
getAboutStartDate
(),
shareVo
.
getAboutEndDate
());
Integer
integer
=
GoblinAnticipateUtils
.
setState
(
shareVo
.
getAboutStartDate
(),
shareVo
.
getAboutEndDate
());
if
(
integer
!=
null
&&
!
integer
.
equals
(
1
))
{
if
(
integer
!=
null
&&
!
integer
.
equals
(
1
))
{
return
ResponseDto
.
failure
(
"
预约未开始或
已结束!"
);
return
ResponseDto
.
failure
(
"
204"
,
"助力
已结束!"
);
}
}
//获取uid
//获取uid
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
//
if (shareVo.getUid().equals(uid)){
if
(
shareVo
.
getUid
().
equals
(
uid
)){
// return ResponseDto.failure(
"助力失败,本人不能为本人助力!");
return
ResponseDto
.
failure
(
"201"
,
"助力失败,本人不能为本人助力!"
);
//
}
}
//查询mongodb 是否助力过该分享
//查询mongodb 是否助力过该分享
// GoblinGoodsAnticipateHelpVo goodsAnticipateHelpVo = goblinMongoUtils.getHelpVo(sid, uid);
// GoblinGoodsAnticipateHelpVo goodsAnticipateHelpVo = goblinMongoUtils.getHelpVo(sid, uid);
...
@@ -257,10 +257,11 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
...
@@ -257,10 +257,11 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
//主力人数达到可预约条件
//主力人数达到可预约条件
uidAboutBySkuId
(
shareVo
.
getSkuId
(),
shareVo
.
getUid
());
uidAboutBySkuId
(
shareVo
.
getSkuId
(),
shareVo
.
getUid
());
}
}
return
ResponseDto
.
success
(
true
);
return
ResponseDto
.
success
();
}
}
else
{
log
.
debug
(
"help() false ------> sid:{}"
,
sid
);
log
.
debug
(
"help() false ------> sid:{}"
,
sid
);
return
ResponseDto
.
success
(
false
);
return
ResponseDto
.
failure
(
"202"
,
"重复助力!"
);
}
}
}
@Override
@Override
...
@@ -281,6 +282,16 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
...
@@ -281,6 +282,16 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
return
ResponseDto
.
success
(
goblinRedisUtils
.
getShare
(
skuId
,
uid
));
return
ResponseDto
.
success
(
goblinRedisUtils
.
getShare
(
skuId
,
uid
));
}
}
@Override
public
ResponseDto
<
Boolean
>
helpSid
(
String
sid
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
Integer
help
=
goblinRedisUtils
.
getHelpByUidAndSid
(
uid
,
sid
);
if
(
help
==
null
){
return
ResponseDto
.
success
(
false
);
}
return
ResponseDto
.
success
(
true
);
}
public
void
sendRedis
(
String
sqlKey
,
LinkedList
<
Object
[]>
sqlData
)
{
public
void
sendRedis
(
String
sqlKey
,
LinkedList
<
Object
[]>
sqlData
)
{
LinkedList
<
String
>
sql
=
CollectionUtil
.
linkedListString
();
LinkedList
<
String
>
sql
=
CollectionUtil
.
linkedListString
();
sql
.
add
(
SqlMapping
.
get
(
sqlKey
));
sql
.
add
(
SqlMapping
.
get
(
sqlKey
));
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
f92ef493
...
@@ -241,7 +241,6 @@ public class GoblinRedisUtils {
...
@@ -241,7 +241,6 @@ public class GoblinRedisUtils {
GoblinGoodsAnticipateShareVo
shareVo
=
getShareVo
(
sid
);
GoblinGoodsAnticipateShareVo
shareVo
=
getShareVo
(
sid
);
Integer
helpPeople
=
shareVo
.
getHelpPeople
();
Integer
helpPeople
=
shareVo
.
getHelpPeople
();
shareVo
.
setHelpPeople
(
helpPeople
!=
null
?
helpPeople
+=
1
:
1
);
shareVo
.
setHelpPeople
(
helpPeople
!=
null
?
helpPeople
+=
1
:
1
);
Integer
helpByUidAndSid
=
getHelpSidAddHelp
(
sid
);
setShareVo
(
shareVo
);
setShareVo
(
shareVo
);
}
}
...
...
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