Prod.class.php
3.38 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/**
* prod信息
*
* @name Facade_Prod
* @version 1.0 (2013-6-5)
* @package Facade/Prod
* @author hbomb
* @since 1.0
*/
class Facade_Prod
{
private static $service = null;
/**
* 返回service对象
*
* @return Service_Prod_Prod
*/
public static function service()
{
if (null === self::$service)
{
self::$service = new Service_Prod();
}
return self::$service;
}
/**
* 获取prod
*
* @param int|array $recom_status
* @param int $offset
* @param int $limit
* @return array
*/
public static function getProd ($recom_status, $offset, $limit)
{
return self::service()->getProd($recom_status, $offset, $limit);
}
/**
* 根据brand_id获取prod
*
* @param string $offset
* @param string $limit
* @param string $brand_id
* @param int|array $recom_status
* @return array
*/
public static function getProdByBrandId ($offset, $limit, $brand_id, $recom_status = 0)
{
return self::service()->getProdByBrandId($offset, $limit, $brand_id, $recom_status);
}
/**
* 根据brand_id获取prod总数
*
* @param string $brand_id
* @param int|array $recom_status
* @return array
*/
public static function getProdTotalByBrandId($brand_id, $recom_status = 0)
{
return self::service()->getProdTotalByBrandId($brand_id, $recom_status);
}
/**
* 态获取所有prod个数. 用于前端分页
*
* @param int|array $recom_status
* @return int
*/
public static function getProdTotal ($recom_status)
{
return self::service()->getProdTotal($recom_status);
}
/**
* 根据id更新prod操作.
*
* @param string $name
* @param string $brand_id
* @param string $url
* @param string $pic
* @param string $text
* @param int $sort
* @param string $create_time
* @param int $price
* @param int $recom_status
* @param string $market_price
* @param string $product_skn
* @param string $product_id
* @param string $id
* @return boolean
*/
public static function updateProd ($name, $brand_id, $url, $pic, $text, $sort, $create_time, $price, $recom_status, $market_price, $product_skn, $product_id, $id)
{
return self::service()->updateProd($name, $brand_id, $url, $pic, $text, $sort, $create_time, $price, $recom_status, $market_price, $product_skn, $product_id, $id);
}
/**
* 用户提交prod.
*
* @param string $name
* @param string $brand_id
* @param string $url
* @param string $pic
* @param string $text
* @param int $sort
* @param int $price
* @param int $recom_status
* @param string $market_price
* @param string $product_skn
* @param string $product_id
* @return int
*/
public static function submitProd ($name, $brand_id, $url, $pic, $text, $sort, $price, $recom_status, $market_price, $product_skn, $product_id)
{
return self::service()->submitProd($name, $brand_id, $url, $pic, $text, $sort, $price, $recom_status, $market_price, $product_skn, $product_id);
}
/**
* 删除prod
* @param unknown_type $id
*/
public static function delProd($id)
{
return self::service()->delProd($id);
}
}