Dao.php
1.19 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
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkan
* Date: 14-8-18
* Time: 下午6:04
* To change this template use File | Settings | File Templates.
*/
use YHMSupport\SqlMap\Notice;
class YHMSupport_Models_Notice_Dao extends YHMSupport_Dao {
private $_tag = 'yhm_passport_user_notice_setting';
public function __construct() {
$this->router = 'user_notice_setting.yhm_passport';
}
/**
*
* @return type
*/
function getOne($uid) {
return $this->dao()->cache(false)->fetchRow(Notice\Notice::SELECT_NOTICE_BY_UID, array('uid' => $uid));
}
/**
*
* @param number $product_skc
* @param number $order_by
* @param number $create_uid
*/
function setNoticeByUid($uid, $message_notice, $order_notice, $system_notice, $start_time, $end_time) {
$params = array(
'uid' => $uid,
'message_notice' => $message_notice,
'order_notice' => $order_notice,
'system_notice' => $system_notice,
'start_time' => $start_time,
'end_time' => $end_time
);
return $this->dao()->cache(false)->insert(Notice\Notice::SET_NOTICE_BY_UID, $params);
}
}