Client.php
1.91 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
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkan
* Date: 14-8-5
* Time: 下午6:04
* To change this template use File | Settings | File Templates.
*/
class YHMOrders_Models_Status_Client {
/**
*
* @var YHMOrders_Models_Status_Dao
*/
private static $dao;
/**
*
* @return YHMOrders_Models_Status_Dao
*/
static private function dao() {
if (empty(self::$dao)) {
self::$dao = new YHMOrders_Models_Status_Dao();
}
return self::$dao;
}
/**
* 获取订单历史状态
* @param int $order_code
* @return int
*/
static function getByOrderCode($order_code) {
if ((int) $order_code < 1) {
return 0;
}
return self::dao()->getByOrderCode((int) $order_code);
}
/**
* 查看是否已有相同的状态
* @param type $order_code
*/
static function getRepeatStatusByOrderCode($order_code,$status){
if ((int) $order_code < 1) {
return 0;
}
return self::dao()->getRepeatStatusByOrderCode((int) $order_code,$status);
}
/**
* 添加状态
* @param integer $order_code
* @param integer $order_status
* @param integer $trigger_user
*/
public static function setOrderstatus($order_code, $order_status, $trigger_user) {
return self::dao()->setOrderstatus($order_code, $order_status, $trigger_user);
}
/**
* 获取订单状态
* @param integer $order_code
* @param integer $order_status
* @param integer $trigger_user
*/
public static function getOrderStatus($order_code) {
return self::dao()->getOrderStatus($order_code);
}
/*
*获取某阶段内订单状态列表
*/
public static function getOrderStatusByTime($time,$order_status,$type=1){
return self::dao()->getOrderStatusByTime($time,$order_status,$type);
}
}