KWMShopCartData.h
997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// KWMShopCartData.h
// iCemarose
//
// Created by 陈荣科 on 16/9/22.
// Copyright © 2016年 kollway. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "KWMShopCartItem+CoreDataProperties.h"
#import "KWMShopCartModel.h"
@interface KWMShopCartData : NSObject
/**
* 商品同步 会清除已有的然后重新保存
*
* @param items <#items description#>
*/
- (void)syncCartProducts:(NSArray *) items;
//添加购物商品
- (void) inocreaseItem:(KWMShopCartModel *)shopCartModel;
//删除购物商品
- (void) decreaseItem:(KWMShopCartModel *)shopCartModel;
//移除商品
- (void) removeItem:(KWMShopCartModel *)shopCartModel;
//移除所有商品
- (void) removeAllItems;
//修改商品个数
- (void) changeNumberShopcart:(KWMShopCartModel *)shopCartModel;
// 获取所有商品
- (NSArray *) getALLItems;
- (KWMShopCartItem *)toShopCartProduct:(KWMShopCartModel *)shopCartModel;
- (KWMShopCartModel *)toProduct:(KWMShopCartItem *)shopCartItem;
@end