where($condition)->field($fields)->order($order)->paginate(['list_rows' => $pagesize, 'query' => request()->param()], false); $this->page_info = $result; return $result->items(); } else { return Db::name('orderstatis')->where($condition)->field($fields)->order($order)->limit($limit)->select()->toArray(); } } /** * 取得平台月结算单条信息 * @access public * @author csdeshang * @param array $condition 检索条件 * @param string $fields 字段 * @param string $order 排序 * @return array */ public function getOrderstatisInfo($condition = array(), $fields = '*', $order = null) { return Db::name('orderstatis')->where($condition)->field($fields)->order($order)->find(); } /** * 取得店铺月结算单列表 * @access public * @author csdeshang * @param array $condition 检索条件 * @param str $fields 字段 * @param int $pagesize 分页信息 * @param str $order 排序 * @param int $limit 数量限制 * @return array */ public function getOrderbillList($condition = array(), $fields = '*', $pagesize = null, $order = '', $limit = 0) { if ($pagesize) { $result = Db::name('orderbill')->where($condition)->field($fields)->order($order)->paginate(['list_rows' => $pagesize, 'query' => request()->param()], false); $this->page_info = $result; return $result->items(); } else { return Db::name('orderbill')->where($condition)->field($fields)->order($order)->limit($limit)->select()->toArray(); } } /** * 取得店铺月结算单单条 * @access public * @author csdeshang * @param array $condition 检索条件 * @param string $fields 字段 * @return array */ public function getOrderbillInfo($condition = array(), $fields = '*') { return Db::name('orderbill')->where($condition)->field($fields)->find(); } /** * 取得订单数量 * @access public * @author csdeshang * @param array $condition 检索条件 * @return int */ public function getOrderbillCount($condition) { return Db::name('orderbill')->where($condition)->count(); } /** * 取得平台月结算单数量 * @access public * @author csdeshang * @param array $condition 检索条件 * @return int */ public function getOrderstatisCount($condition) { return Db::name('orderstatis')->where($condition)->count(); } /** * 添加订单统计 * @access public * @author csdeshang * @param type $data 参数内容 * @return type */ public function addOrderstatis($data) { return Db::name('orderstatis')->insert($data); } /** * 添加订单账单 * @access public * @author csdeshang * @param array $data 参数数据 * @return type */ public function addOrderbill($data) { return Db::name('orderbill')->insertGetId($data); } /** * 编辑订单账单 * @access public * @author csdeshang * @param array $data 更新数据 * @param array $condition 条件 * @return bool */ public function editOrderbill($data, $condition = array()) { return Db::name('orderbill')->where($condition)->update($data); } }