Commit ef05a59c by 墨竹

feat:好办群发bug修改

parent 4c27b8e9
...@@ -56,6 +56,14 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -56,6 +56,14 @@ public interface TabHaobanStaffClerkRelationMapper {
void delByStoreIdAndCode( @Param("storeId")String storeId,@Param("clerkCode")String clerkCode); void delByStoreIdAndCode( @Param("storeId")String storeId,@Param("clerkCode")String clerkCode);
/**
* 由职员id列表
*
* @param clerkIds 职员id
* @return {@link List<StaffClerkRelationDTO> }
* @author mozhu
* @date 2022-01-13 11:36:11
*/
List<StaffClerkRelationDTO> listByClerkIds(@Param("clerkIds") List<String> clerkIds); List<StaffClerkRelationDTO> listByClerkIds(@Param("clerkIds") List<String> clerkIds);
List<TabHaobanStaffClerkRelation> listByStoreId(@Param("storeId")String storeId); List<TabHaobanStaffClerkRelation> listByStoreId(@Param("storeId")String storeId);
......
...@@ -1404,7 +1404,9 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -1404,7 +1404,9 @@ public class StaffApiServiceImpl implements StaffApiService {
storeIds.add(storeId); storeIds.add(storeId);
List<String> clerkList = clerkService.getclerkListByStoreIds(storeIds); List<String> clerkList = clerkService.getclerkListByStoreIds(storeIds);
List<StaffClerkRelationDTO> staffRelationList = staffClerkRelationService.listByClerkIds(clerkList); List<StaffClerkRelationDTO> staffRelationList = staffClerkRelationService.listByClerkIds(clerkList);
if (CollectionUtils.isEmpty(staffRelationList)) {
return Collections.EMPTY_LIST;
}
Map<String, StaffClerkRelationDTO> clerkIdMap = staffRelationList.stream().filter(s -> s.getClerkId() != null).collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s)); Map<String, StaffClerkRelationDTO> clerkIdMap = staffRelationList.stream().filter(s -> s.getClerkId() != null).collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
Set<String> keySet = clerkIdMap.keySet(); Set<String> keySet = clerkIdMap.keySet();
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(staffRelationList.get(0).getWxEnterpriseId()); WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(staffRelationList.get(0).getWxEnterpriseId());
......
...@@ -158,8 +158,16 @@ ...@@ -158,8 +158,16 @@
<select id="listByClerkIds" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO" parameterType="java.lang.String"> <select id="listByClerkIds" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO" parameterType="java.lang.String">
select select
a.*, a.staff_clerk_relation_id staffClerkRelationId,
b.wx_open_user_id a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.wx_user_id wxUserId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
b.wx_open_user_id wxOpenUserId
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.status_flag=1 where 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