记得上下班打卡 | 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
42f35d63
Commit
42f35d63
authored
Apr 21, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取助力逻辑修改
parent
5539f2fb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
17 deletions
+37
-17
GoblinGoodsAnticipateShareVo.java
...t/service/goblin/dto/vo/GoblinGoodsAnticipateShareVo.java
+7
-0
IGoblinGoodsAnticipateService.java
...service/goblin/service/IGoblinGoodsAnticipateService.java
+4
-3
GoblinGoodsAnticipateController.java
...ce/goblin/controller/GoblinGoodsAnticipateController.java
+8
-7
GoblinGoodsAnticipateServiceImpl.java
...goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
+18
-7
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsAnticipateShareVo.java
View file @
42f35d63
...
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.dto.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.goblin.dto.manage.vo.HelpValueVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -32,6 +33,12 @@ public class GoblinGoodsAnticipateShareVo implements Serializable,Cloneable{
*/
private
String
skuId
;
@ApiModelProperty
(
"预约类型(1:预约提醒,2:预约获得购买资格)"
)
private
Integer
type
;
@ApiModelProperty
(
"设置预约人数"
)
private
Integer
peopleType
;
/**
* url分享地址(备用)
*/
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinGoodsAnticipateService.java
View file @
42f35d63
package
com
.
liquidnet
.
service
.
goblin
.
service
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.vo.HelpValueVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsAnticipateHelpVo
;
import
java.util.List
;
...
...
@@ -24,11 +25,11 @@ public interface IGoblinGoodsAnticipateService {
ResponseDto
<
Boolean
>
selectAnticipate
(
String
skuId
);
ResponseDto
<
Object
>
share
(
String
skuId
);
ResponseDto
<
String
>
share
(
String
skuId
);
ResponseDto
<
Object
>
help
(
String
sid
);
ResponseDto
<
Boolean
>
help
(
String
sid
);
ResponseDto
<
List
<
String
>>
getHelpAvatar
(
String
sid
);
ResponseDto
<
HelpValueVo
>
getHelpValue
(
String
sid
);
ResponseDto
<
String
>
getTurnOnHelp
(
String
skuId
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinGoodsAnticipateController.java
View file @
42f35d63
...
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.controller;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.vo.HelpValueVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsAnticipateHelpVo
;
import
com.liquidnet.service.goblin.service.IGoblinGoodsAnticipateService
;
import
io.swagger.annotations.Api
;
...
...
@@ -54,23 +55,23 @@ public class GoblinGoodsAnticipateController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
,
example
=
""
),
})
public
ResponseDto
<
Object
>
share
(
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
)
{
public
ResponseDto
<
String
>
share
(
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
)
{
return
goblinGoodsAnticipateService
.
share
(
skuId
);
}
@ApiOperation
(
"用户为他人助力"
)
@PostMapping
(
"help"
)
public
ResponseDto
<
Object
>
help
(
@RequestParam
(
name
=
"sid"
,
required
=
true
)
String
sid
)
{
public
ResponseDto
<
Boolean
>
help
(
@RequestParam
(
name
=
"sid"
,
required
=
true
)
String
sid
)
{
return
goblinGoodsAnticipateService
.
help
(
sid
);
}
@ApiOperation
(
"获取
助力头像
"
)
@PostMapping
(
"getHelp
Avatar
"
)
public
ResponseDto
<
List
<
String
>>
getHelpAvatar
(
@RequestParam
(
name
=
"sid"
,
required
=
true
)
String
sid
)
{
return
goblinGoodsAnticipateService
.
getHelp
Avatar
(
sid
);
@ApiOperation
(
"获取
当前助力信息
"
)
@PostMapping
(
"getHelp
Value
"
)
public
ResponseDto
<
HelpValueVo
>
getHelpValue
(
@RequestParam
(
name
=
"sid"
,
required
=
true
)
String
sid
)
{
return
goblinGoodsAnticipateService
.
getHelp
Value
(
sid
);
}
@ApiOperation
(
"是否开启助力(返回助力的sid)"
)
@ApiOperation
(
"是否开启助力(返回助力的sid
,返回null则没有开启助力
)"
)
@GetMapping
(
"getTurnOnHelp"
)
public
ResponseDto
<
String
>
getTurnOnHelp
(
@RequestParam
(
name
=
"skuId"
)
String
skuId
){
return
goblinGoodsAnticipateService
.
getTurnOnHelp
(
skuId
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
View file @
42f35d63
...
...
@@ -8,6 +8,7 @@ import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.constant.MQConst
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinGoodsAnticipateValueVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.HelpValueVo
;
import
com.liquidnet.service.goblin.dto.vo.*
;
import
com.liquidnet.service.goblin.service.IGoblinGoodsAnticipateService
;
import
com.liquidnet.service.goblin.util.GoblinAnticipateUtils
;
...
...
@@ -125,7 +126,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
}
@Override
public
ResponseDto
<
Object
>
share
(
String
skuId
)
{
public
ResponseDto
<
String
>
share
(
String
skuId
)
{
//查询是否可以预约
GoblinGoodsAnticipateValueVo
valueBySkuId
=
goblinRedisUtils
.
getValueBySkuId
(
skuId
);
if
(
valueBySkuId
==
null
)
{
...
...
@@ -152,6 +153,8 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
goblinGoodsAnticipateShareVo
.
setSid
(
sId
);
goblinGoodsAnticipateShareVo
.
setUid
(
uid
);
goblinGoodsAnticipateShareVo
.
setSkuId
(
skuId
);
goblinGoodsAnticipateShareVo
.
setType
(
valueBySkuId
.
getType
());
goblinGoodsAnticipateShareVo
.
setPeopleType
(
valueBySkuId
.
getPeopleType
());
// goblinGoodsAnticipateShareVo.setUrl(url);
goblinGoodsAnticipateShareVo
.
setCreatedDate
(
LocalDateTime
.
now
());
goblinGoodsAnticipateShareVo
.
setAboutStartDate
(
valueBySkuId
.
getAboutStartDate
());
...
...
@@ -177,12 +180,12 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
goblinGoodsAnticipateShareVo
.
getCreatedDate
()
});
sendRedis
(
"goblin_goods_anticipate_share"
,
sqlValue
);
return
ResponseDto
.
success
(
sid
);
}
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
Object
>
help
(
String
sid
)
{
public
ResponseDto
<
Boolean
>
help
(
String
sid
)
{
//查询是否可以预约
GoblinGoodsAnticipateShareVo
shareVo
=
goblinRedisUtils
.
getShareVo
(
sid
);
...
...
@@ -238,17 +241,25 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
//新增助力头像
goblinRedisUtils
.
setHelpUserAvatar
(
sid
,
userInfo
.
getAvatar
());
}
return
ResponseDto
.
success
();
return
ResponseDto
.
success
(
true
);
}
return
ResponseDto
.
failure
(
"已助力该分享"
);
return
ResponseDto
.
success
(
false
);
}
@Override
public
ResponseDto
<
List
<
String
>>
getHelpAvatar
(
String
sid
)
{
public
ResponseDto
<
HelpValueVo
>
getHelpValue
(
String
sid
)
{
//助力头像前六个
List
<
String
>
helpUserAvatar
=
goblinRedisUtils
.
getHelpUserAvatar
(
sid
);
//目前有多少助力
Integer
helpPeople
=
goblinRedisUtils
.
getHelpSidAddHelp
(
sid
);
//获取分享助力信息
GoblinGoodsAnticipateShareVo
shareVo
=
goblinRedisUtils
.
getShareVo
(
sid
);
HelpValueVo
helpValueVo
=
HelpValueVo
.
getNew
();
helpValueVo
.
copy
(
shareVo
);
helpValueVo
.
setHelpUserAvatar
(
helpUserAvatar
);
helpValueVo
.
setHelpPeople
(
helpPeople
);
return
ResponseDto
.
success
();
return
ResponseDto
.
success
(
helpValueVo
);
}
@Override
...
...
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