记得上下班打卡 | 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
99cf0bc4
Commit
99cf0bc4
authored
Feb 24, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加使用 临时券(平台券一种)接口
parent
4b3bd2ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
18 deletions
+36
-18
GoblinGoodsInfoVo.java
...om/liquidnet/service/goblin/dto/vo/GoblinGoodsInfoVo.java
+6
-4
GoblinOrderServiceImpl.java
...t/service/goblin/service/impl/GoblinOrderServiceImpl.java
+20
-10
GoblinInnerServiceImpl.java
...ice/goblin/service/impl/inner/GoblinInnerServiceImpl.java
+9
-3
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsInfoVo.java
View file @
99cf0bc4
...
@@ -80,7 +80,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
...
@@ -80,7 +80,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
38
,
value
=
"删除标记[0-未删除|1-删除]"
)
@ApiModelProperty
(
position
=
38
,
value
=
"删除标记[0-未删除|1-删除]"
)
private
String
delFlg
;
private
String
delFlg
;
@ApiModelProperty
(
position
=
39
,
value
=
"上架时间"
)
@ApiModelProperty
(
position
=
39
,
value
=
"上架时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
shelvesAt
;
private
LocalDateTime
shelvesAt
;
@ApiModelProperty
(
position
=
40
,
value
=
"商品图片列表"
)
@ApiModelProperty
(
position
=
40
,
value
=
"商品图片列表"
)
private
List
<
String
>
imageList
;
private
List
<
String
>
imageList
;
...
@@ -88,13 +88,13 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
...
@@ -88,13 +88,13 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private
String
logisticsTemplate
;
private
String
logisticsTemplate
;
private
String
createdBy
;
private
String
createdBy
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
createdAt
;
private
LocalDateTime
createdAt
;
private
String
updatedBy
;
private
String
updatedBy
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
updatedAt
;
private
LocalDateTime
updatedAt
;
private
String
deletedBy
;
private
String
deletedBy
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
deletedAt
;
private
LocalDateTime
deletedAt
;
@ApiModelProperty
(
position
=
51
,
value
=
"规格信息"
)
@ApiModelProperty
(
position
=
51
,
value
=
"规格信息"
)
...
@@ -119,6 +119,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
...
@@ -119,6 +119,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private
Integer
count
;
private
Integer
count
;
@ApiModelProperty
(
position
=
62
,
value
=
"商铺名称"
)
@ApiModelProperty
(
position
=
62
,
value
=
"商铺名称"
)
private
String
storeName
;
private
String
storeName
;
@ApiModelProperty
(
position
=
63
,
value
=
"skuList"
)
private
List
<
GoblinGoodsSkuInfoVo
>
goblinOrderSkuVos
;
private
static
final
GoblinGoodsInfoVo
obj
=
new
GoblinGoodsInfoVo
();
private
static
final
GoblinGoodsInfoVo
obj
=
new
GoblinGoodsInfoVo
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinOrderServiceImpl.java
View file @
99cf0bc4
...
@@ -287,22 +287,32 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -287,22 +287,32 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
//优惠券
//优惠券
BigDecimal
voucherPrice
=
BigDecimal
.
ZERO
;
BigDecimal
voucherPrice
=
BigDecimal
.
ZERO
;
if
(
platVoucherCode
!=
null
&&
!
platVoucherCode
.
equals
(
""
))
{
if
(
platVoucherCode
!=
null
&&
!
platVoucherCode
.
equals
(
""
))
{
TempCouponVo
tempCouponVo
=
redisUtils
.
getTempCoupon
(
platVoucherCode
);
String
spuIds
=
""
;
String
spuIds
=
""
;
for
(
GoblinOrderSkuParam
item
:
storeParam
.
getGoblinOrderSkuParamArrayList
())
{
for
(
GoblinOrderSkuParam
item
:
storeParam
.
getGoblinOrderSkuParamArrayList
())
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
item
.
getSpuId
());
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
item
.
getSpuId
());
if
(
pre
!=
null
)
{
if
(
pre
!=
null
)
{
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
().
split
(
pre
)[
0
]);
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
().
split
(
pre
)[
0
]);
}
else
{
}
else
{
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
());
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
());
}
}
}
}
HashMap
<
String
,
Object
>
hashMap
=
orderUtils
.
useCoupon
(
platVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
);
if
(
tempCouponVo
!=
null
)
{
voucherPrice
=
(
BigDecimal
)
hashMap
.
get
(
"voucher"
);
for
(
String
spuId
:
spuIds
.
split
(
","
))
{
Integer
typeVoucher
=
(
Integer
)
hashMap
.
get
(
"type"
);
if
(
tempCouponVo
.
getSpuIdList
().
contains
(
spuId
))
{
if
(
typeVoucher
.
equals
(-
1
))
{
voucherPrice
=
tempCouponVo
.
getValue
();
throw
new
Exception
(
"平台券不可用"
);
break
;
}
}
}
else
{
}
else
{
platformCodeList
.
add
(
platVoucherCode
);
HashMap
<
String
,
Object
>
hashMap
=
orderUtils
.
useCoupon
(
platVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
);
voucherPrice
=
(
BigDecimal
)
hashMap
.
get
(
"voucher"
);
Integer
typeVoucher
=
(
Integer
)
hashMap
.
get
(
"type"
);
if
(
typeVoucher
.
equals
(-
1
))
{
throw
new
Exception
(
"平台券不可用"
);
}
else
{
platformCodeList
.
add
(
platVoucherCode
);
}
}
}
}
}
//商铺券
//商铺券
...
@@ -312,9 +322,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -312,9 +322,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
for
(
GoblinOrderSkuParam
item
:
storeParam
.
getGoblinOrderSkuParamArrayList
())
{
for
(
GoblinOrderSkuParam
item
:
storeParam
.
getGoblinOrderSkuParamArrayList
())
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
item
.
getSpuId
());
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
item
.
getSpuId
());
if
(
pre
!=
null
)
{
if
(
pre
!=
null
)
{
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
().
split
(
pre
)[
0
]);
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
().
split
(
pre
)[
0
]);
}
else
{
}
else
{
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
());
spuIds
=
spuIds
.
concat
(
","
+
item
.
getSpuId
());
}
}
}
}
GoblinUseResultVo
storeCouponVo
=
goblinCouponService
.
useCoupon
(
storeVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
,
uid
);
GoblinUseResultVo
storeCouponVo
=
goblinCouponService
.
useCoupon
(
storeVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
,
uid
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/inner/GoblinInnerServiceImpl.java
View file @
99cf0bc4
...
@@ -5,9 +5,7 @@ import com.alibaba.excel.read.listener.PageReadListener;
...
@@ -5,9 +5,7 @@ import com.alibaba.excel.read.listener.PageReadListener;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.TempCouponDto
;
import
com.liquidnet.service.goblin.dto.TempCouponDto
;
import
com.liquidnet.service.goblin.dto.vo.ArDataVo
;
import
com.liquidnet.service.goblin.dto.vo.*
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.TempCouponVo
;
import
com.liquidnet.service.goblin.service.GoblinFrontService
;
import
com.liquidnet.service.goblin.service.GoblinFrontService
;
import
com.liquidnet.service.goblin.service.manage.IGoblinInnerService
;
import
com.liquidnet.service.goblin.service.manage.IGoblinInnerService
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
...
@@ -69,6 +67,14 @@ public class GoblinInnerServiceImpl implements IGoblinInnerService {
...
@@ -69,6 +67,14 @@ public class GoblinInnerServiceImpl implements IGoblinInnerService {
vo
.
setTempCouponVos
(
tempCouponVos
);
vo
.
setTempCouponVos
(
tempCouponVos
);
//商品
//商品
List
<
GoblinGoodsInfoVo
>
goodsInfoVos
=
goblinFrontService
.
getGoodByMusicTagP
(
tag
,
performanceId
);
List
<
GoblinGoodsInfoVo
>
goodsInfoVos
=
goblinFrontService
.
getGoodByMusicTagP
(
tag
,
performanceId
);
for
(
GoblinGoodsInfoVo
spuVo
:
goodsInfoVos
)
{
List
<
GoblinGoodsSkuInfoVo
>
skuVoList
=
ObjectUtil
.
getGoblinGoodsSkuInfoVoArrayList
();
for
(
String
skuId
:
spuVo
.
getSkuIdList
())
{
GoblinGoodsSkuInfoVo
skuVo
=
redisUtils
.
getGoodsSkuInfoVo
(
skuId
);
skuVoList
.
add
(
skuVo
);
}
spuVo
.
setGoblinOrderSkuVos
(
skuVoList
);
}
vo
.
setGoodsInfoVos
(
goodsInfoVos
);
vo
.
setGoodsInfoVos
(
goodsInfoVos
);
return
ResponseDto
.
success
(
vo
);
return
ResponseDto
.
success
(
vo
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
99cf0bc4
...
@@ -1190,7 +1190,7 @@ public class GoblinRedisUtils {
...
@@ -1190,7 +1190,7 @@ public class GoblinRedisUtils {
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_TEMP_COUPON
.
concat
(
ucouponId
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_TEMP_COUPON
.
concat
(
ucouponId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
return
TempCouponVo
.
getNew
()
;
return
null
;
}
else
{
}
else
{
return
(
TempCouponVo
)
obj
;
return
(
TempCouponVo
)
obj
;
}
}
...
...
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