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
41d25d0f
Commit
41d25d0f
authored
Nov 03, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询关联表
parent
08e44e11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
20 deletions
+22
-20
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+1
-2
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+1
-1
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-5
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+18
-12
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
41d25d0f
...
...
@@ -64,8 +64,7 @@ public interface TabHaobanStaffClerkRelationMapper {
* @author mozhu
* @date 2022-01-13 11:36:11
*/
List
<
TabHaobanStaffClerkRelation
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
41d25d0f
...
...
@@ -273,7 +273,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
Collections
.
EMPTY_LIST
;
}
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
mapper
.
listByClerkIds
(
clerkList
,
null
)
);
return
mapper
.
listByClerkIds
(
clerkList
,
null
);
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
41d25d0f
...
...
@@ -233,10 +233,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override
public
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkIds
)
{
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
return
Collections
.
emptyList
();
}
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
null
));
return
this
.
listByClerkIdsWxEnterpriseId
(
clerkIds
,
null
)
;
}
@Override
...
...
@@ -244,7 +241,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
return
Collections
.
emptyList
();
}
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
wxEnterpriseId
)
);
return
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
wxEnterpriseId
);
}
@Override
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
41d25d0f
...
...
@@ -131,22 +131,29 @@
and store_id = #{storeId,jdbcType=VARCHAR}
and status_flag = 1
</update>
<select
id=
"listByClerkIds"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_haoban_staff_clerk_relation
where status_flag=1
<select
id=
"listByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
parameterType=
"java.lang.String"
>
select a.staff_clerk_relation_id staffClerkRelationId,
a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
b.wx_user_id qwUserId,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.status_flag=1 and b.status_flag = 1
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
and
a.
wx_enterprise_id = #{wxEnterpriseId}
</if>
and clerk_id in
and
a.
clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
@@ -280,8 +287,7 @@
a.status_flag statusFlag,
b.wx_user_id qwUserId,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id
from tab_haoban_staff_clerk_relation a left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and a.store_id = #{storeId}
and a.status_flag = 1
...
...
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