xieruidong 2 年之前
父节点
当前提交
d546b8b82a
共有 2 个文件被更改,包括 7 次插入13 次删除
  1. 6 12
      application/common/model/Goods.php
  2. 1 1
      application/common/model/Refund.php

+ 6 - 12
application/common/model/Goods.php

@@ -51,7 +51,7 @@ class Goods Extends Model
     }
 
     public static function show(){
-        return self::where('status',1);
+        return self::where('status',self::STATUS_NORMAL);
     }
     public function getAmountAttr($amount,$model){
         if(KillService::open() && $model['is_kill']){
@@ -82,17 +82,11 @@ class Goods Extends Model
         ]);
     }
 
-
-
-
-
-
-
-
-
-
-
-
+    #维修费商品
+    public static function getFixGoods(){
+        $goods=self::show()->where('is_fix',1)->order('id','desc')->find();
+        return $goods;
+    }
 
     protected static function init()
     {

+ 1 - 1
application/common/model/Refund.php

@@ -181,7 +181,7 @@ class Refund Extends Model
                     $refundConfig['type']=[
                         self::TH_TYPE_SELF_FEE=>'拍维修费',
                     ];
-                    $refundConfig['req_order']=;
+                    $refundConfig['req_order']=Goods::getFixGoods();
                 }
                 $refundConfig['reason']=array_values(Refund::getReasons());
                 $refundConfig['req_amount']=0;