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
e21da78e
Commit
e21da78e
authored
Nov 25, 2020
by
yu.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::new function::about multipleSpec product add singleSpec product and material
parent
6f457559
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
287 additions
and
6 deletions
+287
-6
.gitignore
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+0
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ProductTypeBeanDTO.java
+278
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ValiadShopProductResult.java
+3
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+5
-3
No files found.
.gitignore
View file @
e21da78e
# Created by .ignore support plugin (hsz.mobi)
# Created by .ignore support plugin (hsz.mobi)
.gitignore
.gitignore
.idea/
.idea/
.DS_Store
assortment-ordercenter-sdk/assortment-ordercenter-sdk.iml
assortment-ordercenter-sdk/assortment-ordercenter-sdk.iml
assortment-ordercenter-sdk/target/
assortment-ordercenter-sdk/target/
assortment-shoppingcart-sdk/assortment-shoppingcart-sdk.iml
assortment-shoppingcart-sdk/assortment-shoppingcart-sdk.iml
...
...
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
e21da78e
This diff is collapsed.
Click to expand it.
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ProductTypeBeanDTO.java
0 → 100644
View file @
e21da78e
package
cn
.
freemud
.
entities
.
dto
.
product
;
import
lombok.Data
;
import
java.util.List
;
/**
* All rights Reserved, Designed By sunary.site
*
* @version v1.0
* @Title: IntelliJ IDEA
* @Package cn.freemud.entities.dto.product
* @Description: 请简单描述下这个类是做什么用的
* @author: yu.sun
* @date: 2020-11-25 11:51:44
* @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
*/
@Data
public
class
ProductTypeBeanDTO
{
private
String
businessNo
;
private
String
barcode
;
private
String
brandId
;
private
String
brandName
;
private
String
category
;
private
String
categoryName
;
private
String
companyId
;
private
String
customerCode
;
private
String
productCode
;
private
Long
finalPrice
;
private
Integer
isSkuProduct
;
private
String
name
;
private
Long
originalPrice
;
private
Long
packPrice
;
private
String
picture
;
private
String
pid
;
private
String
specification
;
private
Integer
status
;
private
Integer
stock
;
private
Integer
stockLimit
;
private
int
type
;
private
String
unit
;
private
Integer
riseSell
;
private
String
rawMaterial
;
private
Double
tax
;
private
String
taxId
;
private
Integer
openMemberDiscount
;
private
Integer
memberDiscount
;
private
List
<
ProductAttributeGroupListBean
>
productAttributeGroupList
;
private
List
<
ProductPictureListBean
>
productPictureList
;
private
List
<
SkuProductBean
>
skuList
;
private
List
<
ProductComboType
>
productComboList
;
private
List
<
ProductGroupType
>
productGroupList
;
private
List
<
SkuProductBean
.
SkuSpecValue
>
skuSpecValues
;
private
List
<
PackageProductTypeDto
>
packageProductTypes
;
private
List
<
ProductGroupType
>
additionalGroupList
;
private
List
<
ProductComboDetailTypeDto
>
productComboInfos
;
private
Integer
isDishware
;
private
Integer
weightType
;
private
Double
weight
;
public
Integer
getMemberDiscountResult
()
{
return
this
.
openMemberDiscount
!=
null
&&
this
.
openMemberDiscount
==
1
?
this
.
memberDiscount
:
100
;
}
public
ProductTypeBeanDTO
()
{
}
@Data
public
static
class
ProductComboDetailTypeDto
{
private
String
productId
;
private
Integer
quantity
;
private
Integer
sequence
;
public
ProductComboDetailTypeDto
()
{
}
}
@Data
public
static
class
ProductAttributeGroupListBean
{
private
String
attributeName
;
private
Integer
attributeType
;
private
List
<
AttributeValueBean
>
attributeValues
;
public
ProductAttributeGroupListBean
()
{
}
}
@Data
public
static
class
AttributeValueBean
{
private
String
attributeId
;
private
String
attributeValue
;
private
Long
id
;
private
Long
price
;
private
Integer
sequence
;
private
Integer
status
;
public
AttributeValueBean
()
{
}
}
@Data
public
static
class
PackageProductTypeDto
{
private
Long
groupId
;
private
Integer
sequence
;
public
PackageProductTypeDto
()
{
}
}
@Data
public
static
class
ProductGroupType
{
private
String
pgid
;
private
String
linkId
;
private
String
groupCode
;
private
String
options
;
private
String
name
;
private
Integer
must
;
private
Integer
allowRepeat
;
private
Integer
minNumber
;
private
Integer
maxNumber
;
private
String
remark
;
private
Integer
total
;
private
List
<
ProductGroupType
.
GroupDetailType
>
groupDetail
;
public
ProductGroupType
()
{
}
@Data
public
static
class
GroupDetailType
{
private
String
productId
;
private
String
productName
;
private
String
customerCode
;
private
Integer
productPrice
;
protected
Integer
productFinalPrice
;
protected
Integer
markUpPrice
;
private
String
picture
;
private
Integer
stockLimit
;
protected
String
unit
;
protected
String
productCode
;
private
Integer
weightType
;
private
Double
weight
;
private
Double
tax
;
private
String
taxId
;
}
}
@Data
public
static
class
ProductComboType
{
private
String
productId
;
private
String
productName
;
private
String
customerCode
;
private
Integer
originalPrice
;
protected
Integer
finalPrice
;
protected
Integer
packPrice
;
private
String
picture
;
protected
String
unit
;
protected
String
productCode
;
private
Integer
quantity
;
private
Integer
weightType
;
private
Double
weight
;
private
Double
tax
;
private
String
taxId
;
}
@Data
public
static
class
ProductPictureListBean
{
private
String
pictureId
;
private
String
productId
;
private
String
sequence
;
private
String
type
;
private
String
url
;
@Data
public
static
class
AttributeValueBean
{
private
String
attributeId
;
private
String
attributeValue
;
private
Long
id
;
private
Long
price
;
private
Integer
sequence
;
private
Integer
status
;
public
AttributeValueBean
()
{
}
}
}
@Data
public
static
class
ProductLabelNameListBean
{
private
String
id
;
private
String
name
;
private
String
partnerId
;
List
<?>
productList
;
private
String
storeId
;
private
String
type
;
public
ProductLabelNameListBean
()
{
}
}
@Data
public
static
class
SpecificationGroupBean
{
private
String
partnerId
;
private
Integer
sequence
;
private
String
specId
;
private
String
specName
;
private
List
<
SpecificationGroupBean
.
SpecValueVo
>
specValueVos
;
public
SpecificationGroupBean
()
{
}
@Data
public
static
class
SpecValueVo
{
private
Integer
sequence
;
private
String
specId
;
private
String
specValue
;
private
String
specValueId
;
public
SpecValueVo
()
{
}
}
}
@Data
public
static
class
SkuProductBean
{
private
String
customerCode
;
private
String
productCode
;
private
Long
finalPrice
;
private
Long
originalPrice
;
private
String
productName
;
private
Integer
productType
;
private
Integer
sequence
;
private
String
skuCode
;
private
String
skuId
;
private
Integer
status
;
private
Integer
stockLimit
;
private
Integer
stockQty
;
private
Long
packPrice
;
private
Integer
riseSell
;
private
String
rawMaterial
;
private
Double
tax
;
private
String
taxId
;
private
List
<
SkuProductBean
.
SkuSpecValue
>
skuSpecValues
;
private
List
<
ProductGroupType
>
additionalGroupList
;
private
Double
weight
;
protected
String
unit
;
private
Integer
openMemberDiscount
;
private
Integer
memberDiscount
;
public
Integer
getMemberDiscountResult
()
{
return
this
.
openMemberDiscount
!=
null
&&
this
.
openMemberDiscount
==
1
?
this
.
memberDiscount
:
100
;
}
public
SkuProductBean
()
{
}
@Data
public
static
class
SkuSpecValue
{
private
String
productId
;
private
Integer
sequence
;
private
String
specId
;
private
String
specName
;
private
String
specValue
;
private
String
specValueId
;
public
SkuSpecValue
()
{
}
}
@Data
public
static
class
PackageProductTypeDto
{
private
Long
groupId
;
private
Integer
sequence
;
public
PackageProductTypeDto
()
{
}
}
}
}
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ValiadShopProductResult.java
View file @
e21da78e
package
cn
.
freemud
.
entities
.
dto
.
product
;
package
cn
.
freemud
.
entities
.
dto
.
product
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -24,9 +24,9 @@ public class ValiadShopProductResult {
...
@@ -24,9 +24,9 @@ public class ValiadShopProductResult {
private
String
message
;
private
String
message
;
private
String
skuId
;
private
String
skuId
;
private
String
spuId
;
private
String
spuId
;
private
ProductBeanDTO
productType
;
private
Product
Type
BeanDTO
productType
;
private
String
uuid
;
private
String
uuid
;
private
Map
<
String
,
ProductBeanDTO
>
subProductTypeMap
;
private
Map
<
String
,
Product
Type
BeanDTO
>
subProductTypeMap
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
e21da78e
...
@@ -9,6 +9,7 @@ import cn.freemud.constant.ShoppingCartConstant;
...
@@ -9,6 +9,7 @@ import cn.freemud.constant.ShoppingCartConstant;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.activity.ActivityQueryDto
;
import
cn.freemud.entities.dto.activity.ActivityQueryDto
;
import
cn.freemud.entities.dto.activity.ActivityQueryResponseDto
;
import
cn.freemud.entities.dto.activity.ActivityQueryResponseDto
;
import
cn.freemud.entities.dto.product.ProductTypeBeanDTO
;
import
cn.freemud.entities.dto.product.ValiadShopProductResponse
;
import
cn.freemud.entities.dto.product.ValiadShopProductResponse
;
import
cn.freemud.entities.dto.product.ValiadShopProductResult
;
import
cn.freemud.entities.dto.product.ValiadShopProductResult
;
import
cn.freemud.entities.dto.product.ValidateShopProductRequest
;
import
cn.freemud.entities.dto.product.ValidateShopProductRequest
;
...
@@ -1526,7 +1527,8 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1526,7 +1527,8 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
if
(
PRODUCT_PRICE_CHANGE
==
validaProduct
.
getCode
())
{
if
(
PRODUCT_PRICE_CHANGE
==
validaProduct
.
getCode
())
{
changePriceSpu
.
add
(
spuName
);
changePriceSpu
.
add
(
spuName
);
List
<
ProductBeanDTO
>
productList
=
validateResult
.
getFailureList
().
stream
().
map
(
ValiadShopProductResult:
:
getProductType
).
collect
(
Collectors
.
toList
());
List
<
ProductTypeBeanDTO
>
productList
=
validateResult
.
getFailureList
().
stream
().
map
(
ValiadShopProductResult:
:
getProductType
).
collect
(
Collectors
.
toList
());
shoppingCartConvertAdapter
.
updateCartGoodsInfoForMCoffee
(
cartGoods
,
productList
);
shoppingCartConvertAdapter
.
updateCartGoodsInfoForMCoffee
(
cartGoods
,
productList
);
}
}
if
(
PRODUCT_GROUP_EMPTY
==
validaProduct
.
getCode
())
{
if
(
PRODUCT_GROUP_EMPTY
==
validaProduct
.
getCode
())
{
...
@@ -1565,9 +1567,9 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1565,9 +1567,9 @@ public class ShoppingCartMCoffeeServiceImpl {
continue
;
continue
;
}
}
for
(
ValiadShopProductResult
valiadShopProductResult
:
validateResult
.
getSuccessList
()){
for
(
ValiadShopProductResult
valiadShopProductResult
:
validateResult
.
getSuccessList
()){
ProductBeanDTO
productType
=
valiadShopProductResult
.
getProductType
();
Product
Type
BeanDTO
productType
=
valiadShopProductResult
.
getProductType
();
if
(
ObjectUtils
.
equals
(
productType
.
getPid
(),
cartGoods
.
getSpuId
())){
if
(
ObjectUtils
.
equals
(
productType
.
getPid
(),
cartGoods
.
getSpuId
())){
Map
<
String
,
ProductBeanDTO
>
subProductTypeMap
=
valiadShopProductResult
.
getSubProductTypeMap
();
Map
<
String
,
Product
Type
BeanDTO
>
subProductTypeMap
=
valiadShopProductResult
.
getSubProductTypeMap
();
shoppingCartConvertAdapter
.
updateCartGoodsInfo
(
cartGoods
,
productType
,
subProductTypeMap
);
shoppingCartConvertAdapter
.
updateCartGoodsInfo
(
cartGoods
,
productType
,
subProductTypeMap
);
break
;
break
;
}
}
...
...
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