// // ElogCoachService.swift // JiaPeiManage // // Created by Ning.ge on 2023/8/30. // import RxSwift import RxCocoa import SwiftyJSON protocol ElogCoachServiceType { //根据学员id获取电子教学日志 func elogTmsStudentTeachLogByIdRequest(city:String ,id:Int ,pageNum:Int ,pageSize:Int) -> Single //根据学员id和classId获取电子教学日志照片 func elogTmsStudentPhotoByIdRequest(city:String ,classId:String ,id:Int ,pageNum:Int ,pageSize:Int) -> Single } final class ElogCoachService: ElogCoachServiceType { private let networking : ElogCoachNetworking init(networking: ElogCoachNetworking) { self.networking = networking } func elogTmsStudentTeachLogByIdRequest(city: String, id: Int, pageNum: Int, pageSize: Int) -> RxSwift.Single { let api = ElogCoachAPI.elogTmsStudentTeachLogById(city: city, id: id, pageNum: pageNum, pageSize: pageSize) return networking.request(api).map(ETeachLogDataModel.self,isModel: true) } func elogTmsStudentPhotoByIdRequest(city: String, classId: String, id: Int, pageNum: Int, pageSize: Int) -> RxSwift.Single { let api = ElogCoachAPI.elogTmsStudentPhotoById(city: city, classId: classId, id: id, pageNum: pageNum, pageSize: pageSize) return networking.request(api).map(ETeachLogPhotoDataModel.self,isModel: true) } }