Commit c05bec7a by huangZW

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents cae73c9d c03a252c
......@@ -51,5 +51,6 @@ public interface StaffDepartmentRelatedMapper {
List<TabHaobanStaffDepartmentRelated> listByWxEnterpriseIdAndClerkCode(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("clerkCode")String clerkCode);
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 {
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
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
private StaffService staffService;
@Autowired
private StaffDepartmentRelatedService staffDepartmentRelatedService;
@Autowired
private ClerkService clerkService;
@Autowired
......@@ -550,6 +553,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
if (CollectionUtils.isNotEmpty(staffIds)) {
staffClerkRelationService.cleanStaffClerk(wxEnterpriseId, staffIds);
staffService.cleanStaff(wxEnterpriseId, staffIds);
staffDepartmentRelatedService.cleanStaffDepartment(wxEnterpriseId,staffIds);
}
}
......
......@@ -308,5 +308,16 @@
</foreach>
and status_flag = 1
</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>
\ 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