-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy patharrival_notice.model.php
70 lines (64 loc) · 1.57 KB
/
arrival_notice.model.php
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
<?php
/**
* 商品到货通知模型
*
*
*
*
* by 33hao 好商城V3 www.33hao.com 开发
*/
defined('InShopNC') or exit('Access Invalid!');
class arrival_noticeModel extends Model{
public function __construct() {
parent::__construct('arrival_notice');
}
/**
* 通知列表
*
*
* @param unknown $condition
* @param string $field
* @param number $limit
* @param string $order
*/
public function getArrivalNoticeList($condition = array(), $field = '*', $limit = '', $order = 'an_id desc') {
return $this->where($condition)->field($field)->limit($limit)->order($order)->select();
}
/**
* 单条通知
*
* @param unknown $condition
* @param string $field
*/
public function getArrivalNoticeInfo($condition, $field = '*') {
return $this->where($condition)->field($field)->find();
}
/**
* 通知数量
*
* @param array $condition
* @param string $field
* @param string $order
* @return array
*/
public function getArrivalNoticeCount($condition) {
return $this->where($condition)->count();
}
/**
* 添加通知
* @param array $insert
* @return int
*/
public function addArrivalNotice($insert) {
$insert['an_addtime'] = TIMESTAMP;
return $this->insert($insert);
}
/**
* 删除通知
*
* @param unknown $condition
*/
public function delArrivalNotice($condition) {
return $this->where($condition)->delete();
}
}