记得上下班打卡 | 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
6d9d9187
Commit
6d9d9187
authored
Apr 22, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_yy_dh' into dev_yy_dh
parents
5e41b441
82c004a1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
45 deletions
+17
-45
IGoblinGoodsAnticipateService.java
...service/goblin/service/IGoblinGoodsAnticipateService.java
+1
-1
IGoblinGoodsAnticipateMgService.java
...oblin/service/manage/IGoblinGoodsAnticipateMgService.java
+2
-2
GoblinGoodsAnticipateController.java
...ce/goblin/controller/GoblinGoodsAnticipateController.java
+3
-3
GoblinGoodsAnticipateMgController.java
.../controller/manage/GoblinGoodsAnticipateMgController.java
+3
-3
GoblinGoodsAnticipateServiceImpl.java
...goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
+6
-6
GoblinGoodsAnticipateMgServiceImpl.java
...rvice/impl/manage/GoblinGoodsAnticipateMgServiceImpl.java
+2
-14
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+0
-16
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/IGoblinGoodsAnticipateService.java
View file @
6d9d9187
...
...
@@ -20,7 +20,7 @@ public interface IGoblinGoodsAnticipateService {
/**
* 用户预约
*/
ResponseDto
<
Object
>
userAbout
(
String
skuId
);
ResponseDto
<
Boolean
>
userAbout
(
String
skuId
);
ResponseDto
<
Boolean
>
selectAnticipate
(
String
skuId
);
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinGoodsAnticipateMgService.java
View file @
6d9d9187
...
...
@@ -32,12 +32,12 @@ public interface IGoblinGoodsAnticipateMgService {
/**
* 修改预约人数
*/
ResponseDto
<
Object
>
updatePeople
(
String
antId
,
BigInteger
people
);
ResponseDto
<
Boolean
>
updatePeople
(
String
antId
,
BigInteger
people
);
/**
* 删除预约
*/
ResponseDto
<
Object
>
delete
(
String
skuId
);
ResponseDto
<
Boolean
>
delete
(
String
skuId
);
AnticipateValueVo
getAnticipateValueBySkuId
(
String
skuId
,
int
hasHead
);
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinGoodsAnticipateController.java
View file @
6d9d9187
...
...
@@ -25,7 +25,7 @@ import java.util.List;
*/
@Slf4j
@RestController
@Api
(
tags
=
"预约相关"
)
@Api
(
tags
=
"预约相关
(前)
"
)
@RequestMapping
(
"/anticipate"
)
public
class
GoblinGoodsAnticipateController
{
...
...
@@ -37,11 +37,11 @@ public class GoblinGoodsAnticipateController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
,
example
=
""
),
})
public
ResponseDto
<
Object
>
userAbout
(
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
)
{
public
ResponseDto
<
Boolean
>
userAbout
(
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
)
{
return
goblinGoodsAnticipateService
.
userAbout
(
skuId
);
}
@ApiOperation
(
"根据skuId和uid查询"
)
@ApiOperation
(
"根据skuId和uid查询
是否预约
"
)
@GetMapping
(
"/selectAnticipateBySkuIdAndUid"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
,
example
=
""
),
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinGoodsAnticipateMgController.java
View file @
6d9d9187
...
...
@@ -28,7 +28,7 @@ import java.math.BigInteger;
*/
@Slf4j
@RestController
@Api
(
tags
=
"预约相关"
)
@Api
(
tags
=
"预约相关
(后)
"
)
@RequestMapping
(
"/goblin/anticipate"
)
public
class
GoblinGoodsAnticipateMgController
{
...
...
@@ -53,7 +53,7 @@ public class GoblinGoodsAnticipateMgController {
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
,
example
=
""
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"BigInteger"
,
name
=
"people"
,
value
=
"要修改的人数"
,
example
=
""
)
})
public
ResponseDto
<
Object
>
updatePeople
(
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
,
@RequestParam
(
name
=
"people"
,
required
=
true
)
BigInteger
people
)
{
public
ResponseDto
<
Boolean
>
updatePeople
(
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
,
@RequestParam
(
name
=
"people"
,
required
=
true
)
BigInteger
people
)
{
return
goblinGoodsAnticipateMgService
.
updatePeople
(
skuId
,
people
);
}
...
...
@@ -62,7 +62,7 @@ public class GoblinGoodsAnticipateMgController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
,
example
=
""
),
})
public
ResponseDto
<
Object
>
delete
(
@RequestParam
(
name
=
"skuId"
)
String
skuId
)
{
public
ResponseDto
<
Boolean
>
delete
(
@RequestParam
(
name
=
"skuId"
)
String
skuId
)
{
return
goblinGoodsAnticipateMgService
.
delete
(
skuId
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
View file @
6d9d9187
...
...
@@ -52,7 +52,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
GoblinMongoUtils
goblinMongoUtils
;
@Override
public
ResponseDto
<
Object
>
userAbout
(
String
skuId
)
{
public
ResponseDto
<
Boolean
>
userAbout
(
String
skuId
)
{
//查询该skuId是否能被预约
GoblinGoodsAnticipateValueVo
anticipateValueVo
=
goblinRedisUtils
.
getValueBySkuId
(
skuId
);
if
(
anticipateValueVo
!=
null
)
{
...
...
@@ -75,7 +75,6 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
if
(
sid
!=
null
)
{
Integer
people
=
goblinRedisUtils
.
getHelpSidAddHelp
(
sid
);
if
(
anticipateValueVo
.
getPeopleType
()
>
people
)
{
int
num
=
anticipateValueVo
.
getPeopleType
()
-
people
;
log
.
debug
(
" skuId:{},分享sid:{},预约uid:{},需要助力人数:{},助力人数:{}"
,
skuId
,
sid
,
uid
,
anticipateValueVo
.
getPeopleType
(),
people
);
return
ResponseDto
.
failure
(
"预约失败!"
);
}
...
...
@@ -148,9 +147,9 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
//查询sku需要助力人数
//Integer skuIdPeople = goblinRedisUtils.getSharePeopleBySkuId(skuId);
String
sI
d
=
IDGenerator
.
nextTimeId2
();
si
d
=
IDGenerator
.
nextTimeId2
();
GoblinGoodsAnticipateShareVo
goblinGoodsAnticipateShareVo
=
GoblinGoodsAnticipateShareVo
.
getNew
();
goblinGoodsAnticipateShareVo
.
setSid
(
s
I
d
);
goblinGoodsAnticipateShareVo
.
setSid
(
s
i
d
);
goblinGoodsAnticipateShareVo
.
setUid
(
uid
);
goblinGoodsAnticipateShareVo
.
setSkuId
(
skuId
);
goblinGoodsAnticipateShareVo
.
setType
(
valueBySkuId
.
getType
());
...
...
@@ -164,7 +163,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
//goblinMongoUtils.setGoblinGoodsAnticipateShareVo(goblinGoodsAnticipateShareVo);
//redis缓存
goblinRedisUtils
.
setShare
(
skuId
,
uid
,
s
I
d
);
goblinRedisUtils
.
setShare
(
skuId
,
uid
,
s
i
d
);
//redis存储用户分享
goblinRedisUtils
.
setShareVo
(
goblinGoodsAnticipateShareVo
);
...
...
@@ -180,7 +179,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
goblinGoodsAnticipateShareVo
.
getCreatedDate
()
});
sendRedis
(
"goblin_goods_anticipate_share"
,
sqlValue
);
return
ResponseDto
.
success
(
s
I
d
);
return
ResponseDto
.
success
(
s
i
d
);
}
}
...
...
@@ -243,6 +242,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
}
return
ResponseDto
.
success
(
true
);
}
log
.
debug
(
"help() false ------> sid:{}"
,
sid
);
return
ResponseDto
.
success
(
false
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinGoodsAnticipateMgServiceImpl.java
View file @
6d9d9187
...
...
@@ -13,7 +13,6 @@ import com.liquidnet.service.goblin.dto.manage.GoblinGoodsAnticipateValueAddPara
import
com.liquidnet.service.goblin.dto.manage.GoblinGoodsAnticipateValueParam
;
import
com.liquidnet.service.goblin.dto.manage.vo.AnticipateValueVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinGoodsAnticipateValueVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsAnticipateHelp
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsAnticipateVo
;
import
com.liquidnet.service.goblin.service.manage.IGoblinGoodsAnticipateMgService
;
import
com.liquidnet.service.goblin.util.GoblinAnticipateUtils
;
...
...
@@ -24,7 +23,6 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
import
java.math.BigInteger
;
import
java.time.LocalDateTime
;
...
...
@@ -118,16 +116,6 @@ public class GoblinGoodsAnticipateMgServiceImpl implements IGoblinGoodsAnticipat
//redis标识存入该sku处于预约列表
goblinRedisUtils
.
setValue
(
goodsAnticipateValueVo
);
//redis缓存预约条件
/*GoblinGoodsAnticipateHelp goodsAnticipateHelp = GoblinGoodsAnticipateHelp.getNew();
goodsAnticipateHelp.setSkuId(goodsAnticipateValueVo.getSkuId());
goodsAnticipateHelp.setType(type);
goodsAnticipateHelp.setPeople(people);
goodsAnticipateHelp.setAboutStartDate(goodsAnticipateValueVo.getAboutStartDate());
goodsAnticipateHelp.setAboutEndDate(goodsAnticipateValueVo.getAboutEndDate());
goblinRedisUtils.setSharePeopleBySkuId(item.getSkuId(), goodsAnticipateHelp);*/
//保存mysql中间表
LinkedList
<
Object
[]>
sqlValue
=
CollectionUtil
.
linkedListObjectArr
();
sqlValue
.
add
(
new
Object
[]{
...
...
@@ -176,7 +164,7 @@ public class GoblinGoodsAnticipateMgServiceImpl implements IGoblinGoodsAnticipat
}
@Override
public
ResponseDto
<
Object
>
updatePeople
(
String
skuId
,
BigInteger
people
)
{
public
ResponseDto
<
Boolean
>
updatePeople
(
String
skuId
,
BigInteger
people
)
{
//修改Mongodb
goblinMongoUtils
.
updateGoblinGoodsAnticipateValueVoPeople
(
skuId
,
people
);
//修改redis
...
...
@@ -194,7 +182,7 @@ public class GoblinGoodsAnticipateMgServiceImpl implements IGoblinGoodsAnticipat
}
@Override
public
ResponseDto
<
Object
>
delete
(
String
skuId
)
{
public
ResponseDto
<
Boolean
>
delete
(
String
skuId
)
{
//更具skuId查询
GoblinGoodsAnticipateValueVo
goodsAnticipateValueVo
=
goblinRedisUtils
.
getValueBySkuId
(
skuId
);
String
uid
=
CurrentUtil
.
getCurrentUid
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
6d9d9187
...
...
@@ -173,22 +173,6 @@ public class GoblinRedisUtils {
return
(
String
)
redisUtil
.
get
(
key
);
}
/**
* 缓存sku预约助力人数
*/
public
void
setSharePeopleBySkuId
(
String
skuId
,
GoblinGoodsAnticipateHelp
goodsAnticipateHelp
){
String
key
=
GoblinRedisConst
.
ANTICIPATE_SHARE_SKUID_PEOPLE
.
concat
(
skuId
);
redisUtil
.
set
(
key
,
goodsAnticipateHelp
);
}
/**
* 缓存sku预约助力人数
*/
public
GoblinGoodsAnticipateHelp
getSharePeopleBySkuId
(
String
skuId
){
String
key
=
GoblinRedisConst
.
ANTICIPATE_SHARE_SKUID_PEOPLE
.
concat
(
skuId
);
return
(
GoblinGoodsAnticipateHelp
)
redisUtil
.
get
(
key
);
}
/**
* 缓存sku预约助力人数
*/
...
...
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