moonsflyer 4 hónapja
szülő
commit
ceae7a29a1

+ 4 - 1
app/adminapi/lists/info/InfoLists.php

@@ -42,7 +42,10 @@ class InfoLists extends BaseAdminDataLists
             $where[] = ['type', '=', $params['type']];
         }
         if (isset($params['name']) && $params['name'] != '') {
-            $where[] = ['neme', '%like%', $params['name']];
+            $where[] = ['name', '%like%', $params['name']];
+        }
+        if (isset($params['name']) && $params['name'] != '') {
+            $where[] = ['name', '%like%', $params['name']];
         }
         return $where;
     }

+ 3 - 1
app/adminapi/logic/gift_card/GiftCardLogic.php

@@ -142,7 +142,9 @@ class GiftCardLogic extends BaseLogic
         try {
 
 
-            $res = GiftCard::destroy($params['id']);
+//            $res = GiftCard::destroy($params['id']);
+
+            $res = GiftCard::where(['id'=>$params['id']])->update(['delete_time'=>time()]);
             // 提交事务
 
             if(!$res){

+ 1 - 1
app/shopapi/logic/RechargeLogic.php

@@ -172,7 +172,7 @@ class RechargeLogic extends BaseLogic
         try {
             $gift_card_info = GiftCardInfo::where(['card_pass' => $params['pass']])->findOrEmpty();
             if ($gift_card_info->isEmpty()) {
-                throw new \think\Exception('卡密有误,请检查!');
+                throw new \think\Exception('卡密有误或已经停用,请检查!');
             }
 
             $data = [