Client.php
1.3 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
<?php
/**
* User: elkan
* Date: 14-8-5
* Time: 下午6:04
*/
class YHMSupport_Models_Notice_Client {
/**
*
* @var YHMSupport_Models_Notice_Dao
*/
private static $dao;
/**
*
* @return YHMSupport_Models_Notice_Dao
*/
static private function dao() {
if (empty(self::$dao)) {
self::$dao = new YHMSupport_Models_Notice_Dao();
}
return self::$dao;
}
/**
* 通知信息
* @return type
*/
static function getOne($uid) {
if ((int) $uid < 1) {
return 0;
}
return self::dao()->getOne((int) $uid);
}
/**
* 修改通知状态
* @param int $uid
* @param string $message_notice
* @param string $order_notice
* @param string $system_notice
* @param int $start_time
* @param int $end_time
* @return type
*/
public static function setNoticeByUid($uid, $message_notice, $order_notice, $system_notice, $start_time, $end_time) {
if ((int) $uid < 1 || empty($message_notice) || empty($order_notice) || empty($system_notice) || empty($start_time) || empty($end_time)) {
return 0;
}
return self::dao()->setNoticeByUid((int)$uid, $message_notice, $order_notice, $system_notice, $start_time, $end_time);
}
}