Commit f5a1498b by 徐高华

Merge remote-tracking branch 'origin/master_xgh_bug_11月' into master_xgh_我的客户迭代

parents bcedf800 cd3b43aa
...@@ -64,8 +64,7 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -64,8 +64,7 @@ public interface TabHaobanStaffClerkRelationMapper {
* @author mozhu * @author mozhu
* @date 2022-01-13 11:36:11 * @date 2022-01-13 11:36:11
*/ */
List<TabHaobanStaffClerkRelation> listByClerkIds(@Param("clerkIds") List<String> clerkIds, List<StaffClerkRelationDTO> listByClerkIds(@Param("clerkIds") List<String> clerkIds, @Param("wxEnterpriseId") String wxEnterpriseId);
@Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanStaffClerkRelation> listByStoreId(@Param("storeId") String storeId); List<TabHaobanStaffClerkRelation> listByStoreId(@Param("storeId") String storeId);
......
...@@ -273,7 +273,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -273,7 +273,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
if (CollectionUtils.isEmpty(clerkList)) { if (CollectionUtils.isEmpty(clerkList)) {
return Collections.EMPTY_LIST; return Collections.EMPTY_LIST;
} }
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class,mapper.listByClerkIds(clerkList, null)); return mapper.listByClerkIds(clerkList, null);
} }
@Override @Override
......
...@@ -233,10 +233,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -233,10 +233,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override @Override
public List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkIds) { public List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkIds) {
if (CollectionUtil.isEmpty(clerkIds)) { return this.listByClerkIdsWxEnterpriseId(clerkIds, null) ;
return Collections.emptyList();
}
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, tabHaobanStaffClerkRelationMapper.listByClerkIds(clerkIds, null));
} }
@Override @Override
...@@ -244,7 +241,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -244,7 +241,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
if (CollectionUtil.isEmpty(clerkIds)) { if (CollectionUtil.isEmpty(clerkIds)) {
return Collections.emptyList(); return Collections.emptyList();
} }
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, tabHaobanStaffClerkRelationMapper.listByClerkIds(clerkIds, wxEnterpriseId)); return tabHaobanStaffClerkRelationMapper.listByClerkIds(clerkIds, wxEnterpriseId);
} }
@Override @Override
......
...@@ -131,22 +131,32 @@ ...@@ -131,22 +131,32 @@
and store_id = #{storeId,jdbcType=VARCHAR} and store_id = #{storeId,jdbcType=VARCHAR}
and status_flag = 1 and status_flag = 1
</update> </update>
<select id="listByClerkIds" resultMap="BaseResultMap" <select id="listByClerkIds" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO" parameterType="java.lang.String">
parameterType="java.lang.String"> select a.staff_clerk_relation_id staffClerkRelationId,
select a.staff_id staffId,
<include refid="Base_Column_List"></include> a.wx_enterprise_id wxEnterpriseId,
from tab_haoban_staff_clerk_relation a.enterprise_id enterpriseId,
where status_flag=1 a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
a.open_concat_flag openConcatFlag ,
a.clerk_type clerkType ,
a.manage_flag manageFlag ,
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 != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId} and a.wx_enterprise_id = #{wxEnterpriseId}
</if> </if>
and clerk_id in and a.clerk_id in
<foreach collection="clerkIds" item="id" index="index" open="(" close=")" separator=","> <foreach collection="clerkIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR} #{id,jdbcType=VARCHAR}
</foreach> </foreach>
</select> </select>
<select id="listByStoreId" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="listByStoreId" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -278,10 +288,12 @@ ...@@ -278,10 +288,12 @@
a.clerk_id clerkId, a.clerk_id clerkId,
a.clerk_code clerkCode, a.clerk_code clerkCode,
a.status_flag statusFlag, a.status_flag statusFlag,
a.open_concat_flag openConcatFlag ,
a.clerk_type clerkType ,
a.manage_flag manageFlag ,
b.wx_user_id qwUserId, b.wx_user_id qwUserId,
b.wx_open_user_id openUserId b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a from tab_haoban_staff_clerk_relation a left join tab_haoban_staff b on b.staff_id = a.staff_id
left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where a.wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and a.store_id = #{storeId} and a.store_id = #{storeId}
and a.status_flag = 1 and a.status_flag = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment