Client.php
2.07 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
/**
* 购物相关
*
*/
class YHMOrders_Models_Shopping_Client
{
/**
*
* @var YHMOrders_Models_Shopping_Dao
*/
private static $dao;
/**
*
* @return YHMOrders_Models_Shopping_Dao
*/
static private function dao()
{
if (empty(self::$dao)) {
self::$dao = new YHMOrders_Models_Shopping_Dao();
}
return self::$dao;
}
public static function create(array $orderData)
{
return self::dao()->create($orderData);
}
/**
* 修改价格
*
* @param array $package
* @return int
*/
public static function addShoppingChangePrice(array $package)
{
return self::dao()->addShoppingChangePrice($package);
}
/**
* 修改订单价格
*
* @param array $package
* @return int
*/
public static function addShoppingOrderChangePrice(array $package)
{
return self::dao()->addShoppingOrderChangePrice($package);
}
/**
* 获取购物改价
* @param $agreementKey
* @param $buyerUid
* @return Array
*/
public static function getShoppingChangePrice($agreementKey, $buyerUid)
{
return self::dao()->getShoppingChangePrice($agreementKey, $buyerUid);
}
/**
* @param $agreementKey
* @param $orderCode
* @param $isBuyer
* @return int
*/
public static function updateShoppingChange($agreementKey, $orderCode, $isBuyer = 'Y')
{
return self::dao()->updateShoppingChange($agreementKey, $orderCode, $isBuyer);
}
/**
* 获取指定小于状态的购买数量
* @param $productSku
* @param $orderStatus
* @return Array
*/
public static function getBuyGoodsNumber($productSku, $orderStatus = 900)
{
return self::dao()->getBuyGoodsNumber((int)$productSku, (int)$orderStatus);
}
/**
* 插入订单镜像表
* @param $storeID
* @return mixed
*/
public static function setBuyGoodsInfo($data)
{
return self::dao()->setBuyGoodsInfo($data);
}
}