Commit c03a252c by fudahua

点击刷新企业微信数据

parent 9f503cbc
...@@ -51,5 +51,6 @@ public interface StaffDepartmentRelatedMapper { ...@@ -51,5 +51,6 @@ public interface StaffDepartmentRelatedMapper {
List<TabHaobanStaffDepartmentRelated> listByWxEnterpriseIdAndClerkCode(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("clerkCode")String clerkCode); List<TabHaobanStaffDepartmentRelated> listByWxEnterpriseIdAndClerkCode(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("clerkCode")String clerkCode);
List<TabHaobanStaffDepartmentRelated> listStaffDepartmentByStaffIds(@Param("staffIds")List<String> staffIds); List<TabHaobanStaffDepartmentRelated> listStaffDepartmentByStaffIds(@Param("staffIds")List<String> staffIds);
int cleanStaffDepartment(@Param("wxEnterpriseId")String wxEnterpriseId,@Param("staffIds")List<String> staffIds);
} }
\ No newline at end of file
...@@ -30,5 +30,13 @@ public interface StaffDepartmentRelatedService { ...@@ -30,5 +30,13 @@ public interface StaffDepartmentRelatedService {
StaffDepartmentRelatedDTO getById(String staffDepartmentStaffRelatedId); StaffDepartmentRelatedDTO getById(String staffDepartmentStaffRelatedId);
/**
* 清空stafff
* @param wxEnterpriseId
* @param staffIds
* @return
*/
public int cleanStaffDepartment(String wxEnterpriseId,List<String> staffIds);
} }
...@@ -89,5 +89,8 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated ...@@ -89,5 +89,8 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated
return EntityUtil.changeEntityByJSON(StaffDepartmentRelatedDTO.class, mapper.getById(staffDepartmentStaffRelatedId)); return EntityUtil.changeEntityByJSON(StaffDepartmentRelatedDTO.class, mapper.getById(staffDepartmentStaffRelatedId));
} }
@Override
public int cleanStaffDepartment(String wxEnterpriseId, List<String> staffIds) {
return 0;
}
} }
...@@ -80,6 +80,9 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ ...@@ -80,6 +80,9 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
private StaffService staffService; private StaffService staffService;
@Autowired @Autowired
private StaffDepartmentRelatedService staffDepartmentRelatedService;
@Autowired
private ClerkService clerkService; private ClerkService clerkService;
@Autowired @Autowired
...@@ -550,6 +553,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ ...@@ -550,6 +553,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
if (CollectionUtils.isNotEmpty(staffIds)) { if (CollectionUtils.isNotEmpty(staffIds)) {
staffClerkRelationService.cleanStaffClerk(wxEnterpriseId, staffIds); staffClerkRelationService.cleanStaffClerk(wxEnterpriseId, staffIds);
staffService.cleanStaff(wxEnterpriseId, staffIds); staffService.cleanStaff(wxEnterpriseId, staffIds);
staffDepartmentRelatedService.cleanStaffDepartment(wxEnterpriseId,staffIds);
} }
} }
......
...@@ -308,5 +308,16 @@ ...@@ -308,5 +308,16 @@
</foreach> </foreach>
and status_flag = 1 and status_flag = 1
</select> </select>
<update id="cleanStaffDepartment" >
update tab_haoban_staff_department_related
set
status_flag = 0
where wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1
and staff_id not in
<foreach collection="staffIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</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