Sfoglia il codice sorgente

修复:设置优惠券使用状态报错

Yahoo 4 anni fa
parent
commit
63f21c8095
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      app/common/model/UserCoupon.php

+ 2 - 2
app/common/model/UserCoupon.php

@@ -8,7 +8,7 @@
 // +----------------------------------------------------------------------
 // | Author: 萤火科技 <admin@yiovo.com>
 // +----------------------------------------------------------------------
-declare (strict_types = 1);
+declare (strict_types=1);
 
 namespace app\common\model;
 
@@ -140,6 +140,6 @@ class UserCoupon extends BaseModel
      */
     public static function setIsUse(int $couponId, bool $isUse = true): bool
     {
-        return static::updateOne(['is_use' => (int)$isUse], $couponId);
+        return static::updateBase(['is_use' => (int)$isUse], ['coupon_id' => $couponId]);
     }
 }