zm
2021-03-30 939c6f50c40fe7533e3672ebb938e70175aa3348
修改获取兑换卡详情的BUG(增加对卡号的校验)
1 files modified
4 ■■■ changed files
plugins/exchange/forms/api/CodeForm.php 4 ●●● patch | view | raw | blame | history
plugins/exchange/forms/api/CodeForm.php
@@ -16,12 +16,13 @@
class CodeForm extends Model
{
    public $code;
    public $card_no;
    public function rules()
    {
        return [
            [['code'], 'required'],
            [['code'], 'string'],
            [['code','card_no'], 'string'],
        ];
    }
@@ -84,6 +85,7 @@
            $codeModel = ExchangeCode::find()->where([
                'AND',
                ['code' => $this->code],
                ['card_no' => $this->card_no],
                ['in', 'status', [2, 3]],
                ['r_user_id' => \Yii::$app->user->id]
            ])->one();