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
23b82cf7
Commit
23b82cf7
authored
Jan 12, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重构
parent
310d40ea
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
725 additions
and
162 deletions
+725
-162
shopping-cart-application-service/pom.xml
+6
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/manager/ProductDTO2BOAdapter.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/AddGoodsBOAdapter.java
+202
-13
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/CartGoodsExtra.java
+17
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/McoffeeComboxGoodsBO.java
+82
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/McoffeeMaterialBO.java
+22
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/McoffeeProductBO.java
+55
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/PlatformComboxGoodsBO.java
+42
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/PlatformMaterialBO.java
+19
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/PlatformProductBO.java
+11
-5
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/ShoppingCartGoodsBO.java
+3
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/BaseAddGoodsBO.java
+34
-31
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/MCoffeeAddGoodsBO.java
+5
-49
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/MallAddGoodsBO.java
+0
-4
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/PlatformAddGoodsBO.java
+37
-1
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/AddGoodsRequestDTO.java
+15
-21
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/BaseAddGoodsVO.java
+109
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/MCoffeeAddGoodsVO.java
+23
-1
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/MallAddGoodsVO.java
+0
-7
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/PlatformAddGoodsVO.java
+12
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/product/KgdProductServiceImpl.java
+4
-5
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/product/ProductManager.java
+3
-9
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/product/ProductService.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/AbstractAddGoodsService.java
+14
-4
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/MCoffeeAddGoodsService.java
+2
-1
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/PlatformAddGoodsService.java
+2
-7
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ComboxGoodsRequestVo.java
+2
-0
No files found.
shopping-cart-application-service/pom.xml
View file @
23b82cf7
...
...
@@ -297,6 +297,12 @@
<artifactId>
apm-toolkit-logback-1.x
</artifactId>
</dependency>
<dependency>
<groupId>
ma.glasnost.orika
</groupId>
<artifactId>
orika-core
</artifactId>
<version>
1.5.2
</version>
</dependency>
</dependencies>
<build>
<plugins>
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/manager/ProductDTO2BOAdapter.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
adapter
.
manager
;
import
cn.freemud.demo.entities.bo.goods.ProductBO
;
import
cn.freemud.demo.entities.bo.goods.P
latformP
roductBO
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
org.springframework.stereotype.Component
;
@Component
public
class
ProductDTO2BOAdapter
{
public
ProductBO
convert2ProductBO
(
ProductBeanDTO
productBeanDTO
)
{
public
P
latformP
roductBO
convert2ProductBO
(
ProductBeanDTO
productBeanDTO
)
{
return
null
;
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/AddGoodsBOAdapter.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
adapter
.
service
;
import
cn.freemud.demo.entities.ManagerServiceBO
;
import
cn.freemud.demo.entities.bo.goods.
ProductBO
;
import
cn.freemud.demo.entities.bo.goods.
*
;
import
cn.freemud.demo.entities.bo.goods.add.*
;
import
cn.freemud.demo.entities.dto.goods.add.*
;
import
cn.freemud.demo.enums.BizTypeEnum
;
import
cn.freemud.demo.manager.customer.CustomerService
;
import
cn.freemud.demo.manager.product.ProductService
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.ComboxGoodsRequestVo
;
import
cn.freemud.entities.vo.MaterialRequestVo
;
import
cn.freemud.enums.GoodsTypeEnum
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant
;
import
ma.glasnost.orika.MapperFacade
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
@Component
public
class
AddGoodsBOAdapter
{
...
...
@@ -23,6 +35,9 @@ public class AddGoodsBOAdapter {
@Qualifier
(
"KgdProductService"
)
private
ProductService
kgdProductService
;
@Resource
private
MapperFacade
mapperFacade
;
public
BaseAddGoodsBO
convert2AddGoodsBO
(
String
bizType
,
AddGoodsRequestDTO
baseRequestDTO
)
{
BaseAddGoodsBO
baseAddGoodsBO
;
...
...
@@ -35,39 +50,213 @@ public class AddGoodsBOAdapter {
}
private
PlatformAddGoodsBO
createPlatformBO
(
AddGoodsRequestDTO
baseRequestDTO
)
{
PlatformAddGoodsBO
platformAddGoodsBO
=
new
PlatformAddGoodsBO
();
String
skuId
=
StringUtils
.
isNotBlank
(
baseRequestDTO
.
getSkuId
())
?
baseRequestDTO
.
getSkuId
()
:
""
;
ProductBO
productBO
=
convert2ProductVO
();
productBO
.
setSkuId
(
skuId
);
platformAddGoodsBO
.
setAddGoods
(
productBO
);
ManagerServiceBO
build
=
ManagerServiceBO
.
builder
()
PlatformAddGoodsBO
platformAddGoodsBO
=
mapperFacade
.
map
(
baseRequestDTO
,
PlatformAddGoodsBO
.
class
);
PlatformProductBO
platformProductBO
=
convert2PlatformProductBO
(
baseRequestDTO
);
platformAddGoodsBO
.
setAddGoods
(
platformProductBO
);
ManagerServiceBO
managerService
=
ManagerServiceBO
.
builder
()
.
customerService
(
kgdCustomerServIce
)
.
productService
(
kgdProductService
)
.
build
();
platformAddGoodsBO
.
setManagerService
(
build
);
platformAddGoodsBO
.
setManagerService
(
managerService
);
return
platformAddGoodsBO
;
}
private
MCoffeeAddGoodsBO
createMCoffeeBO
(
AddGoodsRequestDTO
baseRequestDTO
)
{
MCoffeeAddGoodsBO
mCoffeeAddGoodsBO
=
new
MCoffeeAddGoodsBO
();
MCoffeeAddGoodsBO
mCoffeeAddGoodsBO
=
mapperFacade
.
map
(
baseRequestDTO
,
MCoffeeAddGoodsBO
.
class
);
McoffeeProductBO
mcoffeeProductBO
=
convert2MCoffeeProductBO
(
mCoffeeAddGoodsBO
);
mCoffeeAddGoodsBO
.
setAddGoods
(
mcoffeeProductBO
);
ManagerServiceBO
build
=
ManagerServiceBO
.
builder
()
ManagerServiceBO
managerService
=
ManagerServiceBO
.
builder
()
.
customerService
(
kgdCustomerServIce
)
.
productService
(
kgdProductService
)
.
build
();
mCoffeeAddGoodsBO
.
setManagerService
(
build
);
mCoffeeAddGoodsBO
.
setManagerService
(
managerService
);
return
mCoffeeAddGoodsBO
;
}
private
ProductBO
convert2ProductVO
()
{
return
null
;
private
PlatformProductBO
convert2PlatformProductBO
(
AddGoodsRequestDTO
baseRequestDTO
)
{
PlatformProductBO
platformProductBO
=
mapperFacade
.
map
(
baseRequestDTO
,
PlatformProductBO
.
class
);
String
spuId
=
baseRequestDTO
.
getSpuId
();
String
skuId
=
baseRequestDTO
.
getSkuId
();
String
goodsId
=
StringUtils
.
isEmpty
(
skuId
)
?
spuId
:
skuId
;
Integer
qty
=
baseRequestDTO
.
getQty
()
==
null
?
1
:
baseRequestDTO
.
getQty
();
platformProductBO
.
setGoodsId
(
goodsId
);
platformProductBO
.
setQty
(
qty
);
Integer
goodsType
=
StringUtils
.
isEmpty
(
skuId
)||
ObjectUtils
.
equals
(
spuId
,
skuId
)
?
GoodsTypeEnum
.
SPU_GOODS
.
getGoodsType
()
:
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
();
if
(
spuId
.
startsWith
(
CommonsConstant
.
COUPON_PREFIX
))
{
goodsType
=
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
();
}
else
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductGroupList
()))
{
goodsType
=
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
();
}
platformProductBO
.
setGoodsType
(
goodsType
);
List
<
PlatformComboxGoodsBO
>
productComboList
=
new
ArrayList
<>();
List
<
PlatformComboxGoodsBO
>
productGroupList
=
new
ArrayList
<>();
List
<
PlatformMaterialBO
>
materialGoodsList
=
new
ArrayList
<>();
//套餐
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductComboList
()))
{
for
(
ComboxGoodsRequestVo
vo
:
baseRequestDTO
.
getProductComboList
())
{
PlatformComboxGoodsBO
productCombox
=
new
PlatformComboxGoodsBO
();
productCombox
.
setGoodsId
(
vo
.
getSkuId
());
productCombox
.
setSkuId
(
vo
.
getSkuId
());
productCombox
.
setQty
(
vo
.
getQty
());
List
<
CartGoodsExtra
>
cartGoodsExtras
=
mapperFacade
.
mapAsList
(
vo
.
getExtra
(),
CartGoodsExtra
.
class
);
productCombox
.
setExtra
(
cartGoodsExtras
);
productComboList
.
add
(
productCombox
);
}
}
//固定商品组
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductGroupList
()))
{
for
(
ComboxGoodsRequestVo
vo
:
baseRequestDTO
.
getProductGroupList
())
{
PlatformComboxGoodsBO
productCombox
=
new
PlatformComboxGoodsBO
();
productCombox
.
setGoodsId
(
vo
.
getSkuId
());
productCombox
.
setSkuId
(
vo
.
getSkuId
());
productCombox
.
setQty
(
vo
.
getQty
());
List
<
CartGoodsExtra
>
cartGoodsExtras
=
mapperFacade
.
mapAsList
(
vo
.
getExtra
(),
CartGoodsExtra
.
class
);
productCombox
.
setExtra
(
cartGoodsExtras
);
productCombox
.
setProductGroupId
(
vo
.
getProductGroupId
()
==
null
?
null
:
vo
.
getProductGroupId
());
productGroupList
.
add
(
productCombox
);
}
}
//加料商品集
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductMaterialList
()))
{
for
(
MaterialRequestVo
materialRequestVo
:
baseRequestDTO
.
getProductMaterialList
())
{
PlatformMaterialBO
materialGoods
=
new
PlatformMaterialBO
();
materialGoods
.
setSpuId
(
materialRequestVo
.
getSpuId
());
materialGoodsList
.
add
(
materialGoods
);
}
}
platformProductBO
.
setProductComboList
(
productComboList
);
platformProductBO
.
setProductGroupList
(
productGroupList
);
platformProductBO
.
setProductMaterialList
(
materialGoodsList
);
return
platformProductBO
;
}
private
McoffeeProductBO
convert2MCoffeeProductBO
(
MCoffeeAddGoodsBO
baseRequestDTO
)
{
McoffeeProductBO
mcoffeeProductBO
=
mapperFacade
.
map
(
baseRequestDTO
,
McoffeeProductBO
.
class
);
String
spuId
=
baseRequestDTO
.
getSpuId
();
String
skuId
=
baseRequestDTO
.
getSkuId
();
String
goodsId
=
StringUtils
.
isEmpty
(
skuId
)
?
spuId
:
skuId
;
Integer
qty
=
baseRequestDTO
.
getQty
()
==
null
?
1
:
baseRequestDTO
.
getQty
();
mcoffeeProductBO
.
setGoodsId
(
goodsId
);
mcoffeeProductBO
.
setSpuId
(
spuId
);
mcoffeeProductBO
.
setSkuId
(
skuId
);
mcoffeeProductBO
.
setQty
(
qty
);
Integer
goodsType
=
StringUtils
.
isEmpty
(
skuId
)
||
ObjectUtils
.
equals
(
spuId
,
skuId
)
?
GoodsTypeEnum
.
SPU_GOODS
.
getGoodsType
()
:
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
();
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductGroupList
()))
{
goodsType
=
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
();
}
else
if
(
CommonsConstant
.
COUPON_TYPE
==
baseRequestDTO
.
getCouponType
()){
goodsType
=
GoodsTypeEnum
.
ALL_COUPON_GOODS
.
getGoodsType
();
}
if
(
baseRequestDTO
.
getOperationType
()
!=
null
&&
baseRequestDTO
.
getOperationType
()
==
2
)
{
goodsType
=
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
();
}
mcoffeeProductBO
.
setGoodsType
(
goodsType
);
List
<
CartGoodsExtra
>
cartGoodsExtras
=
mapperFacade
.
mapAsList
(
baseRequestDTO
.
getExtra
(),
CartGoodsExtra
.
class
);
mcoffeeProductBO
.
setExtra
(
cartGoodsExtras
);
List
<
CartGoodsExtra
>
sprcialExtras
=
mapperFacade
.
mapAsList
(
baseRequestDTO
.
getExtra
(),
CartGoodsExtra
.
class
);
mcoffeeProductBO
.
setSpecialExtra
(
sprcialExtras
);
List
<
McoffeeComboxGoodsBO
>
productComboList
=
new
ArrayList
<>();
List
<
McoffeeComboxGoodsBO
>
productGroupList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductComboList
()))
{
for
(
ComboxGoodsRequestVo
vo
:
baseRequestDTO
.
getProductComboList
())
{
McoffeeComboxGoodsBO
productCombox
=
new
McoffeeComboxGoodsBO
();
productCombox
.
setGoodsId
(
vo
.
getSkuId
());
productCombox
.
setSkuId
(
vo
.
getSkuId
());
productCombox
.
setSpuId
(
vo
.
getSpuId
());
productCombox
.
setQty
(
vo
.
getQty
());
List
<
CartGoodsExtra
>
extras
=
mapperFacade
.
mapAsList
(
vo
.
getExtra
(),
CartGoodsExtra
.
class
);
List
<
CartGoodsExtra
>
specialExtra
=
mapperFacade
.
mapAsList
(
vo
.
getSpecialExtra
(),
CartGoodsExtra
.
class
);
productCombox
.
setExtra
(
extras
);
productCombox
.
setSpecialExtra
(
specialExtra
);
//加料商品集
if
(
CollectionUtils
.
isNotEmpty
(
vo
.
getProductMaterialList
()))
{
List
<
McoffeeMaterialBO
>
comboxMaterialGoodsList
=
new
ArrayList
<>();
for
(
MaterialRequestVo
materialRequestVo
:
vo
.
getProductMaterialList
())
{
McoffeeMaterialBO
materialGoods
=
new
McoffeeMaterialBO
();
materialGoods
.
setSpuId
(
materialRequestVo
.
getSpuId
());
materialGoods
.
setCustomerCode
(
materialRequestVo
.
getCustomerCode
());
comboxMaterialGoodsList
.
add
(
materialGoods
);
}
productCombox
.
setProductMaterialList
(
comboxMaterialGoodsList
);
}
productComboList
.
add
(
productCombox
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductGroupList
()))
{
for
(
ComboxGoodsRequestVo
vo
:
baseRequestDTO
.
getProductGroupList
())
{
McoffeeComboxGoodsBO
productCombox
=
new
McoffeeComboxGoodsBO
();
productCombox
.
setGoodsId
(
vo
.
getSkuId
());
productCombox
.
setSkuId
(
vo
.
getSkuId
());
productCombox
.
setSpuId
(
vo
.
getSpuId
());
productCombox
.
setQty
(
vo
.
getQty
());
List
<
CartGoodsExtra
>
extras
=
mapperFacade
.
mapAsList
(
vo
.
getExtra
(),
CartGoodsExtra
.
class
);
List
<
CartGoodsExtra
>
specialExtra
=
mapperFacade
.
mapAsList
(
vo
.
getSpecialExtra
(),
CartGoodsExtra
.
class
);
productCombox
.
setExtra
(
extras
);
productCombox
.
setSpecialExtra
(
specialExtra
);
productCombox
.
setProductGroupId
(
StringUtils
.
isEmpty
(
vo
.
getProductGroupId
())
?
null
:
Long
.
parseLong
(
vo
.
getProductGroupId
()));
if
(
StringUtils
.
isNotEmpty
(
vo
.
getEmptyKey
())){
productCombox
.
setGoodsId
(
"0"
);
productCombox
.
setSkuId
(
"0"
);
productCombox
.
setSpuId
(
"0"
);
productCombox
.
setCustomerCode
(
vo
.
getEmptyKey
());
productCombox
.
setName
(
"无"
);
productCombox
.
setSpuName
(
"无"
);
productCombox
.
setSkuName
(
"无"
);
productCombox
.
setFinalPrice
(
0L
);
productCombox
.
setOriginalPrice
(
0L
);
productCombox
.
setOriginalAmount
(
0L
);
productCombox
.
setAmount
(
0L
);
productCombox
.
setQty
(
1
);
}
//加料商品集
if
(
CollectionUtils
.
isNotEmpty
(
vo
.
getProductMaterialList
()))
{
List
<
McoffeeMaterialBO
>
comboxMaterialGoodsList
=
new
ArrayList
<>();
for
(
MaterialRequestVo
materialRequestVo
:
vo
.
getProductMaterialList
())
{
McoffeeMaterialBO
materialGoods
=
new
McoffeeMaterialBO
();
materialGoods
.
setSpuId
(
materialRequestVo
.
getSpuId
());
materialGoods
.
setGroupId
(
materialRequestVo
.
getGroupId
());
comboxMaterialGoodsList
.
add
(
materialGoods
);
}
productCombox
.
setProductMaterialList
(
comboxMaterialGoodsList
);
}
productGroupList
.
add
(
productCombox
);
}
}
//加料商品集
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductMaterialList
()))
{
List
<
McoffeeMaterialBO
>
materialGoodsList
=
new
ArrayList
<>();
for
(
MaterialRequestVo
materialRequestVo
:
baseRequestDTO
.
getProductMaterialList
())
{
McoffeeMaterialBO
materialGoods
=
new
McoffeeMaterialBO
();
materialGoods
.
setSpuId
(
materialRequestVo
.
getSpuId
());
materialGoods
.
setGroupId
(
materialRequestVo
.
getGroupId
());
materialGoods
.
setCustomerCode
(
materialRequestVo
.
getCustomerCode
());
materialGoodsList
.
add
(
materialGoods
);
}
mcoffeeProductBO
.
setProductMaterialList
(
materialGoodsList
);
}
mcoffeeProductBO
.
setProductComboList
(
productComboList
);
mcoffeeProductBO
.
setProductGroupList
(
productGroupList
);
return
mcoffeeProductBO
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/CartGoodsExtra.java
0 → 100644
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
;
import
lombok.Data
;
@Data
public
class
CartGoodsExtra
{
/**
* 属性Id
*/
private
String
attributeId
;
/**
* 属性名
*/
private
String
attributeName
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/McoffeeComboxGoodsBO.java
0 → 100644
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
;
import
cn.freemud.entities.vo.CartGoods
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
McoffeeComboxGoodsBO
{
/**
* 麦咖啡多规格商品spuid
*/
private
String
spuId
;
private
String
skuId
;
private
Integer
qty
;
private
String
goodsId
;
/**
* 商品组Id
*/
private
Long
productGroupId
;
/**
* 第三方商品编号
*/
private
String
customerCode
;
/**
* 购物车一行商品的名称
*/
private
String
name
;
/**
* 商品的spuName
*/
private
String
spuName
;
/**
* 商品的skuName
*/
private
String
skuName
;
/**
* 购物车一行商品的现单价
*/
private
Long
finalPrice
;
/**
* 购物车一行商品的原单机
*/
private
Long
originalPrice
;
/**
* 购物车一行商品的原价
*/
private
Long
originalAmount
;
/**
* 购物车一行商品的现价
*/
private
Long
amount
;
/**
* 麦咖啡空键位
*/
private
String
emptyKey
;
/**
* 商品额外的属性
*/
List
<
CartGoodsExtra
>
extra
;
/**
* 商品额外的属性
*/
List
<
CartGoodsExtra
>
specialExtra
;
/**
* 麦咖啡多规格商品加料
*/
private
List
<
McoffeeMaterialBO
>
productMaterialList
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/McoffeeMaterialBO.java
0 → 100644
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
;
import
lombok.Data
;
@Data
public
class
McoffeeMaterialBO
{
/**
* 加料商品ID
*/
private
String
spuId
;
/**
* 加料商品组ID
*/
private
String
groupId
;
/**
* 麦咖啡入机键位
*/
private
String
customerCode
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/McoffeeProductBO.java
0 → 100644
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
McoffeeProductBO
{
private
String
spuId
;
private
String
skuId
;
private
String
goodsId
;
private
String
nodeId
;
private
Integer
goodsType
;
/**
* 数量
*/
private
Integer
qty
;
/**
* 分类名
*/
private
String
categoryName
;
/**
* 商品额外的属性
*/
private
List
<
CartGoodsExtra
>
extra
;
/**
* 商品额外的属性
*/
List
<
CartGoodsExtra
>
specialExtra
;;
/**
* 套餐固定商品
*/
private
List
<
McoffeeComboxGoodsBO
>
productComboList
;
/**
* 套餐可选商品
*/
private
List
<
McoffeeComboxGoodsBO
>
productGroupList
;
/**
* 加料
*/
private
List
<
McoffeeMaterialBO
>
productMaterialList
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/PlatformComboxGoodsBO.java
0 → 100644
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.MaterialRequestVo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PlatformComboxGoodsBO
{
/**
* 麦咖啡多规格商品spuid
*/
private
String
spuId
;
private
String
skuId
;
private
Integer
qty
;
private
String
goodsId
;
/**
* 商品组Id
*/
private
String
productGroupId
;
/**
* 麦咖啡空键位
*/
private
String
emptyKey
;
/**
* 商品额外的属性
*/
List
<
CartGoodsExtra
>
extra
;
/**
* 麦咖啡多规格商品加料
*/
private
List
<
PlatformMaterialBO
>
productMaterialList
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/PlatformMaterialBO.java
0 → 100644
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
;
import
lombok.Data
;
@Data
public
class
PlatformMaterialBO
{
/**
* 加料商品ID
*/
private
String
spuId
;
/**
* 加料商品组ID
*/
private
String
groupId
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/ProductBO.java
→
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/P
latformP
roductBO.java
View file @
23b82cf7
...
...
@@ -9,12 +9,18 @@ import org.hibernate.validator.constraints.NotEmpty;
import
java.util.List
;
@Data
public
class
ProductBO
{
public
class
P
latformP
roductBO
{
private
String
spuId
;
private
String
skuId
;
private
String
goodsId
;
private
String
nodeId
;
private
Integer
goodsType
;
/**
* 数量
*/
...
...
@@ -28,21 +34,21 @@ public class ProductBO {
/**
* 商品额外的属性
*/
private
List
<
CartGoods
.
CartGoods
Extra
>
extra
;
private
List
<
CartGoodsExtra
>
extra
;
/**
* 套餐固定商品
*/
private
List
<
ComboxGoodsRequestVo
>
productComboList
;
private
List
<
PlatformComboxGoodsBO
>
productComboList
;
/**
* 套餐可选商品
*/
private
List
<
ComboxGoodsRequestVo
>
productGroupList
;
private
List
<
PlatformComboxGoodsBO
>
productGroupList
;
/**
* 加料
*/
private
List
<
MaterialRequestVo
>
productMaterialList
;
private
List
<
PlatformMaterialBO
>
productMaterialList
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/ShoppingCartGoodsBO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
;
import
lombok.Data
;
@Data
public
class
ShoppingCartGoodsBO
{
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/BaseAddGoodsBO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
.
add
;
import
cn.freemud.demo.entities.ManagerServiceBO
;
import
cn.freemud.demo.entities.bo.goods.ProductBO
;
import
cn.freemud.demo.entities.bo.goods.ShoppingCartGoodsBO
;
import
cn.freemud.demo.entities.bo.goods.PlatformProductBO
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
@Data
public
class
BaseAddGoodsBO
{
...
...
@@ -16,6 +16,20 @@ public class BaseAddGoodsBO {
private
String
shopId
;
@NotEmpty
(
message
=
"spuId不能为空"
)
private
String
spuId
;
private
String
skuId
;
private
ManagerServiceBO
managerService
;
/**
* 微信appId
*/
@NotEmpty
(
message
=
"appId不能为空"
)
private
String
appId
;
/**
* 收货地址ID、svc卡支付外卖订单必传
*/
...
...
@@ -31,41 +45,30 @@ public class BaseAddGoodsBO {
*/
private
String
couponCode
;
private
ProductBO
addGoods
;
private
ShoppingCartGoodsBO
oldShoppingCartGoods
;
private
String
wxappid
;
private
ShoppingCartGoodsBO
newShoppingCartGoods
;
private
ManagerServiceBO
managerService
;
@Data
public
final
static
class
Property
{
private
String
wxappid
;
/**
* 下单类型 CreateOrderType 外卖、到店、商城
*/
private
Integer
orderType
;
/**
* 下单类型 CreateOrderType 外卖、到店、商城
*/
private
Integer
order
Type
;
/**
* 渠道类型 OrderChannelType
*/
private
String
channel
Type
;
/**
* 渠道类型 OrderChannelType
*/
private
String
channelType
;
/**
* 购物车版本号(拼单)
*/
private
Integer
carVer
;
/**
* 购物车版本号(拼单)
*/
private
Integer
carVer
;
/**
* 业务类型: 0 : 自提 1:外卖 2:微商城
*/
private
String
menuType
;
/**
* 业务类型: 0 : 自提 1:外卖 2:微商城
*/
private
String
menuType
;
private
String
tableNumber
;
private
String
tableNumber
;
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/MCoffeeAddGoodsBO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
.
add
;
import
cn.freemud.demo.entities.bo.goods.McoffeeProductBO
;
import
cn.freemud.demo.entities.bo.goods.PlatformProductBO
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.ComboxGoodsRequestVo
;
import
cn.freemud.entities.vo.MaterialRequestVo
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
java.util.List
;
@Data
public
class
MCoffeeAddGoodsBO
extends
BaseAddGoodsBO
{
@NotEmpty
(
message
=
"sessionId不能为空"
)
private
String
sessionId
;
/**
* 商户Id
*/
@NotEmpty
(
message
=
"partnerId不能为空"
)
private
String
partnerId
;
/**
* 微信appId
*/
@NotEmpty
(
message
=
"appId不能为空"
)
private
String
appId
;
/**
* 门店Id
* 商城没有门店id,如果需要门店id必传在业务中进行校验
*/
// @NotEmpty(message = "shopId不能为空")
private
String
shopId
;
/**
* 下单类型 CreateOrderType 外卖、到店、商城
*/
private
Integer
orderType
;
/**
* 渠道类型 OrderChannelType
*/
private
String
channelType
;
@NotEmpty
(
message
=
"spuId不能为空"
)
private
String
spuId
;
private
String
skuId
;
private
McoffeeProductBO
addGoods
;
private
String
version
;
...
...
@@ -80,26 +51,11 @@ public class MCoffeeAddGoodsBO extends BaseAddGoodsBO {
private
String
appType
;
private
String
tableNumber
;
/**
* 数量
*/
private
Integer
qty
;
/**
* 业务类型: 0 : 自提 1:外卖 2:微商城
*/
private
String
menuType
;
/**
* 收货地址ID、svc卡支付外卖订单必传
*/
private
String
receiveId
;
/**
* 操作类型 1= 添加商品券 2=加价购
*/
private
Integer
operationType
;
/**
* 券类型 0:商品券
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/MallAddGoodsBO.java
deleted
100644 → 0
View file @
310d40ea
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
.
add
;
public
class
MallAddGoodsBO
extends
BaseAddGoodsBO
{
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/add/PlatformAddGoodsBO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
bo
.
goods
.
add
;
import
cn.freemud.demo.entities.bo.goods.McoffeeProductBO
;
import
cn.freemud.demo.entities.bo.goods.PlatformProductBO
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.ComboxGoodsRequestVo
;
import
cn.freemud.entities.vo.MaterialRequestVo
;
...
...
@@ -11,6 +13,40 @@ import java.util.List;
@Data
public
class
PlatformAddGoodsBO
extends
BaseAddGoodsBO
{
private
PlatformProductBO
addGoods
;
private
String
version
;
/**
* 数量
*/
private
Integer
qty
;
/**
* 1.6.0 版本增加 节点ID
*/
private
String
nodeId
;
/**
* 1.6.0 版本增加 分类名
*/
private
String
categoryName
;
/**
* 商品额外的属性
*/
private
List
<
CartGoods
.
CartGoodsExtra
>
extra
;
/**
* 套餐固定商品
*/
private
List
<
ComboxGoodsRequestVo
>
productComboList
;
/**
* 套餐可选商品
*/
private
List
<
ComboxGoodsRequestVo
>
productGroupList
;
/**
* 加料
*/
private
List
<
MaterialRequestVo
>
productMaterialList
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/AddGoodsRequestDTO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
dto
.
goods
.
add
;
import
cn.freemud.demo.entities.bo.goods.CartGoodsExtra
;
import
cn.freemud.demo.entities.dto.BaseRequestDTO
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.ComboxGoodsRequestVo
;
...
...
@@ -13,16 +14,6 @@ import java.util.List;
public
class
AddGoodsRequestDTO
extends
BaseRequestDTO
{
/**
* 拼单发起人userId(拼单)
*/
private
String
createCollageUserId
;
/**
* 购物车版本号(拼单)
*/
private
Integer
carVer
;
/**
* 微信appId
*/
@NotEmpty
(
message
=
"appId不能为空"
)
...
...
@@ -35,19 +26,9 @@ public class AddGoodsRequestDTO extends BaseRequestDTO {
/**
* 商品额外的属性
*/
private
List
<
CartGoods
.
CartGoodsExtra
>
extra
;
private
String
version
;
private
List
<
CartGoodsExtra
>
extra
;
/**
* 1.6.0 版本增加 节点ID
*/
private
String
nodeId
;
/**
* 1.6.0 版本增加 分类名
*/
private
String
categoryName
;
/**
* 套餐固定商品
*/
private
List
<
ComboxGoodsRequestVo
>
productComboList
;
...
...
@@ -60,6 +41,19 @@ public class AddGoodsRequestDTO extends BaseRequestDTO {
* 加料
*/
private
List
<
MaterialRequestVo
>
productMaterialList
;
private
String
version
;
/**
* 1.6.0 版本增加 节点ID
*/
private
String
nodeId
;
/**
* 1.6.0 版本增加 分类名
*/
private
String
categoryName
;
private
String
appType
;
private
String
tableNumber
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/BaseAddGoodsVO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
dto
.
goods
.
add
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.ComboxGoodsRequestVo
;
import
cn.freemud.entities.vo.MaterialRequestVo
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
java.util.List
;
@Data
public
class
BaseAddGoodsVO
{
@NotEmpty
(
message
=
"sessionId不能为空"
)
private
String
sessionId
;
/**
* 商户Id
*/
@NotEmpty
(
message
=
"partnerId不能为空"
)
private
String
partnerId
;
/**
* 微信appId
*/
@NotEmpty
(
message
=
"appId不能为空"
)
private
String
appId
;
@NotEmpty
(
message
=
"spuId不能为空"
)
private
String
spuId
;
private
String
skuId
;
/**
* 商品额外的属性
*/
private
List
<
CartGoods
.
CartGoodsExtra
>
extra
;
private
String
version
;
/**
* 1.6.0 版本增加 节点ID
*/
private
String
nodeId
;
/**
* 1.6.0 版本增加 分类名
*/
private
String
categoryName
;
/**
* 套餐固定商品
*/
private
List
<
ComboxGoodsRequestVo
>
productComboList
;
/**
* 套餐可选商品
*/
private
List
<
ComboxGoodsRequestVo
>
productGroupList
;
/**
* 加料
*/
private
List
<
MaterialRequestVo
>
productMaterialList
;
/**
* 门店Id
* 商城没有门店id,如果需要门店id必传在业务中进行校验
*/
//@NotEmpty(message = "shopId不能为空")
private
String
shopId
;
/**
* 下单类型 CreateOrderType 外卖、到店、商城
*/
private
Integer
orderType
;
/**
* 渠道类型 OrderChannelType
*/
private
String
channelType
;
private
String
appType
;
private
String
tableNumber
;
/**
* 数量
*/
private
Integer
qty
;
/**
* 业务类型: 0 : 自提 1:外卖 2:微商城
*/
private
String
menuType
;
/**
* 收货地址ID、svc卡支付外卖订单必传
*/
private
String
receiveId
;
/**
* 操作类型 1= 添加商品券 2=加价购
*/
private
Integer
operationType
;
/**
* 优惠券号
*/
private
String
couponCode
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/MCoffeeAddGoodsVO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
dto
.
goods
.
add
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.ComboxGoodsRequestVo
;
import
cn.freemud.entities.vo.MaterialRequestVo
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
java.util.List
;
@Data
public
class
MCoffeeAddGoodsVO
extends
BaseAddGoodsVO
{
public
class
MCoffeeAddGoodsVO
extends
BaseAddGoodsVO
{
/**
* 麦咖啡定制属性
*/
private
List
<
CartGoods
.
SpecialExtra
>
specialExtra
;
/**
* 券类型 0:商品券
*/
private
Integer
couponType
;
/**
* 套餐名称
*/
private
String
groupName
;
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/MallAddGoodsVO.java
deleted
100644 → 0
View file @
310d40ea
package
cn
.
freemud
.
demo
.
entities
.
dto
.
goods
.
add
;
public
class
MallAddGoodsVO
extends
BaseAddGoodsVO
{
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/dto/goods/add/PlatformAddGoodsVO.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
entities
.
dto
.
goods
.
add
;
import
cn.freemud.entities.vo.CartGoods
;
import
cn.freemud.entities.vo.ComboxGoodsRequestVo
;
import
cn.freemud.entities.vo.MaterialRequestVo
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
java.util.List
;
@Data
public
class
PlatformAddGoodsVO
extends
BaseAddGoodsVO
{
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/product/KgdProductServiceImpl.java
View file @
23b82cf7
...
...
@@ -2,9 +2,8 @@ package cn.freemud.demo.manager.product;
import
cn.freemud.demo.adapter.manager.ProductDTO2BOAdapter
;
import
cn.freemud.demo.entities.bo.goods.GetProductBO
;
import
cn.freemud.demo.entities.bo.goods.ProductBO
;
import
cn.freemud.demo.entities.bo.goods.P
latformP
roductBO
;
import
cn.freemud.service.impl.AssortmentSdkService
;
import
cn.freemud.service.thirdparty.CustomerApplicationClient
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -23,15 +22,15 @@ public class KgdProductServiceImpl implements ProductService {
private
ProductDTO2BOAdapter
productDTO2BOAdapter
;
@Override
public
ProductBO
getProductInfo
(
GetProductBO
getProductBO
)
{
public
P
latformP
roductBO
getProductInfo
(
GetProductBO
getProductBO
)
{
// 获取添加商品的详细信息
List
<
ProductBeanDTO
>
productBeanListSpuClass
=
assortmentSdkService
.
getProductsInfoSdk
(
getProductBO
.
getPartnerId
(),
getProductBO
.
getStoreId
(),
Collections
.
singletonList
(
getProductBO
.
getSkuid
()),
getProductBO
.
getMenuType
(),
null
);
ProductBeanDTO
productBeanDTO
=
productBeanListSpuClass
.
get
(
0
);
P
roductBO
p
roductBO
=
productDTO2BOAdapter
.
convert2ProductBO
(
productBeanDTO
);
P
latformProductBO
platformP
roductBO
=
productDTO2BOAdapter
.
convert2ProductBO
(
productBeanDTO
);
return
productBO
;
return
p
latformP
roductBO
;
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/product/ProductManager.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
manager
.
product
;
import
cn.freemud.demo.entities.bo.goods.GetProductBO
;
import
cn.freemud.demo.entities.bo.goods.ProductBO
;
import
cn.freemud.service.impl.AssortmentSdkService
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.freemud.demo.entities.bo.goods.PlatformProductBO
;
import
org.springframework.stereotype.Service
;
import
java.util.Collections
;
import
java.util.List
;
@Service
public
class
ProductManager
{
...
...
@@ -17,9 +11,9 @@ public class ProductManager {
*
* @return
*/
public
ProductBO
getProductsInfo
(
GetProductBO
getProductBO
,
ProductService
productService
){
public
P
latformP
roductBO
getProductsInfo
(
GetProductBO
getProductBO
,
ProductService
productService
){
ProductBO
productInfo
=
productService
.
getProductInfo
(
getProductBO
);
P
latformP
roductBO
productInfo
=
productService
.
getProductInfo
(
getProductBO
);
return
productInfo
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/product/ProductService.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
manager
.
product
;
import
cn.freemud.demo.entities.bo.goods.GetProductBO
;
import
cn.freemud.demo.entities.bo.goods.ProductBO
;
import
cn.freemud.demo.entities.bo.goods.P
latformP
roductBO
;
public
interface
ProductService
{
ProductBO
getProductInfo
(
GetProductBO
getProductBO
);
P
latformP
roductBO
getProductInfo
(
GetProductBO
getProductBO
);
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/AbstractAddGoodsService.java
View file @
23b82cf7
...
...
@@ -4,7 +4,6 @@ import cn.freemud.base.entity.BaseResponse;
import
cn.freemud.demo.constant.ResponseConstant
;
import
cn.freemud.demo.entities.*
;
import
cn.freemud.demo.entities.bo.goods.GetProductBO
;
import
cn.freemud.demo.entities.bo.goods.ProductBO
;
import
cn.freemud.demo.entities.bo.goods.add.BaseAddGoodsBO
;
import
cn.freemud.demo.manager.product.ProductManager
;
import
cn.freemud.demo.manager.customer.CustomerManager
;
...
...
@@ -104,15 +103,26 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
baseRequestBO
.
setUserId
(
userId
);
GetProductBO
getProductBO
=
new
GetProductBO
();
ProductBO
productBO
=
productManager
.
getProductsInfo
(
getProductBO
,
baseRequestBO
.
getManagerService
().
getProductService
());
baseRequestBO
.
setAddGoods
(
productBO
);
GetProductBO
getProductBO
=
convert2ProductBO
(
baseRequestBO
);
productManager
.
getProductsInfo
(
getProductBO
,
baseRequestBO
.
getManagerService
().
getProductService
());
return
bo
;
}
private
GetProductBO
convert2ProductBO
(
BaseAddGoodsBO
baseRequestBO
)
{
GetProductBO
getProductBO
=
new
GetProductBO
();
getProductBO
.
setMenuType
(
baseRequestBO
.
getMenuType
());
getProductBO
.
setPartnerId
(
baseRequestBO
.
getPartnerId
());
getProductBO
.
setSkuid
(
baseRequestBO
.
getSkuId
());
getProductBO
.
setSpuid
(
baseRequestBO
.
getSpuId
());
getProductBO
.
setStoreId
(
baseRequestBO
.
getShopId
());
return
getProductBO
;
}
/**
* 具体业务逻辑校验, 例如商品数量,库存等校验
*
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/MCoffeeAddGoodsService.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
service
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.demo.entities.ResponseBuilder
;
import
cn.freemud.demo.entities.bo.goods.add.BaseAddGoodsBO
;
import
cn.freemud.enums.ResponseResult
;
import
cn.freemud.interceptor.ServiceException
;
...
...
@@ -17,7 +18,7 @@ public class MCoffeeAddGoodsService extends AbstractAddGoodsService {
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_SHOP_ID_NOT_EMPTY
);
}
return
this
.
checkCustomParams
(
baseRequestDTO
);
return
ResponseBuilder
.
success
(
);
}
}
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/PlatformAddGoodsService.java
View file @
23b82cf7
package
cn
.
freemud
.
demo
.
service
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.demo.entities.ResponseBuilder
;
import
cn.freemud.demo.entities.bo.goods.add.BaseAddGoodsBO
;
import
cn.freemud.enums.ResponseResult
;
import
cn.freemud.interceptor.ServiceException
;
...
...
@@ -17,13 +18,7 @@ public class PlatformAddGoodsService extends AbstractAddGoodsService {
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_SHOP_ID_NOT_EMPTY
);
}
return
null
;
return
ResponseBuilder
.
success
()
;
}
@Override
public
BaseResponse
checkCustomBusinessRules
(
BaseAddGoodsBO
baseRequestDTO
)
{
return
null
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ComboxGoodsRequestVo.java
View file @
23b82cf7
...
...
@@ -26,6 +26,8 @@ public class ComboxGoodsRequestVo {
private
String
skuId
;
private
Integer
qty
;
private
String
goodsId
;
/**
* 商品组Id
*/
...
...
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