123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- //
- // 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<FLNetworkDelegate>)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<FLNetworkDelegate>)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<FLNetworkDelegate>)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<FLNetworkDelegate>)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
|