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
f9243d9b
Commit
f9243d9b
authored
Apr 25, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
2d320dc2
ee0bfece
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
2676 additions
and
156 deletions
+2676
-156
WarehouseMapper.java
...odule/depository/dal/mysql/warehouse/WarehouseMapper.java
+5
-3
WarehouseService.java
...module/depository/service/warehouse/WarehouseService.java
+1
-1
WarehouseServiceImpl.java
...pository/service/warehouse/impl/WarehouseServiceImpl.java
+4
-1
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+1
-1
OrderMapper.java
...coder/yudao/module/order/dal/mysql/order/OrderMapper.java
+1231
-107
OrderQueryDTO.java
...java/cn/iocoder/yudao/module/order/dto/OrderQueryDTO.java
+613
-0
OrderQueryService.java
...r/yudao/module/order/service/order/OrderQueryService.java
+6
-0
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+81
-0
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+687
-11
OrderController.java
.../module/order/controller/admin/order/OrderController.java
+13
-16
CopyProductPriceDto.java
...iocoder/yudao/module/product/dto/CopyProductPriceDto.java
+8
-0
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+26
-16
No files found.
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/dal/mysql/warehouse/WarehouseMapper.java
View file @
f9243d9b
...
...
@@ -150,14 +150,16 @@ public interface WarehouseMapper extends BaseMapperX<WarehouseDO> {
"GROUP BY r1.title_zh"
,
"</when>"
,
"<when test = 'type == 2'>"
,
"AND w.guojia
=#{regionId}
"
,
"AND w.guojia
in (${regionId})
"
,
"GROUP BY w.shi"
,
"</when>"
,
"<when test = 'type == 3'>"
,
"AND w.shi=#{regionId}"
,
"<if test= 'regionId != null and regionId != \"\" '>"
,
"AND w.shi in (${regionId})"
,
"</if>"
,
"GROUP BY w.title_zh"
,
"</when>"
,
"</script>"
})
List
<
WarehouseTreeRegionVO
>
getRegionList
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"regionId"
)
Integer
regionId
);
List
<
WarehouseTreeRegionVO
>
getRegionList
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"regionId"
)
String
regionId
);
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/WarehouseService.java
View file @
f9243d9b
...
...
@@ -171,5 +171,5 @@ public interface WarehouseService {
List
<
WarehouseTreeRegionVO
>
getWarehouseTreeRegionList
(
Integer
tradeType
);
List
<
WarehouseTreeRegionVO
>
getRegionList
(
Integer
type
,
Integer
regionId
);
List
<
WarehouseTreeRegionVO
>
getRegionList
(
Integer
type
,
String
regionId
);
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/impl/WarehouseServiceImpl.java
View file @
f9243d9b
...
...
@@ -514,7 +514,10 @@ public class WarehouseServiceImpl implements WarehouseService {
}
@Override
public
List
<
WarehouseTreeRegionVO
>
getRegionList
(
Integer
type
,
Integer
regionId
)
{
public
List
<
WarehouseTreeRegionVO
>
getRegionList
(
Integer
type
,
String
regionId
)
{
if
(
regionId
.
equals
(
""
)){
return
new
ArrayList
();
}
List
<
WarehouseTreeRegionVO
>
list
=
warehouseMapper
.
getRegionList
(
type
,
regionId
);
return
list
;
}
...
...
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseController.java
View file @
f9243d9b
...
...
@@ -101,7 +101,7 @@ public class WarehouseController {
}
@GetMapping
(
"/getRegionList"
)
public
CommonResult
<
List
<
WarehouseTreeRegionVO
>>
getRegionList
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
Integer
type
,
Integer
regionId
){
public
CommonResult
<
List
<
WarehouseTreeRegionVO
>>
getRegionList
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
Integer
type
,
String
regionId
){
List
<
WarehouseTreeRegionVO
>
list
=
warehouseService
.
getRegionList
(
type
,
regionId
);
return
success
(
list
);
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/order/OrderMapper.java
View file @
f9243d9b
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dto/OrderQueryDTO.java
0 → 100644
View file @
f9243d9b
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/OrderQueryService.java
View file @
f9243d9b
...
...
@@ -153,11 +153,16 @@ public interface OrderQueryService {
List
<
OrderDO
>
getOrderList
(
OrderQueryVO
query
);
PageResult
<
OrderBackPageVO
>
orderPage
(
OrderQueryVO
query
,
PageVO
page
);
PageResult
<
OrderBackPageVO
>
myOrderPage
(
OrderQueryDTO
query
,
PageVO
page
);
long
orderCount
(
OrderQueryVO
query
);
PageResult
<
OrderBackPageVO
>
deptOrderPage
(
OrderQueryVO
query
,
PageVO
page
);
PageResult
<
OrderBackPageVO
>
deptOrderPage1
(
OrderQueryDTO
query
,
PageVO
page
);
PageResult
<
OrderBackPageVO
>
myIssuedOrderPage
(
OrderQueryVO
query
,
PageVO
page
);
/**
...
...
@@ -307,6 +312,7 @@ public interface OrderQueryService {
List
<
OrderDO
>
getOrderChildren
(
List
<
Long
>
orderIds
);
StatisticsOrderVO
statisticsOrder
(
OrderQueryVO
query
);
StatisticsOrderVO
statisticsMyOrder
(
OrderQueryDTO
query
)
;
void
exportOrderExcel
(
HttpServletResponse
response
,
OrderQueryVO
query
)
throws
IOException
;
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
f9243d9b
...
...
@@ -875,6 +875,20 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
@Override
public
PageResult
<
OrderBackPageVO
>
myOrderPage
(
OrderQueryDTO
query
,
PageVO
page
)
{
if
(
Objects
.
isNull
(
query
.
getLang
()))
{
query
.
setLang
(
I18nMessage
.
getLang
());
}
IPage
<
OrderBackPageVO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
long
total
=
orderMapper
.
orderCount1
(
query
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
OrderBackPageVO
>
list
=
orderMapper
.
orderList1
(
start
,
size
,
query
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
@Override
public
long
orderCount
(
OrderQueryVO
query
)
{
return
orderMapper
.
orderCount
(
query
);
...
...
@@ -892,6 +906,18 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
@Override
public
PageResult
<
OrderBackPageVO
>
deptOrderPage1
(
OrderQueryDTO
query
,
PageVO
page
)
{
query
.
setLang
(
I18nMessage
.
getLang
());
IPage
<
OrderBackPageVO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
long
total
=
orderMapper
.
deptOrderCount1
(
query
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
OrderBackPageVO
>
list
=
orderMapper
.
deptOrderList1
(
start
,
size
,
query
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
@Override
public
PageResult
<
OrderBackPageVO
>
myIssuedOrderPage
(
OrderQueryVO
query
,
PageVO
page
)
{
query
.
setLang
(
I18nMessage
.
getLang
());
...
...
@@ -1480,6 +1506,61 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return
vo
;
}
@Override
public
StatisticsOrderVO
statisticsMyOrder
(
OrderQueryDTO
query
)
{
StatisticsOrderVO
vo
=
orderMapper
.
statisticsMyOrder
(
query
);
if
(
Objects
.
nonNull
(
vo
))
{
vo
.
setTotalVolume
(
new
BigDecimal
(
vo
.
getTotalVolume
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalWeight
(
new
BigDecimal
(
vo
.
getTotalWeight
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalWVolume
(
new
BigDecimal
(
vo
.
getTotalWVolume
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalVWeight
(
new
BigDecimal
(
vo
.
getTotalVWeight
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalChargeVolume
(
new
BigDecimal
(
vo
.
getTotalChargeVolume
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalChargeWeight
(
new
BigDecimal
(
vo
.
getTotalChargeWeight
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
}
else
{
vo
=
new
StatisticsOrderVO
();
}
if
(
Objects
.
nonNull
(
query
.
getBeginWarehouseInTime
())
&&
Objects
.
nonNull
(
query
.
getEndWarehouseInTime
()))
{
// 入仓记录统计时,实测入仓数据替换为入仓记录中的和值
StatisticsOrderVO
warehouseInVO
=
orderMapper
.
statisticsMyWarehouseIn
(
query
);
if
(
Objects
.
nonNull
(
warehouseInVO
))
{
vo
.
setTotalNum
(
warehouseInVO
.
getTotalNum
());
vo
.
setTotalVolume
(
new
BigDecimal
(
warehouseInVO
.
getTotalVolume
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalWeight
(
new
BigDecimal
(
warehouseInVO
.
getTotalWeight
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setOrderQuantity
(
warehouseInVO
.
getOrderQuantity
());
}
else
{
vo
.
setTotalNum
(
0
);
vo
.
setTotalVolume
(
BigDecimal
.
ZERO
.
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalWeight
(
BigDecimal
.
ZERO
.
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setOrderQuantity
(
0
);
}
}
if
(
Objects
.
nonNull
(
query
.
getBeginRucangTime
())
&&
Objects
.
nonNull
(
query
.
getEndRucangTime
()))
{
// 入仓记录统计时,实测入仓数据替换为入仓记录中的和值
StatisticsOrderVO
warehouseInVO
=
orderMapper
.
statisticsMyWarehouseIn
(
query
);
if
(
Objects
.
nonNull
(
warehouseInVO
))
{
vo
.
setTotalNum
(
warehouseInVO
.
getTotalNum
());
vo
.
setTotalVolume
(
new
BigDecimal
(
warehouseInVO
.
getTotalVolume
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalWeight
(
new
BigDecimal
(
warehouseInVO
.
getTotalWeight
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setOrderQuantity
(
warehouseInVO
.
getOrderQuantity
());
}
else
{
vo
.
setTotalNum
(
0
);
vo
.
setTotalVolume
(
BigDecimal
.
ZERO
.
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setTotalWeight
(
BigDecimal
.
ZERO
.
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
vo
.
setOrderQuantity
(
0
);
}
}
if
(
Objects
.
nonNull
(
query
.
getBeginPickUpTime
())
&&
Objects
.
nonNull
(
query
.
getEndPickUpTime
()))
{
// 入仓记录统计时,实测入仓数据替换为入仓记录中的和值
StatisticsOrderVO
pickUpVO
=
orderMapper
.
statisticsMyPickUp
(
query
);
if
(
Objects
.
nonNull
(
pickUpVO
))
{
vo
.
setTotalNum
(
pickUpVO
.
getTotalNum
());
}
else
{
vo
.
setTotalNum
(
0
);
}
}
return
vo
;
}
@Override
public
void
exportOrderExcel
(
HttpServletResponse
response
,
OrderQueryVO
query
)
throws
IOException
{
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
DATA_FORMAT
);
...
...
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
f9243d9b
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/order/OrderController.java
View file @
f9243d9b
...
...
@@ -27,10 +27,7 @@ import cn.iocoder.yudao.module.infra.service.file.FileService;
import
cn.iocoder.yudao.module.order.convert.order.OrderConvert
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dto.OrderBackInfoDto
;
import
cn.iocoder.yudao.module.order.dto.OrderExportBackDTO
;
import
cn.iocoder.yudao.module.order.dto.PackingListDto
;
import
cn.iocoder.yudao.module.order.dto.SearchBackDto
;
import
cn.iocoder.yudao.module.order.dto.*
;
import
cn.iocoder.yudao.module.order.enums.OrderTempLateEnum
;
import
cn.iocoder.yudao.module.order.enums.TransportTypeShortEnum
;
import
cn.iocoder.yudao.module.order.service.order.OrderBusinessService
;
...
...
@@ -308,9 +305,9 @@ public class OrderController {
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得订单分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:order:query')")
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
)
{
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
o
rderPage
(
query
,
page
);
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
myO
rderPage
(
query
,
page
);
return
success
(
pageResult
);
}
...
...
@@ -326,12 +323,12 @@ public class OrderController {
@GetMapping
(
"/my/page"
)
@ApiOperation
(
"获得我的订单分页"
)
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
myOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
myOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
)
{
Long
salesmanId
=
SecurityFrameworkUtils
.
getLoginUserId
();
// 获取当前登录用户ID
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
// query.setSalesmanId(salesmanId);
query
.
setCreator
(
String
.
valueOf
(
salesmanId
));
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
o
rderPage
(
query
,
page
);
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
myO
rderPage
(
query
,
page
);
return
success
(
pageResult
);
}
...
...
@@ -339,11 +336,11 @@ public class OrderController {
@GetMapping
(
"/dept-order-page"
)
@ApiOperation
(
"部门订单分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:order:query')")
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getDeptOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getDeptOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
)
{
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
query
.
setDeptId
(
Objects
.
isNull
(
loginUser
)
?
0L
:
loginUser
.
getDeptId
());
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
deptOrderPage
(
query
,
page
);
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
deptOrderPage
1
(
query
,
page
);
return
success
(
pageResult
);
}
...
...
@@ -716,12 +713,12 @@ public class OrderController {
@GetMapping
(
"/dept/statistics"
)
@ApiOperation
(
"参数查询获得部门订单统计"
)
public
CommonResult
<
StatisticsOrderVO
>
statisticsDeptOrder
(
OrderQuery
V
O
query
)
{
public
CommonResult
<
StatisticsOrderVO
>
statisticsDeptOrder
(
OrderQuery
DT
O
query
)
{
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
// 获取当前登录用户ID
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
// query.setSalesmanId(salesmanId);
query
.
setDeptId
(
Objects
.
isNull
(
loginUser
)
||
Objects
.
isNull
(
loginUser
.
getDeptId
())
?
0L
:
loginUser
.
getDeptId
());
return
success
(
orderQueryService
.
statisticsOrder
(
query
));
return
success
(
orderQueryService
.
statistics
My
Order
(
query
));
}
@GetMapping
(
"/data/scope/statistics"
)
...
...
@@ -746,19 +743,19 @@ public class OrderController {
@GetMapping
(
"/my/statistics"
)
@ApiOperation
(
"参数查询获得我的订单统计"
)
public
CommonResult
<
StatisticsOrderVO
>
statisticsMyOrder
(
OrderQuery
V
O
query
)
{
public
CommonResult
<
StatisticsOrderVO
>
statisticsMyOrder
(
OrderQuery
DT
O
query
)
{
Long
salesmanId
=
SecurityFrameworkUtils
.
getLoginUserId
();
// 获取当前登录用户ID
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
// query.setSalesmanId(salesmanId);
query
.
setCreator
(
String
.
valueOf
(
salesmanId
));
return
success
(
orderQueryService
.
statisticsOrder
(
query
));
return
success
(
orderQueryService
.
statistics
My
Order
(
query
));
}
@GetMapping
(
"/statistics"
)
@ApiOperation
(
"参数查询订单管理统计"
)
public
CommonResult
<
StatisticsOrderVO
>
statisticsOrder
(
OrderQuery
V
O
query
)
{
return
success
(
orderQueryService
.
statisticsOrder
(
query
));
public
CommonResult
<
StatisticsOrderVO
>
statisticsOrder
(
OrderQuery
DT
O
query
)
{
return
success
(
orderQueryService
.
statistics
My
Order
(
query
));
}
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/dto/CopyProductPriceDto.java
View file @
f9243d9b
package
cn
.
iocoder
.
yudao
.
module
.
product
.
dto
;
import
cn.iocoder.yudao.module.product.vo.productPrice.LineChannelVo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.Size
;
import
java.util.List
;
@ApiModel
(
"复制价格入参DTO"
)
@Data
public
class
CopyProductPriceDto
{
...
...
@@ -14,4 +18,8 @@ public class CopyProductPriceDto {
@ApiModelProperty
(
"商品id"
)
private
String
productId
;
@ApiModelProperty
(
value
=
"线路渠道列表"
,
required
=
true
)
@Size
(
min
=
1
)
private
List
<
LineChannelVo
>
lineChannelList
;
}
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
f9243d9b
...
...
@@ -3306,23 +3306,33 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//列出要复制的商品价格
List
<
ProductPriceDO
>
productPriceDOList
=
this
.
productPriceMapper
.
selectList
(
new
LambdaQueryWrapper
<
ProductPriceDO
>().
in
(
ProductPriceDO:
:
getId
,
ids
));
ProductPriceAirCreateReqVO
createReqVO
=
new
ProductPriceAirCreateReqVO
()
;
createReqVO
.
setProductId
(
Long
.
parseLong
(
dto
.
getProductId
())
);
List
<
LineChannelVo
>
lineChannelList
=
createReqVO
.
getLineChannelList
();
ProductDO
productDO
=
checkUpdateStatus
(
lineChannelList
,
createReqVO
.
getProductId
());
WarehouseLineSearchVO
searchVO
=
new
WarehouseLineSearchVO
();
List
<
WarehouseLineDO
>
warehouseLineList
=
warehouseService
.
openedRouterList
(
searchVO
);
List
<
ProductDO
>
productList
=
Collections
.
singletonList
(
productDO
);
//商品线路保存在redis。更新成功后移除
batchSaveKeyInCache
(
productList
,
lineChannelList
);
if
(
productPriceDOList
.
size
()>
0
){
productPriceDOList
.
forEach
(
p
->{
ProductPriceAirCreateReqVO
createReqVO
=
new
ProductPriceAirCreateReqVO
()
;
BeanUtils
.
copyProperties
(
p
,
createReqVO
);
createReqVO
.
setProductId
(
Long
.
parseLong
(
dto
.
getProductId
())
);
LineChannelVo
vo
=
new
LineChannelVo
();
vo
.
setShippingChannelId
(
p
.
getShippingChannelId
());
vo
.
setLineId
(
p
.
getWarehouseLineId
());
List
<
LineChannelVo
>
lineChannelList
=
new
ArrayList
<>();
lineChannelList
.
add
(
vo
);
createReqVO
.
setLineChannelList
(
lineChannelList
);
//ProductDO productDO = checkUpdateStatus(lineChannelList, createReqVO.getProductId());
ProductDO
productDO
=
productService
.
getProduct
(
createReqVO
.
getProductId
());
WarehouseLineSearchVO
searchVO
=
new
WarehouseLineSearchVO
();
List
<
WarehouseLineDO
>
warehouseLineList
=
warehouseService
.
openedRouterList
(
searchVO
);
List
<
ProductDO
>
productList
=
Collections
.
singletonList
(
productDO
);
//商品线路保存在redis。更新成功后移除
batchSaveKeyInCache
(
productList
,
lineChannelList
);
createReqVO
.
setSync
(
true
);
createReqVO
.
setBatch
(
false
);
batchUpdateAir
(
createReqVO
,
warehouseLineList
,
productList
);
});
}
createReqVO
.
setSync
(
true
);
createReqVO
.
setBatch
(
false
);
batchUpdateAir
(
createReqVO
,
warehouseLineList
,
productList
);
}
...
...
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