// // FKAllOrderRequest.m // FirstLink // // Created by ascii on 15/8/24. // Copyright (c) 2015年 FirstLink. All rights reserved. // #import "FKPersonOrderRequest.h" @implementation FKPersonOrderRequest + (void)requestItems:(int)identify startRow:(NSString *)startRow pageSize:(NSString *)pageSize keyword:(NSString *)keyword tradeStatus:(NSString *)tradeStatus deleagate:(id)delegate { if (!startRow || !pageSize || !tradeStatus) { return; } // 当key有值时会忽略status字段 NSArray *keys = @[@"start_row", @"page_size", @"status", @"key"]; NSArray *values = @[startRow, pageSize, tradeStatus, [FLStringHelper replaceNilWithEmpty:keyword]]; NSString *itemJSONString = [FLRequestHelper JSONStringWithKeys:keys values:values]; NSMutableDictionary *para = [NSMutableDictionary dictionary]; [para setValue:itemJSONString forKey:@"payment_order_json"]; [para addEntriesFromDictionary:[FLRequestHelper commonParamater]]; NSString *URLString = [NSString stringWithFormat:@"%@/link-site/api/payment_order/find_payment_orders.json", [[FKServerUtil sharedInstance] apiServer]]; [[FLDataCenter sharedDataCenter] POST:URLString para:para identify:identify delegate:delegate]; } + (void)requestCancelOrder:(int)identify orderID:(NSString *)orderID deleagate:(id)delegate { NSString *itemJSONString = [FLRequestHelper JSONStringWithKeys:@[@"id"] values:@[orderID]]; NSMutableDictionary *para = [NSMutableDictionary dictionary]; [para setValue:itemJSONString forKey:@"payment_order_json"]; [para addEntriesFromDictionary:[FLRequestHelper commonParamater]]; NSString *URLString = [NSString stringWithFormat:@"%@/link-site/api/payment_order/cancel_payment_order.json", [[FKServerUtil sharedInstance] apiServer]]; [[FLDataCenter sharedDataCenter] POST:URLString para:para identify:identify delegate:delegate]; } + (void)requestDeleteOrder:(int)identify orderID:(NSString *)orderID deleagate:(id)delegate { NSString *itemJSONString = [FLRequestHelper JSONStringWithKeys:@[@"id"] values:@[orderID]]; NSMutableDictionary *para = [NSMutableDictionary dictionary]; [para setValue:itemJSONString forKey:@"payment_order_json"]; [para addEntriesFromDictionary:[FLRequestHelper commonParamater]]; NSString *URLString = [NSString stringWithFormat:@"%@/link-site/api/payment_order/remove_payment_order.json", [[FKServerUtil sharedInstance] apiServer]]; [[FLDataCenter sharedDataCenter] POST:URLString para:para identify:identify delegate:delegate]; } + (void)requestOrderBadge:(int)identify deleagate:(id)delegate { NSString *URLString = [NSString stringWithFormat:@"%@/link-site/api/payment_order/find_payment_order_count.json", [[FKServerUtil sharedInstance] apiServer]]; [[FLDataCenter sharedDataCenter] POST:URLString para:[FLRequestHelper commonParamater] identify:identify delegate:delegate]; } @end