255], [['refund_limit_day', 'refund_limit_time'], 'string', 'max' => 20], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'cancel_flag' => 'Cancel Flag', 'create_user' => 'Create User', 'update_user' => 'Update User', 'create_time' => 'Create Time', 'update_time' => 'Update Time', 'sp_tourist_id' => 'Sp Tourist ID', 'ctrip_prod_id' => 'Ctrip Prod ID', 'refund_limit_day' => 'Refund Limit Day', 'refund_limit_time' => 'Refund Limit Time', ]; } public function load($post, $formName = null) { $this->cancel_flag=isset($post['cancel_flag']) ? $post['cancel_flag'] : 0; $this->ctrip_prod_id=isset($post['ctrip_prod_id']) ? $post['ctrip_prod_id'] : 0; return parent::load($post); } /** * Function Description:查询携程对接自由行产品的产品编号 * Function Name: getTouristId * @param $ctrip_prod_id * * @return array|null|\yii\db\ActiveRecord * * @author 娄梦宁 */ public function getTouristId($ctrip_prod_id){ $sp_tourist_id=self::find()->select('sp_tourist_id')->from(self::tableName()) ->where(['and',['=','cancel_flag','0'],['=','ctrip_prod_id',$ctrip_prod_id]]) ->asArray() ->one(); return $sp_tourist_id; } }