ElogCoachService.swift 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // ElogCoachService.swift
  3. // JiaPeiManage
  4. //
  5. // Created by Ning.ge on 2023/8/30.
  6. //
  7. import RxSwift
  8. import RxCocoa
  9. import SwiftyJSON
  10. protocol ElogCoachServiceType {
  11. //根据学员id获取电子教学日志
  12. func elogTmsStudentTeachLogByIdRequest(city:String ,id:Int ,pageNum:Int ,pageSize:Int) -> Single<ETeachLogDataModel>
  13. //根据学员id和classId获取电子教学日志照片
  14. func elogTmsStudentPhotoByIdRequest(city:String ,classId:String ,id:Int ,pageNum:Int ,pageSize:Int) -> Single<ETeachLogPhotoDataModel>
  15. }
  16. final class ElogCoachService: ElogCoachServiceType {
  17. private let networking : ElogCoachNetworking
  18. init(networking: ElogCoachNetworking) {
  19. self.networking = networking
  20. }
  21. func elogTmsStudentTeachLogByIdRequest(city: String, id: Int, pageNum: Int, pageSize: Int) -> RxSwift.Single<ETeachLogDataModel> {
  22. let api = ElogCoachAPI.elogTmsStudentTeachLogById(city: city, id: id, pageNum: pageNum, pageSize: pageSize)
  23. return networking.request(api).map(ETeachLogDataModel.self,isModel: true)
  24. }
  25. func elogTmsStudentPhotoByIdRequest(city: String, classId: String, id: Int, pageNum: Int, pageSize: Int) -> RxSwift.Single<ETeachLogPhotoDataModel> {
  26. let api = ElogCoachAPI.elogTmsStudentPhotoById(city: city, classId: classId, id: id, pageNum: pageNum, pageSize: pageSize)
  27. return networking.request(api).map(ETeachLogPhotoDataModel.self,isModel: true)
  28. }
  29. }