记得上下班打卡 | 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
5d43bf9a
Commit
5d43bf9a
authored
Jan 27, 2024
by
zhangguobing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~api:券商品业务-完善申请退款处理;
parent
a5cb6e4a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
3 deletions
+36
-3
GoblinBackOrderSkuVo.java
...liquidnet/service/goblin/dto/vo/GoblinBackOrderSkuVo.java
+5
-0
CandyUserCouponAssocDto.java
.../liquidnet/service/candy/dto/CandyUserCouponAssocDto.java
+1
-1
GoblinOrderAppServiceImpl.java
...ervice/goblin/service/impl/GoblinOrderAppServiceImpl.java
+16
-0
GoblinStoreBackOrderServiceImpl.java
.../service/impl/manage/GoblinStoreBackOrderServiceImpl.java
+12
-0
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+1
-1
PlatformCandyCouponService.java
...atform/service/impl/candy/PlatformCandyCouponService.java
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinBackOrderSkuVo.java
View file @
5d43bf9a
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -17,6 +18,7 @@ import java.math.BigDecimal;
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinBackOrderSkuVo
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
value
=
"orderSkuId"
)
...
...
@@ -42,6 +44,9 @@ public class GoblinBackOrderSkuVo implements Serializable,Cloneable {
@ApiModelProperty
(
value
=
"创建时间"
)
private
String
createdAt
;
@ApiModelProperty
(
value
=
"商品类型[0-常规|1-数字藏品|2-券类商品]"
)
private
int
skuType
;
private
static
final
GoblinBackOrderSkuVo
obj
=
new
GoblinBackOrderSkuVo
();
public
static
GoblinBackOrderSkuVo
getNew
()
{
...
...
liquidnet-bus-do/liquidnet-service-candy-do/src/main/java/com/liquidnet/service/candy/dto/CandyUserCouponAssocDto.java
View file @
5d43bf9a
...
...
@@ -37,7 +37,7 @@ public class CandyUserCouponAssocDto implements Serializable, Cloneable {
if
(
null
==
userCouponAssoc
)
return
this
;
this
.
setIdType
(
userCouponAssoc
.
getIdType
());
this
.
setIdName
(
userCouponAssoc
.
getIdName
());
this
.
setIdN
ame
(
userCouponAssoc
.
getIdNo
());
this
.
setIdN
o
(
userCouponAssoc
.
getIdNo
());
return
this
;
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinOrderAppServiceImpl.java
View file @
5d43bf9a
...
...
@@ -331,6 +331,13 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
}
else
if
(
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
())
{
if
(
param
.
getOrderSkuId
()
!=
null
)
{
GoblinOrderSkuVo
orderSkuVo
=
redisUtils
.
getGoblinOrderSkuVo
(
param
.
getOrderSkuId
());
if
(
2
==
orderSkuVo
.
getSkuType
())
{
// 券类商品-校验发放的券是否已使用
List
<
GoblinUserCouponVo
>
userCouponVos
=
redisUtils
.
getUserCouponVos
(
orderVo
.
getUserId
());
// 券类商品默认一个商品对应一个券,下单只可购买一张
GoblinUserCouponVo
userCouponVo
=
userCouponVos
.
stream
().
filter
(
c
->
c
.
getUcouponId
().
equals
(
orderSkuVo
.
getOrderSkuId
())).
findAny
().
orElse
(
null
);
if
(
null
!=
userCouponVo
&&
5
==
userCouponVo
.
getState
())
{
// 券状态为'5-已使用',则不可申请退款
return
ResponseDto
.
failure
(
"券已使用,不可申请"
);
}
}
//订单款式状态修改
orderSkuVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_61
.
getValue
());
GoblinBackOrderSkuVo
backOrderSkuVo
=
GoblinBackOrderSkuVo
.
getNew
();
...
...
@@ -343,6 +350,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
backOrderSkuVo
.
setRefundPrice
(
orderSkuVo
.
getSkuPriceActual
());
backOrderSkuVo
.
setSkuSpecs
(
orderSkuVo
.
getSkuSpecs
());
backOrderSkuVo
.
setCreatedAt
(
nowStr
);
backOrderSkuVo
.
setSkuType
(
orderSkuVo
.
getSkuType
());
orderSkuVoList
.
add
(
backOrderSkuVo
);
backOrderLog
(
orderVo
,
orderSkuVo
,
now
);
//redis
...
...
@@ -357,6 +365,13 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
for
(
String
orderSkuId
:
orderVo
.
getOrderSkuVoIds
())
{
//订单款式状态修改
GoblinOrderSkuVo
orderSkuVo
=
redisUtils
.
getGoblinOrderSkuVo
(
orderSkuId
);
if
(
2
==
orderSkuVo
.
getSkuType
())
{
// 券类商品-校验发放的券是否已使用
List
<
GoblinUserCouponVo
>
userCouponVos
=
redisUtils
.
getUserCouponVos
(
orderVo
.
getUserId
());
// 券类商品默认一个商品对应一个券,下单只可购买一张
GoblinUserCouponVo
userCouponVo
=
userCouponVos
.
stream
().
filter
(
c
->
c
.
getUcouponId
().
equals
(
orderSkuVo
.
getOrderSkuId
())).
findAny
().
orElse
(
null
);
if
(
null
!=
userCouponVo
&&
5
==
userCouponVo
.
getState
())
{
// 券状态为'5-已使用',则不可申请退款
return
ResponseDto
.
failure
(
"券已使用,不可申请"
);
}
}
orderSkuVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_61
.
getValue
());
GoblinBackOrderSkuVo
backOrderSkuVo
=
GoblinBackOrderSkuVo
.
getNew
();
backOrderSkuVo
.
setOrderSkuId
(
orderSkuId
);
...
...
@@ -368,6 +383,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
backOrderSkuVo
.
setSkuPic
(
orderSkuVo
.
getSkuImage
());
backOrderSkuVo
.
setRefundPrice
(
orderSkuVo
.
getSkuPriceActual
());
backOrderSkuVo
.
setCreatedAt
(
nowStr
);
backOrderSkuVo
.
setSkuType
(
orderSkuVo
.
getSkuType
());
orderSkuVoList
.
add
(
backOrderSkuVo
);
backOrderLog
(
orderVo
,
orderSkuVo
,
now
);
//redis
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreBackOrderServiceImpl.java
View file @
5d43bf9a
...
...
@@ -162,6 +162,18 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
if
(
backOrderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_0
.
getValue
())){
return
ResponseDto
.
failure
(
"已经发起"
);
}
{
// 券类商品-校验发放的券是否已使用
List
<
GoblinBackOrderSkuVo
>
backOrderSkuVos
=
backOrderVo
.
getBackOrderSkuVos
();
for
(
GoblinBackOrderSkuVo
backOrderSkuVo
:
backOrderSkuVos
)
{
if
(
2
==
backOrderSkuVo
.
getSkuType
())
{
List
<
GoblinUserCouponVo
>
userCouponVos
=
redisUtils
.
getUserCouponVos
(
backOrderVo
.
getUserId
());
// 券类商品默认一个商品对应一个券,下单只可购买一张
GoblinUserCouponVo
userCouponVo
=
userCouponVos
.
stream
().
filter
(
c
->
c
.
getUcouponId
().
equals
(
backOrderSkuVo
.
getOrderSkuId
())).
findAny
().
orElse
(
null
);
if
(
null
!=
userCouponVo
&&
5
==
userCouponVo
.
getState
())
{
// 券状态为'5-已使用',则不可退款
return
ResponseDto
.
failure
(
"券已使用,不可退款"
);
}
}
}
}
backOrderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_0
.
getValue
());
backOrderVo
.
setAuditAt
(
nowStr
);
//添加日志
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
5d43bf9a
...
...
@@ -937,7 +937,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if
(
2
==
orderSkuVo
.
getSkuType
())
{
// 判定券类商品时,直接设置状态为已完成
storeOrder
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
());
orderSkuVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_4
.
getValue
());
// 券类商品创建发放券任务
// 券类商品创建发放券任务
,券类商品默认一个商品对应一个券,下单只可购买一张
initCandyMgtCouponObjs
.
add
(
new
Object
[]{
orderSkuVo
.
getOrderSkuId
(),
orderSkuVo
.
getSkuId
(),
orderVo
.
getUserMobile
(),
now
,
CandyRedisConst
.
OPERATOR_MGT_COUPON_BY_SKU
,
now
});
}
else
{
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/candy/PlatformCandyCouponService.java
View file @
5d43bf9a
...
...
@@ -363,7 +363,7 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
GoblinOrderSkuVo
goblinOrderSkuVo
=
(
GoblinOrderSkuVo
)
redisGoblinUtil
.
get
(
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_SKU
.
concat
(
mgtCoupon
.
getMcouponId
()));
if
(!
Objects
.
isNull
(
goblinOrderSkuVo
))
{
CandyUserCouponAssoc
userCouponAssoc
=
new
CandyUserCouponAssoc
();
userCoupon
.
setUcouponId
(
mcouponId
);
userCoupon
.
setUcouponId
(
mcouponId
);
// 券类商品默认一个商品对应一个券,下单只可购买一张
userCouponAssoc
.
setUcouponId
(
userCoupon
.
getUcouponId
());
userCouponAssoc
.
setIdType
(
goblinOrderSkuVo
.
getIdType
());
userCouponAssoc
.
setIdName
(
goblinOrderSkuVo
.
getIdName
());
...
...
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