where($condition)->field($field)->order($order)->paginate(['list_rows'=>$pagesize,'query' => request()->param()],false); $this->page_info=$res; return $res->items(); }else{ return Db::name('storesnstracelog')->where($condition)->field($field)->order($order)->limit($limit)->select()->toArray(); } } /** * 获得店铺动态总数 * @access public * @author csdeshang * @param array $condition 条件 * @return int */ public function getStoresnstracelogCount($condition) { return Db::name('storesnstracelog')->where($condition)->count(); } /** * 获取单条店铺动态 * @access public * @author csdeshang * @param array $condition 条件 * @return array */ public function getStoresnstracelogInfo($condition) { return Db::name('storesnstracelog')->where($condition)->find(); } /** * 保存店铺动态 * @access public * @author csdeshang * @param array $data 数据 * @return boolean */ public function addStoresnstracelog($data) { return Db::name('storesnstracelog')->insertGetId($data); } /** * 保存店铺动态 * @access public * @author csdeshang * @param array $data 数据 * @return boolean */ public function addStoresnstracelogAll($data) { return Db::name('storesnstracelog')->insertAll($data); } /** * 更新店铺动态 * @access public * @author csdeshang * @param array $update 更新数据 * @param array $condition 条件 * @return boolean */ public function editStoresnstracelog($update, $condition) { return Db::name('storesnstracelog')->where($condition)->update($update); } /** * 删除店铺动态 * @access public * @author csdeshang * @param array $condition 条件 * @return boolean */ public function delStoresnstracelog($condition) { return Db::name('storesnstracelog')->where($condition)->delete(); } /** * 拼写个类型样式 * @param type $type 动态类型 * @param type $data 相关数据 * @return string */ public function spellingStyle($type,$data){ //1'relay',2'normal',3'new',4'coupon',5'xianshi',6'mansong',7'bundling',8'groupbuy',9'recommend',10'hotsell' $rs = ''; switch ($type){ case '2': break; case '3': $rs = "