Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
df8807fb
Commit
df8807fb
authored
Jun 08, 2021
by
王世昌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1ef5a019
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/AddGoodsVOAdapter.java
+0
-5
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/coupon/KgdCouponServiceImpl.java
+4
-5
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractAddGoodsService.java
+1
-3
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/AddGoodsVOAdapter.java
View file @
df8807fb
...
@@ -6,17 +6,12 @@ import cn.freemud.demo.entities.dto.goods.add.MCoffeeAddGoodsVO;
...
@@ -6,17 +6,12 @@ import cn.freemud.demo.entities.dto.goods.add.MCoffeeAddGoodsVO;
import
cn.freemud.demo.entities.dto.goods.add.PlatformAddGoodsVO
;
import
cn.freemud.demo.entities.dto.goods.add.PlatformAddGoodsVO
;
import
cn.freemud.demo.enums.BizTypeEnum
;
import
cn.freemud.demo.enums.BizTypeEnum
;
import
cn.freemud.utils.BeanUtil
;
import
cn.freemud.utils.BeanUtil
;
import
ma.glasnost.orika.MapperFacade
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
@Component
@Component
public
class
AddGoodsVOAdapter
{
public
class
AddGoodsVOAdapter
{
@Resource
private
MapperFacade
mapperFacade
;
public
BaseAddGoodsVO
convert2AddGoodsVO
(
String
bizType
,
ShoppingCartGoodsBO
baseAddGoodsBO
)
{
public
BaseAddGoodsVO
convert2AddGoodsVO
(
String
bizType
,
ShoppingCartGoodsBO
baseAddGoodsBO
)
{
BaseAddGoodsVO
baseAddGoodsVO
;
BaseAddGoodsVO
baseAddGoodsVO
;
if
(
BizTypeEnum
.
MCOFFEE
.
getCode
().
equals
(
bizType
))
{
if
(
BizTypeEnum
.
MCOFFEE
.
getCode
().
equals
(
bizType
))
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/coupon/KgdCouponServiceImpl.java
View file @
df8807fb
...
@@ -108,16 +108,15 @@ public class KgdCouponServiceImpl implements CouponService {
...
@@ -108,16 +108,15 @@ public class KgdCouponServiceImpl implements CouponService {
if
(
couponDetail
==
null
||
!
couponDetail
.
getResult
().
equals
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_1
)
||
CollectionUtils
.
isEmpty
(
couponDetail
.
getDetails
()))
{
if
(
couponDetail
==
null
||
!
couponDetail
.
getResult
().
equals
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_1
)
||
CollectionUtils
.
isEmpty
(
couponDetail
.
getDetails
()))
{
return
null
;
return
null
;
}
}
if
(
CollectionUtils
.
isEmpty
(
couponDetail
.
getDetails
()))
{
return
null
;
}
Integer
couponType
=
0
;
Integer
couponType
=
0
;
CouponDetailBO
.
Details
couponActivityDetail
=
null
;
CouponDetailBO
.
Details
couponActivityDetail
=
null
;
// 多规格券
// 多规格券
if
(
StringUtils
.
isNotBlank
(
getCheckSpqBo
.
getSkuId
())){
if
(
StringUtils
.
isNotBlank
(
getCheckSpqBo
.
getSkuId
())){
for
(
CouponDetailBO
.
Details
detail
:
couponDetail
.
getDetails
())
{
for
(
CouponDetailBO
.
Details
detail
:
couponDetail
.
getDetails
())
{
if
(
Objects
.
nonNull
(
couponActivityDetail
))
break
;
if
(
Objects
.
nonNull
(
couponActivityDetail
)){
if
(!
CouponStatus
.
STATUS_0
.
getCode
().
equals
(
detail
.
getStatus
())
||
!
CouponStatus
.
STATUS_2
.
getCode
().
equals
(
detail
.
getStatus
())){
break
;
}
if
(!
CouponStatus
.
STATUS_0
.
getCode
().
equals
(
detail
.
getStatus
())
&&
!
CouponStatus
.
STATUS_2
.
getCode
().
equals
(
detail
.
getStatus
())){
continue
;
continue
;
}
}
for
(
CouponDetailBO
.
ActiveProduct
activeProduct
:
detail
.
getActiveProduct
())
{
for
(
CouponDetailBO
.
ActiveProduct
activeProduct
:
detail
.
getActiveProduct
())
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractAddGoodsService.java
View file @
df8807fb
...
@@ -222,9 +222,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -222,9 +222,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
if
(
CollectionUtils
.
isEmpty
(
allCartGoodsList
))
{
if
(
CollectionUtils
.
isEmpty
(
allCartGoodsList
))
{
allCartGoodsList
=
new
ArrayList
<>();
allCartGoodsList
=
new
ArrayList
<>();
}
}
bo
.
setCartGoods
(
allCartGoodsList
);
List
<
CartGoods
>
oldCartGoodsList
=
BeanUtil
.
convertBeans
(
allCartGoodsList
,
CartGoods:
:
new
);
bo
.
setCartGoods
(
oldCartGoodsList
);
// 转换商品券购物车添加的商品
// 转换商品券购物车添加的商品
if
(
Objects
.
nonNull
(
spqBO
))
{
if
(
Objects
.
nonNull
(
spqBO
))
{
...
...
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