'砍价取消', self::PINTUANORDER_STATE_NORMAL => '砍价中', self::PINTUANORDER_STATE_SUCCESS => '砍价成功', self::PINTUANORDER_STATE_FAIL => '砍价失败' ); /** * 获取砍价订单表列表 * @access public * @author csdeshang * @param type $condition 条件 * @return type */ public function getPbargainorderList($condition,$pagesize='') { $res = Db::name('pbargainorder')->where($condition)->order('bargainorder_id desc'); if($this->lock){ $res=$res->lock(true); } if($pagesize){ $res=$res->paginate(['list_rows'=>$pagesize,'query' => request()->param()],false); $pbargainorder_list = $res->items(); $this->page_info = $res; }else{ $pbargainorder_list=$res->select()->toArray(); } return $pbargainorder_list; } /** * 获取砍价订单表列表 * @access public * @author csdeshang * @param type $condition 条件 * @return type */ public function getOnePbargainorder($condition,$lock=false) { return Db::name('pbargainorder')->where($condition)->lock($lock)->find(); } /** * 获取砍价订单表数量 * @access public * @author csdeshang * @param type $condition 条件 * @return type */ public function getPbargainorderCount($condition) { return Db::name('pbargainorder')->where($condition)->count(); } /** * 增加砍价订单 * @access public * @author csdeshang * @param type $data 参数内容 * @return type */ public function addPbargainorder($data) { return Db::name('pbargainorder')->insertGetId($data); } /** * 编辑砍价订单 * @access public * @author csdeshang * @param type $condition 条件 * @param type $data 数据 * @return type */ public function editPbargainorder($condition, $data) { return Db::name('pbargainorder')->where($condition)->update($data); } /** * 砍价状态数组 * @access public * @author csdeshang * @return type */ public function getBargainorderStateArray() { return $this->bargainorder_state_array; } }