|
@@ -3,12 +3,14 @@
|
|
|
namespace app\common\model;
|
|
|
|
|
|
use app\common\service\OrderRefundService;
|
|
|
+use think\db\Query;
|
|
|
use think\Model;
|
|
|
|
|
|
/**
|
|
|
* 短信验证码
|
|
|
* @property Orders orders
|
|
|
* @property User user
|
|
|
+ * @method static static|Query FilterRefund()
|
|
|
*/
|
|
|
class Refund Extends Model
|
|
|
{
|
|
@@ -145,7 +147,12 @@ class Refund Extends Model
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 售后中及已售后的
|
|
|
+ */
|
|
|
+ public function scopeFilterRefund(Query $query){
|
|
|
+ $query->whereBetween("{$this->getTable()}.refund_status",[self::REFUND_ING,self::REFUND_PASS]);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|