Commit 70b6e424 by jinxin

Merge branch 'feature/五月二期' into 'master'

Feature/五月二期

See merge request !1296
parents 20e6e474 6af75e46
...@@ -408,4 +408,11 @@ public interface TabHaobanExternalClerkRelatedMapper { ...@@ -408,4 +408,11 @@ public interface TabHaobanExternalClerkRelatedMapper {
*/ */
List<String> listByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseIdList") List<String> enterpriseIdList); List<String> listByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseIdList") List<String> enterpriseIdList);
/**
* 删除企业微信下面,所有外部联系人是null的成员
* @param wxEnterpriseId
* @param enterpriseIdList
*/
void deleteByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseIdList") List<String> enterpriseIdList);
} }
\ No newline at end of file
...@@ -106,4 +106,11 @@ public interface ExternalClerkRelatedService { ...@@ -106,4 +106,11 @@ public interface ExternalClerkRelatedService {
*/ */
List<String> listByWxEnterpriseId(String wxEnterpriseId,List<String> enterpriseIdList); List<String> listByWxEnterpriseId(String wxEnterpriseId,List<String> enterpriseIdList);
/**
* 删除企业微信下面,所有外部联系人是null的成员
* @param wxEnterpriseId
* @param enterpriseIdList
*/
void deleteByWxEnterpriseId(String wxEnterpriseId,List<String> enterpriseIdList);
} }
...@@ -525,4 +525,9 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ ...@@ -525,4 +525,9 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ
public List<String> listByWxEnterpriseId(String wxEnterpriseId, List<String> enterpriseIdList) { public List<String> listByWxEnterpriseId(String wxEnterpriseId, List<String> enterpriseIdList) {
return this.mapper.listByWxEnterpriseId(wxEnterpriseId,enterpriseIdList); return this.mapper.listByWxEnterpriseId(wxEnterpriseId,enterpriseIdList);
} }
@Override
public void deleteByWxEnterpriseId(String wxEnterpriseId, List<String> enterpriseIdList) {
this.mapper.deleteByWxEnterpriseId(wxEnterpriseId,enterpriseIdList);
}
} }
...@@ -1202,6 +1202,8 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -1202,6 +1202,8 @@ public class StaffApiServiceImpl implements StaffApiService {
"刷新企业微信好友(定时任务处理)", SyncTaskTypeEnum.FRIEND_SINGLE.getType()); "刷新企业微信好友(定时任务处理)", SyncTaskTypeEnum.FRIEND_SINGLE.getType());
if (StringUtils.isNotBlank(taskId)) { if (StringUtils.isNotBlank(taskId)) {
dealSyncOperationApiService.dealWxFriendClerkSingle(taskId, staffId, staffId, wxEnterpriseId); dealSyncOperationApiService.dealWxFriendClerkSingle(taskId, staffId, staffId, wxEnterpriseId);
//上述刷新企业好友走的是新增数据,所以需要额外去删除外部联系人id为空的数据
externalClerkRelatedService.deleteByWxEnterpriseId(wxEnterpriseId,enterpriseIdList);
} }
} }
} }
......
...@@ -808,4 +808,17 @@ ...@@ -808,4 +808,17 @@
AND external_user_id IS NULL AND external_user_id IS NULL
</select> </select>
<update id="deleteByWxEnterpriseId" >
update tab_haoban_external_clerk_related
set status_flag = 2,update_time = now()
WHERE
wx_enterprise_id = #{wxEnterpriseId}
AND enterprise_id IN
<foreach collection="enterpriseIdList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
AND status_flag = 1
AND external_user_id IS NULL
</update>
</mapper> </mapper>
\ No newline at end of file
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