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
jenkins
order-group
Commits
9fc28325
Commit
9fc28325
authored
Feb 05, 2020
by
huvchao@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品组
parent
e078b7f9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
1 deletions
+36
-1
order-application-service/pom.xml
+1
-1
order-application-service/src/main/java/cn/freemud/entities/dto/product/ProductGroup.java
+3
-0
order-application-service/src/main/java/cn/freemud/entities/vo/GetProductsVo.java
+4
-0
order-application-service/src/main/java/cn/freemud/service/impl/ItemServiceImpl.java
+6
-0
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+22
-0
No files found.
order-application-service/pom.xml
View file @
9fc28325
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<dependency>
<dependency>
<groupId>
cn.freemud
</groupId>
<groupId>
cn.freemud
</groupId>
<artifactId>
assortment-ordercenter-sdk
</artifactId>
<artifactId>
assortment-ordercenter-sdk
</artifactId>
<version>
1.1.
5.RELEASE
</version>
<version>
1.1.
6.SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.freemud.application.service.sdk
</groupId>
<groupId>
com.freemud.application.service.sdk
</groupId>
...
...
order-application-service/src/main/java/cn/freemud/entities/dto/product/ProductGroup.java
View file @
9fc28325
...
@@ -21,4 +21,7 @@ public class ProductGroup {
...
@@ -21,4 +21,7 @@ public class ProductGroup {
private
String
name
;
private
String
name
;
private
List
<
GroupDetail
>
groupDetail
;
private
List
<
GroupDetail
>
groupDetail
;
/** 第三方商品组的编号 */
private
String
groupCode
;
}
}
order-application-service/src/main/java/cn/freemud/entities/vo/GetProductsVo.java
View file @
9fc28325
package
cn
.
freemud
.
entities
.
vo
;
package
cn
.
freemud
.
entities
.
vo
;
import
cn.freemud.entities.dto.product.ProductAttributeGroup
;
import
cn.freemud.entities.dto.product.ProductAttributeGroup
;
import
cn.freemud.entities.dto.product.ProductGroup
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
...
@@ -48,4 +49,7 @@ public class GetProductsVo {
...
@@ -48,4 +49,7 @@ public class GetProductsVo {
*/
*/
private
List
<
ProductAttributeGroup
>
productAttributeGroupList
;
private
List
<
ProductAttributeGroup
>
productAttributeGroupList
;
/** 商品组 */
private
List
<
ProductGroup
>
productGroupList
;
}
}
order-application-service/src/main/java/cn/freemud/service/impl/ItemServiceImpl.java
View file @
9fc28325
...
@@ -148,6 +148,12 @@ public class ItemServiceImpl implements ItemService{
...
@@ -148,6 +148,12 @@ public class ItemServiceImpl implements ItemService{
}
}
}
}
spuProductsVo
.
setProductAttributeGroupList
(
productBean
.
getProductAttributeGroupList
());
spuProductsVo
.
setProductAttributeGroupList
(
productBean
.
getProductAttributeGroupList
());
// todo 商品组信息
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getProductGroupList
())){
spuProductsVo
.
setProductGroupList
(
productBean
.
getProductGroupList
());
}
resultMap
.
put
(
productBean
.
getPid
(),
spuProductsVo
);
resultMap
.
put
(
productBean
.
getPid
(),
spuProductsVo
);
//多规格商品
//多规格商品
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
9fc28325
...
@@ -34,6 +34,7 @@ import cn.freemud.entities.dto.order.FacePayRequestDto;
...
@@ -34,6 +34,7 @@ import cn.freemud.entities.dto.order.FacePayRequestDto;
import
cn.freemud.entities.dto.order.FacePayResponseDto
;
import
cn.freemud.entities.dto.order.FacePayResponseDto
;
import
cn.freemud.entities.dto.product.AttributeValue
;
import
cn.freemud.entities.dto.product.AttributeValue
;
import
cn.freemud.entities.dto.product.ProductAttributeGroup
;
import
cn.freemud.entities.dto.product.ProductAttributeGroup
;
import
cn.freemud.entities.dto.product.ProductGroup
;
import
cn.freemud.entities.dto.shoppingCart.NewShoppingCartClearDto
;
import
cn.freemud.entities.dto.shoppingCart.NewShoppingCartClearDto
;
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
;
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.entities.vo.*
;
...
@@ -1620,6 +1621,9 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -1620,6 +1621,9 @@ public class OrderServiceImpl implements Orderservice {
productDto
.
setProductCode
(
products
.
get
(
skuId
).
getProductCode
());
productDto
.
setProductCode
(
products
.
get
(
skuId
).
getProductCode
());
productDto
.
setThirdProductSpecId
(
products
.
get
(
productDto
.
getSpecification
()).
getThirdProductSpecId
());
productDto
.
setThirdProductSpecId
(
products
.
get
(
productDto
.
getSpecification
()).
getThirdProductSpecId
());
productDto
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
productDto
.
getSpecification
()).
getProductAttributeGroupList
(),
productDto
.
getAddInfo
()));
productDto
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
productDto
.
getSpecification
()).
getProductAttributeGroupList
(),
productDto
.
getAddInfo
()));
// todo 商品组信息
setProductGroupInfo
(
products
.
get
(
skuId
).
getProductGroupList
(),
productDto
);
}
else
{
}
else
{
productDto
.
setCustomerCode
(
""
);
productDto
.
setCustomerCode
(
""
);
productDto
.
setProductCode
(
""
);
productDto
.
setProductCode
(
""
);
...
@@ -1634,6 +1638,9 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -1634,6 +1638,9 @@ public class OrderServiceImpl implements Orderservice {
comboProduct
.
setProductCode
(
products
.
get
(
comboSkuId
).
getProductCode
());
comboProduct
.
setProductCode
(
products
.
get
(
comboSkuId
).
getProductCode
());
comboProduct
.
setThirdProductSpecId
(
products
.
get
(
comboSkuId
).
getThirdProductSpecId
());
comboProduct
.
setThirdProductSpecId
(
products
.
get
(
comboSkuId
).
getThirdProductSpecId
());
comboProduct
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
comboSkuId
).
getProductAttributeGroupList
(),
comboProduct
.
getAddInfo
()));
comboProduct
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
comboSkuId
).
getProductAttributeGroupList
(),
comboProduct
.
getAddInfo
()));
// todo 套餐商品的商品组信息
setProductGroupInfo
(
products
.
get
(
comboSkuId
).
getProductGroupList
(),
comboProduct
);
}
else
{
}
else
{
comboProduct
.
setCustomerCode
(
""
);
comboProduct
.
setCustomerCode
(
""
);
comboProduct
.
setProductCode
(
""
);
comboProduct
.
setProductCode
(
""
);
...
@@ -1646,6 +1653,21 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -1646,6 +1653,21 @@ public class OrderServiceImpl implements Orderservice {
return
createOrderDto
;
return
createOrderDto
;
}
}
/**
* 设置商品组信息
* @param productGroupList
* @param product
*/
private
void
setProductGroupInfo
(
List
<
ProductGroup
>
productGroupList
,
CreateOrderProductRequest
product
)
{
if
(
CollectionUtils
.
isEmpty
(
productGroupList
))
return
;
// try{}catch (Exception e){e.printStackTrace();}
if
(
CollectionUtils
.
isNotEmpty
(
productGroupList
.
get
(
0
).
getGroupDetail
()))
{
product
.
setGroupId
(
productGroupList
.
get
(
0
).
getGroupDetail
().
get
(
0
).
getGroupId
());
}
product
.
setGroupName
(
productGroupList
.
get
(
0
).
getName
());
product
.
setThirdGroupCode
(
productGroupList
.
get
(
0
).
getGroupCode
());
}
private
String
getThirdPropertyId
(
List
<
ProductAttributeGroup
>
productAttributeGroups
,
String
addInfo
)
{
private
String
getThirdPropertyId
(
List
<
ProductAttributeGroup
>
productAttributeGroups
,
String
addInfo
)
{
String
thirdProductPropertyId
=
""
;
String
thirdProductPropertyId
=
""
;
if
(
StringUtils
.
isBlank
(
addInfo
)
||
CollectionUtils
.
isEmpty
(
productAttributeGroups
)
){
if
(
StringUtils
.
isBlank
(
addInfo
)
||
CollectionUtils
.
isEmpty
(
productAttributeGroups
)
){
...
...
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