array( 'desc' => '正常', 'kw' => 'PRIZE_DISPLAY_SHOW', ), self::PRIZE_DISPLAY_HIDE => array( 'desc' => '关闭', 'kw' => 'PRIZE_DISPLAY_HIDE', ), ); /** * 奖项显示状态 * @return array */ public static function getDisplay() { return self::$display; } /** * EXPRESS_TRUE 需要快递 * @var int */ const EXPRESS_TRUE = 1; /** * EXPRESS_FALSE 不需要快递 * @var int */ const EXPRESS_FALSE = 2; public static $express= array( self::EXPRESS_TRUE => array( 'desc' => '需要', 'kw' => 'EXPRESS_TRUE', ), self::EXPRESS_FALSE => array( 'desc' => '不需要', 'kw' => 'EXPRESS_FALSE', ), ); /** * 获取是否需要快递 * @return array */ public static function getExpress(){ return self::$express; } /** * TYPE_VIRTUAL 实物类 * @var int */ const TYPE_VIRTUAL = 1; /** * TYPE_ENTITY 虚拟类 * @var int */ const TYPE_ENTITY = 2; public static $type = array( self::TYPE_VIRTUAL => array( 'desc' => '实物', 'kw' => 'TYPE_VIRTUAL', ), self::TYPE_ENTITY => array( 'desc' => '虚拟', 'kw' => 'TYPE_ENTITY', ) ); /** * 获取奖项类型:实物类:1 虚拟类:2 * @return array */ public static function getType() { return self::$type; } /** * 对已抽中的数量进行修改 */ public function upPrizeWinningNum($id ,$num){ $data = $this->get($id); $info = array( 'prize_winning_num' => $data['prize_winning_num'] + $num ); return $this->modify($info,array('id' => $id)); } /** * 对总数量进行修改 */ public function upPrizeNum($id ,$num){ $data = $this->get($id); $info = array( 'prize_num' => $data['prize_num'] + $num ); return $this->modify($info,array('id' => $id)); } }