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
7712ef74
Commit
7712ef74
authored
Apr 22, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
f8f2a345
ae5d23a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
14 deletions
+55
-14
WarehouseMapper.java
...odule/depository/dal/mysql/warehouse/WarehouseMapper.java
+27
-0
WarehouseService.java
...module/depository/service/warehouse/WarehouseService.java
+2
-0
WarehouseServiceImpl.java
...pository/service/warehouse/impl/WarehouseServiceImpl.java
+18
-12
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+6
-0
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+2
-2
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 @
7712ef74
...
...
@@ -133,4 +133,31 @@ public interface WarehouseMapper extends BaseMapperX<WarehouseDO> {
"WHERE w.deleted = 0 AND w.`status` =0 AND trade_type =#{tradeType}"
})
List
<
WarehouseTreeRegionVO
>
getWarehouseTreeRegionList
(
@Param
(
"tradeType"
)
Integer
tradeType
);
@ResultType
(
List
.
class
)
@Select
({
"<script>"
,
"SELECT w.*, "
,
"r1.title_zh as guojiaName,"
,
"r2.title_zh as shiName "
,
"FROM ecw_warehouse w "
,
"LEFT JOIN ecw_region r1 "
,
"ON w.guojia = r1.id "
,
"LEFT JOIN ecw_region r2 "
,
"ON w.shi = r2.id "
,
"WHERE w.deleted = 0 AND w.`status` =0 AND trade_type =1 "
,
"<when test = 'type == 1'>"
,
"GROUP BY r1.title_zh"
,
"</when>"
,
"<when test = 'type == 2'>"
,
"AND w.guojia=#{regionId}"
,
"GROUP BY w.shi"
,
"</when>"
,
"<when test = 'type == 3'>"
,
"AND w.shi=#{regionId}"
,
"GROUP BY w.title_zh"
,
"</when>"
,
"</script>"
})
List
<
WarehouseTreeRegionVO
>
getRegionList
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"regionId"
)
Integer
regionId
);
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/WarehouseService.java
View file @
7712ef74
...
...
@@ -170,4 +170,6 @@ public interface WarehouseService {
LogisticsInfoDto
getStartInfoAndDestInfoByLineId
(
Long
lineId
);
List
<
WarehouseTreeRegionVO
>
getWarehouseTreeRegionList
(
Integer
tradeType
);
List
<
WarehouseTreeRegionVO
>
getRegionList
(
Integer
type
,
Integer
regionId
);
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/impl/WarehouseServiceImpl.java
View file @
7712ef74
...
...
@@ -495,21 +495,27 @@ public class WarehouseServiceImpl implements WarehouseService {
@Override
public
List
<
WarehouseTreeRegionVO
>
getWarehouseTreeRegionList
(
Integer
tradeType
)
{
List
<
WarehouseTreeRegionVO
>
list
=
warehouseMapper
.
getWarehouseTreeRegionList
(
tradeType
);
List
<
WarehouseTreeRegionVO
>
list
=
warehouseMapper
.
getWarehouseTreeRegionList
(
tradeType
);
list
.
stream
().
forEach
(
s
->
s
.
getGuojiaName
().
replaceAll
(
"\t"
,
""
));
Map
<
String
,
List
<
WarehouseTreeRegionVO
>>
map
=
(
HashMap
<
String
,
List
<
WarehouseTreeRegionVO
>>)
list
.
stream
()
list
.
stream
().
forEach
(
s
->
s
.
getGuojiaName
().
replaceAll
(
"\t"
,
""
));
Map
<
String
,
List
<
WarehouseTreeRegionVO
>>
map
=
(
HashMap
<
String
,
List
<
WarehouseTreeRegionVO
>>)
list
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
WarehouseTreeRegionVO:
:
getGuojiaName
));
List
<
WarehouseTreeRegionVO
>
regionVOList
=
new
ArrayList
<>()
;
for
(
Map
.
Entry
<
String
,
List
<
WarehouseTreeRegionVO
>>
m:
map
.
entrySet
())
{
WarehouseTreeRegionVO
v
=
new
WarehouseTreeRegionVO
();
v
.
setGuojiaName
(
m
.
getKey
());
v
.
setChildren
(
m
.
getValue
());
v
.
setGuojia
(
m
.
getValue
().
get
(
0
).
getGuojia
());
v
.
setId
(
m
.
getValue
().
get
(
0
).
getGuojia
());
regionVOList
.
add
(
v
);
}
List
<
WarehouseTreeRegionVO
>
regionVOList
=
new
ArrayList
<>()
;
for
(
Map
.
Entry
<
String
,
List
<
WarehouseTreeRegionVO
>>
m
:
map
.
entrySet
())
{
WarehouseTreeRegionVO
v
=
new
WarehouseTreeRegionVO
();
v
.
setGuojiaName
(
m
.
getKey
());
v
.
setChildren
(
m
.
getValue
());
v
.
setGuojia
(
m
.
getValue
().
get
(
0
).
getGuojia
());
v
.
setId
(
m
.
getValue
().
get
(
0
).
getGuojia
());
regionVOList
.
add
(
v
);
}
return
regionVOList
;
}
@Override
public
List
<
WarehouseTreeRegionVO
>
getRegionList
(
Integer
type
,
Integer
regionId
)
{
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 @
7712ef74
...
...
@@ -100,6 +100,12 @@ public class WarehouseController {
return
success
(
list
);
}
@GetMapping
(
"/getRegionList"
)
public
CommonResult
<
List
<
WarehouseTreeRegionVO
>>
getRegionList
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
Integer
type
,
Integer
regionId
){
List
<
WarehouseTreeRegionVO
>
list
=
warehouseService
.
getRegionList
(
type
,
regionId
);
return
success
(
list
);
}
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得仓库分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:warehouse:query')")
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
7712ef74
...
...
@@ -3318,11 +3318,11 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
List
<
ProductDO
>
productList
=
Collections
.
singletonList
(
productDO
);
//商品线路保存在redis。更新成功后移除
//
batchSaveKeyInCache(productList, lineChannelList);
batchSaveKeyInCache
(
productList
,
lineChannelList
);
createReqVO
.
setSync
(
true
);
createReqVO
.
setBatch
(
false
);
//
batchUpdateAir(createReqVO, warehouseLineList, productList);
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