Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
4af4c85f
Commit
4af4c85f
authored
Apr 26, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
848fb1a1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
4 deletions
+34
-4
DepartmentApiService.java
...m/gic/haoban/manage/api/service/DepartmentApiService.java
+4
-1
DepartmentMapper.java
...ic/haoban/manage/service/dao/mapper/DepartmentMapper.java
+1
-1
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+26
-1
DepartmentMapper.xml
...e3-service/src/main/resources/mapper/DepartmentMapper.xml
+3
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DepartmentApiService.java
View file @
4af4c85f
...
@@ -15,7 +15,7 @@ public interface DepartmentApiService {
...
@@ -15,7 +15,7 @@ public interface DepartmentApiService {
* @param parentId
* @param parentId
* @return
* @return
*/
*/
List
<
DepartmentDTO
>
listByDepartmentIds
(
List
<
String
>
departmentIds
,
int
storeFlag
);
List
<
DepartmentDTO
>
listByDepartmentIds
(
List
<
String
>
departmentIds
,
Integer
storeFlag
);
/**
/**
* 查门店列表
* 查门店列表
* @param relatedIds
* @param relatedIds
...
@@ -170,5 +170,8 @@ public interface DepartmentApiService {
...
@@ -170,5 +170,8 @@ public interface DepartmentApiService {
* @return
* @return
*/
*/
Integer
totalStoreCountByEnterpriseId
(
String
wxEnterpriseId
);
Integer
totalStoreCountByEnterpriseId
(
String
wxEnterpriseId
);
List
<
DepartmentDTO
>
listSonByDepartmentIds
(
List
<
String
>
departmentIdSet
,
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/DepartmentMapper.java
View file @
4af4c85f
...
@@ -32,7 +32,7 @@ public interface DepartmentMapper {
...
@@ -32,7 +32,7 @@ public interface DepartmentMapper {
List
<
TabHaobanDepartment
>
getByWxId
(
@Param
(
"wxDepartmentId"
)
String
wxDepartmentId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanDepartment
>
getByWxId
(
@Param
(
"wxDepartmentId"
)
String
wxDepartmentId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanDepartment
>
listByDepartmentIds
(
@Param
(
"departmentIds"
)
List
<
String
>
departmentIds
,
@Param
(
"storeFlag"
)
int
storeFlag
);
List
<
TabHaobanDepartment
>
listByDepartmentIds
(
@Param
(
"departmentIds"
)
List
<
String
>
departmentIds
,
@Param
(
"storeFlag"
)
Integer
storeFlag
);
List
<
TabHaobanDepartment
>
listByRelatedIds
(
@Param
(
"relatedIds"
)
List
<
String
>
relatedIds
);
List
<
TabHaobanDepartment
>
listByRelatedIds
(
@Param
(
"relatedIds"
)
List
<
String
>
relatedIds
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DepartmentApiServiceImpl.java
View file @
4af4c85f
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
...
@@ -370,7 +373,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
...
@@ -370,7 +373,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
@Override
@Override
public
List
<
DepartmentDTO
>
listByDepartmentIds
(
List
<
String
>
departmentIds
,
public
List
<
DepartmentDTO
>
listByDepartmentIds
(
List
<
String
>
departmentIds
,
int
storeFlag
)
{
Integer
storeFlag
)
{
List
<
TabHaobanDepartment
>
list
=
departmentMapper
.
listByDepartmentIds
(
departmentIds
,
storeFlag
);
List
<
TabHaobanDepartment
>
list
=
departmentMapper
.
listByDepartmentIds
(
departmentIds
,
storeFlag
);
if
(
list
==
null
){
if
(
list
==
null
){
return
new
ArrayList
<
DepartmentDTO
>();
return
new
ArrayList
<
DepartmentDTO
>();
...
@@ -758,4 +761,26 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
...
@@ -758,4 +761,26 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
public
Integer
totalStoreCountByEnterpriseId
(
String
wxEnterpriseId
)
{
public
Integer
totalStoreCountByEnterpriseId
(
String
wxEnterpriseId
)
{
return
departmentService
.
totalStoreCountByEnterpriseId
(
wxEnterpriseId
);
return
departmentService
.
totalStoreCountByEnterpriseId
(
wxEnterpriseId
);
}
}
@Override
public
List
<
DepartmentDTO
>
listSonByDepartmentIds
(
List
<
String
>
departmentIdList
,
String
wxEnterpriseId
)
{
List
<
DepartmentDTO
>
list
=
new
ArrayList
<>();
for
(
String
departmentId
:
departmentIdList
)
{
String
chainId
=
""
;
TabHaobanDepartment
department
=
departmentService
.
selectById
(
departmentId
);
if
(
department
!=
null
){
chainId
=
department
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
departmentId
;
}
list
.
add
(
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
department
));
if
(
StringUtils
.
isNotBlank
(
chainId
)){
List
<
TabHaobanDepartment
>
tabList
=
departmentService
.
listByChainId
(
chainId
,
wxEnterpriseId
);
for
(
TabHaobanDepartment
tabHaobanDepartment
:
tabList
)
{
list
.
add
(
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
tabHaobanDepartment
));
}
}
}
return
list
;
}
}
}
haoban-manage3-service/src/main/resources/mapper/DepartmentMapper.xml
View file @
4af4c85f
...
@@ -305,7 +305,9 @@
...
@@ -305,7 +305,9 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_department
from tab_haoban_department
where status_flag = 1
where status_flag = 1
and is_store = #{storeFlag,jdbcType=INTEGER}
<if
test=
"storeFlag != null"
>
and is_store = #{storeFlag}
</if>
<if
test=
"departmentIds != null and departmentIds.size() > 0"
>
<if
test=
"departmentIds != null and departmentIds.size() > 0"
>
and department_id IN
and department_id IN
<foreach
collection=
"departmentIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"departmentIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
...
...
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