宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-06-01 60a5e5d29ea3a7c63bc5acc9052a656821127ab9
OKProject/API/API.swift
@@ -698,6 +698,12 @@
    case queryOfficalCarModel(calType:Int,startLonLat:String,endLonLat:String,startTime:String? = nil,endTime:String? = nil)
    
    case saveOrderBusiness(model:OfficalRequstModel)
    case approveOrderList(pageNum:Int)
    case approveOrderDetail(id:Int)
    case approveOrderAudit(id:Int,status:Int,auditRemark:String? = nil)
}
@@ -1024,6 +1030,12 @@
            return "/api/business/queryBusinessCarModel"
        case .saveOrderBusiness:
            return "/api/business/saveOrderBusiness"
        case .approveOrderList:
            return "/api/business/approveOrderList"
        case .approveOrderDetail:
            return "/api/business/approveOrderDetail"
        case .approveOrderAudit:
            return "/api/business/approveOrder"
        }
    }
    
@@ -2062,6 +2074,24 @@
            let params = APIParamsAppender()
                params.params = model.toJSON() ?? [:]
            return .requestParameters(parameters: params.done(), encoding: URLEncoding.queryString)
        case .approveOrderList(let pageNum):
            let params = APIParamsAppender()
                .append(key: "pageNum", value: pageNum)
                .append(key: "size", value: 20)
            return .requestParameters(parameters: params.done(), encoding: URLEncoding.queryString)
        case .approveOrderDetail(let id):
            let params = APIParamsAppender()
                .append(key: "id", value: id)
            return .requestParameters(parameters: params.done(), encoding: URLEncoding.queryString)
        case .approveOrderAudit(let id, let status, let auditRemark):
            let params = APIParamsAppender()
                .append(key: "id", value: id)
                .append(key: "auditStatus", value: status)
                .append(key: "auditRemark", value: auditRemark)
            return .requestParameters(parameters: params.done(), encoding: URLEncoding.queryString)
        }
    }
}