|
|
@@ -1305,10 +1305,15 @@
|
|
|
|
|
|
+(NSData*) offline_editorder :(NSMutableDictionary *) params
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
+ int count = [params[@"count"] intValue];
|
|
|
+ NSString* product_id=params[@"product_id"];
|
|
|
+ NSString* orderCode=params[@"orderCode"];
|
|
|
+
|
|
|
NSMutableDictionary* ret = [[NSMutableDictionary alloc] init];
|
|
|
|
|
|
|
|
|
- NSString* orderCode = [params valueForKey:@"orderCode"];
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1327,6 +1332,31 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
++(NSData*) offline_add2cart :(NSMutableDictionary *) params;
|
|
|
+{
|
|
|
+
|
|
|
+ NSMutableDictionary* ret = [[NSMutableDictionary alloc] init];
|
|
|
+
|
|
|
+
|
|
|
+ NSString* orderCode = [params valueForKey:@"orderCode"];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ sqlite3 *db = [iSalesDB get_db];
|
|
|
+
|
|
|
+ int cart_count=[iSalesDB get_recordcount:db table:@"offline_cart" where:[NSString stringWithFormat:@"so_no='%@'",orderCode]];
|
|
|
+
|
|
|
+ int wish_count=[iSalesDB get_recordcount:db table:@"offline_wishlist" where:@"1=1"];
|
|
|
+ ret[@"wish_count"]=[NSNumber numberWithInt:wish_count ];
|
|
|
+ ret[@"cart_count"]=[NSNumber numberWithInt:cart_count ];
|
|
|
+ ret[@"result"]=[NSNumber numberWithInt:RESULT_TRUE ];
|
|
|
+
|
|
|
+ [iSalesDB close_db:db];
|
|
|
+
|
|
|
+ return [RAUtils dict2data:ret];
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+(NSData*) offline_login :(NSMutableDictionary *) params
|
|
|
{
|
|
|
|
|
|
@@ -4130,6 +4160,19 @@
|
|
|
NSString *str = [html stringByReplacingOccurrencesOfString:str0 withString:str1];
|
|
|
return str;
|
|
|
}
|
|
|
++(NSString*) timeFormat:(NSString*)datetime from:(NSString*) from to:(NSString*) to
|
|
|
+{
|
|
|
+ NSDateFormatter *fromformatter = [[NSDateFormatter alloc] init];
|
|
|
+ [fromformatter setDateFormat:from];
|
|
|
+ NSDate *date = [fromformatter dateFromString:datetime];
|
|
|
+
|
|
|
+ NSDateFormatter * toformatter = [[NSDateFormatter alloc] init ];
|
|
|
+ [toformatter setDateFormat:to];
|
|
|
+ NSString * ret = [toformatter stringFromDate:date];
|
|
|
+
|
|
|
+ return ret;
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
+ (NSString *)changeDateTime:(NSString *)dateTime Formate:(NSString *)formate withFormate:(NSString *)newFormate {
|
|
|
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|