记得上下班打卡 | 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
02b599ae
Commit
02b599ae
authored
Jan 12, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin
parents
9d64947e
7781dd49
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
6 deletions
+31
-6
GoblinShoppingCartVoDetail.java
...net/service/goblin/dto/vo/GoblinShoppingCartVoDetail.java
+8
-0
application-test.yml
liquidnet-bus-config/liquidnet-config/application-test.yml
+1
-0
GoblinFrontLoginController.java
...service/goblin/controller/GoblinFrontLoginController.java
+11
-5
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+11
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinShoppingCartVoDetail.java
View file @
02b599ae
...
@@ -74,6 +74,14 @@ public class GoblinShoppingCartVoDetail implements Serializable {
...
@@ -74,6 +74,14 @@ public class GoblinShoppingCartVoDetail implements Serializable {
private
LocalDateTime
updatedAt
;
private
LocalDateTime
updatedAt
;
private
String
comment
;
private
String
comment
;
/***
* sku
*/
@ApiModelProperty
(
value
=
"sku信息"
)
private
GoblinGoodsSkuInfoVo
goblinGoodsSkuInfoVo
;
@ApiModelProperty
(
value
=
"spu信息"
)
private
GoblinGoodsInfoVo
goblinGoodsInfoVo
;
private
static
final
GoblinShoppingCartVoDetail
obj
=
new
GoblinShoppingCartVoDetail
();
private
static
final
GoblinShoppingCartVoDetail
obj
=
new
GoblinShoppingCartVoDetail
();
public
static
GoblinShoppingCartVoDetail
getNew
()
{
public
static
GoblinShoppingCartVoDetail
getNew
()
{
try
{
try
{
...
...
liquidnet-bus-config/liquidnet-config/application-test.yml
View file @
02b599ae
...
@@ -104,6 +104,7 @@ liquidnet:
...
@@ -104,6 +104,7 @@ liquidnet:
pay
:
http://ttestdragon.zhengzai.tv/dragon/pay/dragonPay
pay
:
http://ttestdragon.zhengzai.tv/dragon/pay/dragonPay
check
:
http://ttestdragon.zhengzai.tv/dragon/pay/checkOrder
check
:
http://ttestdragon.zhengzai.tv/dragon/pay/checkOrder
localUrl
:
http://ttestorder.zhengzai.tv/order/order/syncOrder
localUrl
:
http://ttestorder.zhengzai.tv/order/order/syncOrder
goblinUrl
:
http://ttestorder.zhengzai.tv/order/goblin/syncOrder
dragon
:
dragon
:
notifyUrl
:
https://ttestdragon.zhengzai.tv/dragon
notifyUrl
:
https://ttestdragon.zhengzai.tv/dragon
urls
:
urls
:
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinFrontLoginController.java
View file @
02b599ae
...
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
*/
*/
@Api
(
tags
=
"前端需要登陆接口管理"
)
@Api
(
tags
=
"前端需要登陆接口管理"
)
@RestController
@RestController
@RequestMapping
(
"/front"
)
@RequestMapping
(
"/front
Login
"
)
public
class
GoblinFrontLoginController
{
public
class
GoblinFrontLoginController
{
@Autowired
@Autowired
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
...
@@ -35,15 +35,20 @@ public class GoblinFrontLoginController {
...
@@ -35,15 +35,20 @@ public class GoblinFrontLoginController {
@ApiOperation
(
"加入购物车"
)
@ApiOperation
(
"加入购物车"
)
public
ResponseDto
addShopCart
(
@RequestParam
(
name
=
"spuId"
,
required
=
true
)
String
spuId
,
@RequestParam
(
name
=
"storeId"
,
required
=
true
)
String
storeId
,
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
,
@RequestParam
(
name
=
"number"
,
required
=
false
)
Integer
number
)
{
public
ResponseDto
addShopCart
(
@RequestParam
(
name
=
"spuId"
,
required
=
true
)
String
spuId
,
@RequestParam
(
name
=
"storeId"
,
required
=
true
)
String
storeId
,
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
,
@RequestParam
(
name
=
"number"
,
required
=
false
)
Integer
number
)
{
String
userId
=
CurrentUtil
.
getCurrentUid
();
String
userId
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
goblinFrontService
.
addShoopCart
(
spuId
,
storeId
,
skuId
,
number
,
userId
));
return
ResponseDto
.
success
(
goblinFrontService
.
addShoopCart
(
spuId
,
storeId
,
skuId
,
number
,
userId
));
}
}
@GetMapping
(
"updateShopCart"
)
@ApiOperation
(
"修改购物车"
)
public
ResponseDto
updateShopCart
(
@RequestParam
(
name
=
"spuId"
,
required
=
true
)
String
spuId
,
@RequestParam
(
name
=
"storeId"
,
required
=
true
)
String
storeId
,
@RequestParam
(
name
=
"skuId"
,
required
=
true
)
String
skuId
,
@RequestParam
(
name
=
"number"
,
required
=
false
)
Integer
number
)
{
String
userId
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
goblinFrontService
.
updateShopCart
(
spuId
,
storeId
,
skuId
,
number
,
userId
));
}
@GetMapping
(
"getShopCart"
)
@GetMapping
(
"getShopCart"
)
@ApiOperation
(
"获得购物车"
)
@ApiOperation
(
"获得购物车
列表
"
)
public
ResponseDto
<
GoblinShoppingCartVoo
>
getShopCart
()
{
public
ResponseDto
<
GoblinShoppingCartVoo
>
getShopCart
()
{
String
userId
=
CurrentUtil
.
getCurrentUid
();
String
userId
=
CurrentUtil
.
getCurrentUid
();
redisUtil
.
del
(
GoblinRedisConst
.
FRONT_SHOPCART
.
concat
(
userId
));
return
ResponseDto
.
success
((
GoblinShoppingCartVoo
)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_SHOPCART
.
concat
(
userId
)));
return
ResponseDto
.
success
(
);
}
}
...
@@ -53,4 +58,5 @@ public class GoblinFrontLoginController {
...
@@ -53,4 +58,5 @@ public class GoblinFrontLoginController {
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
02b599ae
...
@@ -414,7 +414,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
...
@@ -414,7 +414,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
}
}
}
//调用储存方法
//调用储存方法
//set
RedisMongodbMysqlShop(goblinShoppingCartVoo,userId);
save
RedisMongodbMysqlShop
(
goblinShoppingCartVoo
,
userId
);
}
}
return
true
;
return
true
;
}
}
...
@@ -426,6 +426,16 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
...
@@ -426,6 +426,16 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public
GoblinShoppingCartVoo
getShoppCart
(
String
userId
){
public
GoblinShoppingCartVoo
getShoppCart
(
String
userId
){
//判断该用户 redis里是否有购物车
//判断该用户 redis里是否有购物车
GoblinShoppingCartVoo
goblinShoppingCartVoo
=
(
GoblinShoppingCartVoo
)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_SHOPCART
.
concat
(
userId
));
GoblinShoppingCartVoo
goblinShoppingCartVoo
=
(
GoblinShoppingCartVoo
)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_SHOPCART
.
concat
(
userId
));
//遍历里面信息
for
(
GoblinShoppingCartVo
goblinShoppingCartVo:
goblinShoppingCartVoo
.
getShopList
()){
for
(
GoblinShoppingCartVoDetail
goblinShoppingCartVoDetail:
goblinShoppingCartVo
.
getSkuList
()){
//找到对应的 spu 和 sku
GoblinGoodsInfoVo
goblinGoodsInfoVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
goblinShoppingCartVoDetail
.
getSpuId
());
GoblinGoodsSkuInfoVo
goblinGoodsSkuInfoVo
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
goblinShoppingCartVoDetail
.
getSkuId
());
}
}
return
goblinShoppingCartVoo
;
return
goblinShoppingCartVoo
;
}
}
public
GoblinShoppingCartVoDetail
setValue
(
String
userId
,
String
storeId
,
String
spuId
,
String
skuId
,
Integer
number
){
public
GoblinShoppingCartVoDetail
setValue
(
String
userId
,
String
storeId
,
String
spuId
,
String
skuId
,
Integer
number
){
...
...
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