Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
cc595960
Commit
cc595960
authored
May 02, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
6fc4a7ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
5 deletions
+45
-5
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+45
-5
No files found.
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
cc595960
...
...
@@ -3329,8 +3329,11 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
ProductPriceStepDO
clear
=
new
ProductPriceStepDO
();
if
(
createReqVO
.
getPriceType
()==
1
){
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getFullPricePackagingList
())){
List
<
ProductPriceStepPackagingDO
>
specialDO
List
=
new
ArrayList
<>();
List
<
ProductPriceStepPackagingDO
>
packaging
List
=
new
ArrayList
<>();
respVO
.
getFullPricePackagingList
().
forEach
(
pack
->{
createReqVO
.
setFreightPriceStepList
(
respVO
.
getFreightPriceStepList
());
ProductPriceStepDO
packagingDO
=
new
ProductPriceStepDO
()
;
BeanUtils
.
copyProperties
(
pack
,
packagingDO
);
packagingDO
.
setId
(
null
);
...
...
@@ -3340,12 +3343,28 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
// packagingDO.setTransportPrice(pack.getPackagingPrice());
// packagingDO.setTransportPriceUnit(pack.getPackagingPriceUnit());
// packagingDO.setTransportVolumeUnit(pack.getPackagingVolumeUnit());
packagingDO
.
setAllPrice
(
pack
.
getPackagingPrice
());
packagingDO
.
setAllPriceUnit
(
pack
.
getPackagingPriceUnit
())
;
packagingDO
.
setAllVolumeUnit
(
pack
.
getPackagingVolumeUnit
());
packagingDO
.
setAllPrice
(
respVO
.
getAllPrice
());
packagingDO
.
setAllPriceUnit
(
respVO
.
getAllPriceUnit
())
;
packagingDO
.
setAllVolumeUnit
(
respVO
.
getAllVolumeUnit
());
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getSpecialList
())){
List
<
ProductPriceStepSpecialDO
>
specialList
=
new
ArrayList
<>();
respVO
.
getSpecialList
().
forEach
(
sp
->{
ProductPriceStepSpecialDO
specialDO
=
new
ProductPriceStepSpecialDO
();
BeanUtils
.
copyProperties
(
sp
,
specialDO
);
specialDO
.
setId
(
null
);
specialList
.
add
(
specialDO
);
});
packagingDO
.
setSpecialList
(
specialList
);
}
ProductPriceStepPackagingDO
stepPackagingDO
=
new
ProductPriceStepPackagingDO
()
;
BeanUtils
.
copyProperties
(
pack
,
stepPackagingDO
);
packagingList
.
add
(
stepPackagingDO
);
packagingDO
.
setPackagingList
(
packagingList
);
fullPriceStepList
.
add
(
packagingDO
)
;
});
createReqVO
.
setFullPriceStepList
(
fullPriceStepList
);
}
}
else
{
if
(
CollectionUtil
.
isEmpty
(
respVO
.
getFreightPriceStepList
())
){
...
...
@@ -3698,6 +3717,28 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
initBasePrice
(
dbItem
,
transportType
);
insertList1
.
add
(
dbItem
);
}
// if(stepItem.getPriceType()==1){
//
// ProductPricePackagingDO pricePackagingDO = new ProductPricePackagingDO() ;
// BeanUtils.copyProperties(stepItem,pricePackagingDO);
// pricePackagingDO.setId(null);
// pricePackagingDO.setProductPriceId(productPriceId) ;
// productPricePackagingDOS.add(pricePackagingDO);
//
// }else {
// if(CollectionUtil.isNotEmpty(stepItem.getPackagingList())){
// stepItem.getPackagingList().forEach(pg->{
// ProductPricePackagingDO pricePackagingDO = new ProductPricePackagingDO() ;
// BeanUtils.copyProperties(pg,pricePackagingDO);
// pricePackagingDO.setId(null);
// pricePackagingDO.setProductPriceId(productPriceId) ;
// pricePackagingDO.setPriceType(stepItem.getPriceType()) ;
// productPricePackagingDOS.add(pricePackagingDO);
//
// });
// }
// }
if
(
CollectionUtil
.
isNotEmpty
(
stepItem
.
getPackagingList
())){
stepItem
.
getPackagingList
().
forEach
(
pg
->{
ProductPricePackagingDO
pricePackagingDO
=
new
ProductPricePackagingDO
()
;
...
...
@@ -3709,7 +3750,6 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
});
}
}
}
}
...
...
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