123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // 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<ETeachLogDataModel>
- //根据学员id和classId获取电子教学日志照片
- func elogTmsStudentPhotoByIdRequest(city:String ,classId:String ,id:Int ,pageNum:Int ,pageSize:Int) -> Single<ETeachLogPhotoDataModel>
- }
- 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<ETeachLogDataModel> {
- 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<ETeachLogPhotoDataModel> {
- let api = ElogCoachAPI.elogTmsStudentPhotoById(city: city, classId: classId, id: id, pageNum: pageNum, pageSize: pageSize)
- return networking.request(api).map(ETeachLogPhotoDataModel.self,isModel: true)
- }
-
- }
|