Commit e132603f authored by hujun's avatar hujun

后台公告列表

parent 8f548e38
...@@ -83,10 +83,10 @@ class Notice extends Basic ...@@ -83,10 +83,10 @@ class Notice extends Basic
$data['publisher_id'] = $this->userId; $data['publisher_id'] = $this->userId;
$data['agent_id'] = -1; $data['agent_id'] = -1;
$data['steel_phone'] = 0; $data['steel_phone'] = 0;
$data['type'] = 1;
$num = $this->m_push->editData($data); $num = $this->m_push->editData($data);
if ($num > 0) { if ($num < 1) {
return $this->response(101, '新增公告失败!'); return $this->response(101, '新增公告失败!');
} }
......
...@@ -64,7 +64,7 @@ class PushFeed extends BaseModel ...@@ -64,7 +64,7 @@ class PushFeed extends BaseModel
public function getListAgent($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') { public function getListAgent($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
return $this->field($field) return $this->field($field)
->alias('a') ->alias('a')
->join('a_agents b', 'a.user_id = b.id', 'left') ->join('a_agents b', 'a.publisher_id = b.id', 'left')
->where($params) ->where($params)
->order($order_) ->order($order_)
->limit($pageSize) ->limit($pageSize)
...@@ -78,7 +78,7 @@ class PushFeed extends BaseModel ...@@ -78,7 +78,7 @@ class PushFeed extends BaseModel
*/ */
public function getListAgentTotal($params) { public function getListAgentTotal($params) {
return $this->alias('a') return $this->alias('a')
->join('a_agents b', 'a.user_id = b.id', 'left') ->join('a_agents b', 'a.publisher_id = b.id', 'left')
->where($params) ->where($params)
->count(); ->count();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment