gorden 6 ماه پیش
والد
کامیت
c786e70d45

+ 1 - 6
app/admin/controller/coupon/CouponController.php

@@ -721,12 +721,7 @@ class CouponController extends Curd
                 }
                 }
                 CouponGoods::where('join_goods_coupon_id', $id)->delete();
                 CouponGoods::where('join_goods_coupon_id', $id)->delete();
 
 
-//                CouponDetail::where('join_detail_coupon_id', $id)
-//                    ->whereIn('coupon_detail_status',['INIT','PENDING','ACTIVED'])
-//                    ->delete();
-//                CouponDetail::where('join_detail_coupon_id', $id)
-//                    ->where('coupon_detail_status','WAITING')
-//                    ->update(['coupon_detail_status'=>'DISABLED']);
+                CouponDetail::where('join_detail_coupon_id', $id)->delete();
             }
             }
             $this->doDelete($ids);
             $this->doDelete($ids);
             Db::commit();
             Db::commit();

+ 61 - 9
app/admin/controller/coupon/CouponDetailController.php

@@ -2,10 +2,12 @@
 
 
 namespace app\admin\controller\coupon;
 namespace app\admin\controller\coupon;
 
 
+use app\admin\service\coupon\CouponService;
 use app\admin\service\member\MemberService;
 use app\admin\service\member\MemberService;
 use app\controller\Curd;
 use app\controller\Curd;
 use app\model\Coupon;
 use app\model\Coupon;
 use app\model\CouponDetail;
 use app\model\CouponDetail;
+use app\model\CouponGoods;
 use support\Request;
 use support\Request;
 use support\Response;
 use support\Response;
 
 
@@ -120,7 +122,7 @@ class CouponDetailController extends Curd
             }
             }
             if (!empty($item['coupon_detail_extend_json'])) {
             if (!empty($item['coupon_detail_extend_json'])) {
                 $couponDetailExtendJson = json_decode($item['coupon_detail_extend_json'], true);
                 $couponDetailExtendJson = json_decode($item['coupon_detail_extend_json'], true);
-                if (isset($couponDetailExtendJson['gettype'])){
+                if (isset($couponDetailExtendJson['gettype'])) {
                     $item['gettype'] = $couponDetailExtendJson['gettype'];
                     $item['gettype'] = $couponDetailExtendJson['gettype'];
                 }
                 }
             }
             }
@@ -170,21 +172,71 @@ class CouponDetailController extends Curd
      */
      */
     public function info(Request $request): Response
     public function info(Request $request): Response
     {
     {
-        $detailId = $request->get('detail_id','');
-        if (empty($detailId)){
+        $detailId = $request->get('detail_id', '');
+        if (empty($detailId)) {
             return json_fail('参数异常');
             return json_fail('参数异常');
         }
         }
 
 
-        $detail = CouponDetail::where('coupon_detail_id',$detailId)
-            ->select('coupon_detail_id','coupon_detail_extend_json')
+        $detail = CouponDetail::where('coupon_detail_id', $detailId)
+            ->select('coupon_detail_id', 'coupon_detail_extend_json')
             ->first();
             ->first();
-        if (!empty($detail->coupon_detail_extend_json)){
-            $couponDetailExtendJson = json_decode($detail->coupon_detail_extend_json,true);
-            if (isset($couponDetailExtendJson['from'])){
+        if (!empty($detail->coupon_detail_extend_json)) {
+            $couponDetailExtendJson = json_decode($detail->coupon_detail_extend_json, true);
+            if (isset($couponDetailExtendJson['from'])) {
                 $detail['from'] = MemberService::getMemberNameByMemberId($couponDetailExtendJson['from']);
                 $detail['from'] = MemberService::getMemberNameByMemberId($couponDetailExtendJson['from']);
             }
             }
         }
         }
 
 
-        return json_success('',$detail);
+        return json_success('', $detail);
+    }
+
+    public function myCouponGrouping(Request $request)
+    {
+        $memberId = $request->get('member_id', '');
+        $goods = $request->get('goods', []);
+        if ($memberId == '') {
+            return json_fail("参数异常");
+        }
+
+        $goodsIds = array_column($goods, 'goods_id');
+        $couponGoods = CouponGoods::whereIn('join_coupon_goods_id', $goodsIds)->get()->toArray();
+        $couponIds = [];
+        foreach ($couponGoods as $couponGood) {
+            foreach ($goods as $good) {
+                if ($good['sku_id'] = $couponGood['join_coupon_goods_sku_id']) {
+                    $couponIds[] = $couponGood['join_goods_coupon_id'];
+                }
+            }
+        }
+
+        $details = CouponDetail::with([
+            'coupon' => function ($query) {
+                $query->select('coupon_id', 'coupon_name', 'coupon_classify', 'coupon_value', 'coupon_minimum_limit');
+            }
+        ])
+            ->whereIn('join_detail_coupon_id', $couponIds)
+            ->where('join_coupon_detail_member_id', $memberId)
+            ->where('coupon_detail_status', 'ACTIVED')
+            ->select('join_detail_coupon_id', 'join_coupon_detail_member_id')
+            ->groupBy('join_detail_coupon_id', 'join_coupon_detail_member_id')
+            ->get()
+            ->toArray();
+        $data = [];
+        foreach ($details as $detail) {
+            if (empty($detail['coupon'])) {
+                continue;
+            }
+            $classify = CouponService::couponClassifyInfo($detail['coupon']['coupon_classify'], $detail['coupon']['coupon_value'], $detail['coupon']['coupon_minimum_limit']);
+            $data[] = [
+                'coupon_id' => $detail['coupon']['coupon_id'],
+                'coupon_name' => $detail['coupon']['coupon_name'],
+                'classify' => $classify,
+                'coupon_classify' => $detail['coupon']['coupon_classify'],
+                'coupon_value' => $detail['coupon']['coupon_value'] ?? '',
+                'coupon_minimum_limit' => $detail['coupon']['coupon_minimum_limit'] ?? '',
+            ];
+        }
+
+        return json_success('', $data);
     }
     }
 }
 }

+ 1 - 0
app/admin/controller/member/AccountController.php

@@ -45,6 +45,7 @@ class AccountController extends Curd
 
 
         foreach ($account as &$item){
         foreach ($account as &$item){
             $item['member_account_duedate'] = !empty($item['member_account_duedate']) ? date('Y-m-d H:i:s',$item['member_account_duedate']) : '长期有效';
             $item['member_account_duedate'] = !empty($item['member_account_duedate']) ? date('Y-m-d H:i:s',$item['member_account_duedate']) : '长期有效';
+            $item['member_account_surplus'] = $item['member_account_surplus'] + $item['member_account_added'];
         }
         }
 
 
         return json_success('', $account);
         return json_success('', $account);

+ 43 - 19
app/admin/controller/order/WholeController.php

@@ -504,18 +504,18 @@ class WholeController extends Curd
                 if (!empty($discountItem['coupon_id'])) {
                 if (!empty($discountItem['coupon_id'])) {
                     $discount['coupon_name'] .= Coupon::where('coupon_id', $discountItem['coupon_id'])->value('coupon_name') . ', ';
                     $discount['coupon_name'] .= Coupon::where('coupon_id', $discountItem['coupon_id'])->value('coupon_name') . ', ';
                 }
                 }
-                if (empty($discountItem['coupon_id']) && !empty($discountItem['coupon_classify'])){
-                    $discount['classify'] .= $discountItem['coupon_classify'].'('.round($discountItem['coupon_value'],2).'), ';
+                if (empty($discountItem['coupon_id']) && !empty($discountItem['coupon_classify'])) {
+                    $discount['classify'] .= $discountItem['coupon_classify'] . '(' . round($discountItem['coupon_value'], 2) . '), ';
                 }
                 }
-                if (!empty($discountItem['coupon_value'])){
+                if (!empty($discountItem['coupon_value'])) {
                     $discount['value'] += $discountItem['coupon_value'];
                     $discount['value'] += $discountItem['coupon_value'];
                 }
                 }
             }
             }
-            if (!empty($discount['coupon_name'])){
-                $discount['coupon_name'] = rtrim($discount['coupon_name'],', ');
+            if (!empty($discount['coupon_name'])) {
+                $discount['coupon_name'] = rtrim($discount['coupon_name'], ', ');
             }
             }
-            if (!empty($discount['classify'])){
-                $discount['classify'] = rtrim($discount['classify'],', ');
+            if (!empty($discount['classify'])) {
+                $discount['classify'] = rtrim($discount['classify'], ', ');
             }
             }
         }
         }
         $order->discount = $discount;
         $order->discount = $discount;
@@ -747,7 +747,7 @@ class WholeController extends Curd
             $orderConfigJson = json_decode($order->order_config_json, true);
             $orderConfigJson = json_decode($order->order_config_json, true);
             if (isset($orderConfigJson['premises'])) {
             if (isset($orderConfigJson['premises'])) {
                 $premises = SysDept::where('dept_name', $orderConfigJson['premises'])->first();
                 $premises = SysDept::where('dept_name', $orderConfigJson['premises'])->first();
-                if (!empty($premises)){
+                if (!empty($premises)) {
                     $params['submit_premises_id'] = $premises->dept_id;
                     $params['submit_premises_id'] = $premises->dept_id;
                 }
                 }
             }
             }
@@ -1060,9 +1060,9 @@ class WholeController extends Curd
                 $payData['pay_prepayid'] = $params['card_nbr'];
                 $payData['pay_prepayid'] = $params['card_nbr'];
             } else if ($params['pay_category'] == 'OFFLINE') {
             } else if ($params['pay_category'] == 'OFFLINE') {
                 $payData['pay_prepayid'] = 'OFFLINE';
                 $payData['pay_prepayid'] = 'OFFLINE';
-            }  else if ($params['pay_category'] == 'OFFLINE_ALIPAY') {
+            } else if ($params['pay_category'] == 'OFFLINE_ALIPAY') {
                 $payData['pay_prepayid'] = 'OFFLINE_ALIPAY';
                 $payData['pay_prepayid'] = 'OFFLINE_ALIPAY';
-            }  else if ($params['pay_category'] == 'OFFLINE_WXPAY') {
+            } else if ($params['pay_category'] == 'OFFLINE_WXPAY') {
                 $payData['pay_prepayid'] = 'OFFLINE_WXPAY';
                 $payData['pay_prepayid'] = 'OFFLINE_WXPAY';
             } else if ($params['pay_category'] == 'MONEY') {
             } else if ($params['pay_category'] == 'MONEY') {
                 $payData['pay_prepayid'] = 'MONEY';
                 $payData['pay_prepayid'] = 'MONEY';
@@ -1147,8 +1147,8 @@ class WholeController extends Curd
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
             }
             }
 
 
-            if ($order->order_is_complete == 'Y'){
-                Event::dispatch('order.complete',$params);
+            if ($order->order_is_complete == 'Y') {
+                Event::dispatch('order.complete', $params);
             }
             }
 
 
             Db::commit();
             Db::commit();
@@ -1287,7 +1287,7 @@ class WholeController extends Curd
             $orderConfigJson = json_decode($order->order_config_json, true);
             $orderConfigJson = json_decode($order->order_config_json, true);
             if (isset($orderConfigJson['premises'])) {
             if (isset($orderConfigJson['premises'])) {
                 $premises = SysDept::where('dept_name', $orderConfigJson['premises'])->first();
                 $premises = SysDept::where('dept_name', $orderConfigJson['premises'])->first();
-                if (!empty($premises)){
+                if (!empty($premises)) {
                     $params['submit_premises_id'] = $premises->dept_id;
                     $params['submit_premises_id'] = $premises->dept_id;
                 }
                 }
             }
             }
@@ -1529,8 +1529,8 @@ class WholeController extends Curd
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
             }
             }
 
 
-            if ($order->order_is_complete == 'Y'){
-                Event::dispatch('order.complete',$params);
+            if ($order->order_is_complete == 'Y') {
+                Event::dispatch('order.complete', $params);
             }
             }
 
 
             Db::commit();
             Db::commit();
@@ -2178,8 +2178,8 @@ class WholeController extends Curd
                 $params['member_id'] = $params['join_order_member_id'];
                 $params['member_id'] = $params['join_order_member_id'];
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
             }
             }
-            if (!empty($params['order_is_complete']) && $params['order_is_complete'] == 'Y'){
-                Event::dispatch('order.complete',$params);
+            if (!empty($params['order_is_complete']) && $params['order_is_complete'] == 'Y') {
+                Event::dispatch('order.complete', $params);
             }
             }
 
 
             Db::commit();
             Db::commit();
@@ -2673,8 +2673,8 @@ class WholeController extends Curd
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
                 Event::dispatch('order.kangyangCityVIP.grant', $params);
             }
             }
 
 
-            if (!empty($params['order_is_complete']) && $params['order_is_complete'] == 'Y'){
-                Event::dispatch('order.complete',$params);
+            if (!empty($params['order_is_complete']) && $params['order_is_complete'] == 'Y') {
+                Event::dispatch('order.complete', $params);
             }
             }
 
 
             Db::commit();
             Db::commit();
@@ -4253,7 +4253,31 @@ class WholeController extends Curd
             Db::rollBack();
             Db::rollBack();
             return json_fail('修改订单状态失败');
             return json_fail('修改订单状态失败');
         }
         }
+    }
+
+    public function useCoupon(Request $request)
+    {
+        $goods = $request->post('goods', []);
+        $coupon = $request->post('coupon', []);
+        $payAmount = $request->post('pay_amount', 0);
+        $totalAmount = $request->post('total_amount', 0);
+        $memberId = $request->post('member_id', '');
+        if (empty($goods) || empty($coupon) || empty($memberId)) {
+            return json_fail("参数异常");
+        }
+        foreach ($coupon as $item) {
+            if (!in_array(substr($item, 0, 2), ['CU', 'CO'])) {
+                return json_fail("参数异常");
+            }
+        }
+        $goodsCount = count($goods);
+        foreach ($goods as $good) {
+            $payAmount = OrderService::useCoupon($memberId, $good, $goodsCount, $coupon, $payAmount, $totalAmount);
+        }
+
+        Redis::del("ORDER:USE:COUPON:" . $memberId);
 
 
+        return json_success("success", ['pay_amount' => $payAmount]);
     }
     }
 
 
     public static $goodsClassify = [
     public static $goodsClassify = [

+ 9 - 0
app/admin/service/coupon/CouponDetailService.php

@@ -8,6 +8,15 @@ use support\exception\BusinessException;
 
 
 class CouponDetailService
 class CouponDetailService
 {
 {
+    /**
+     * @Desc 手动发券
+     * @Author Gorden
+     * @Date 2024/8/27 9:57
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
     public static function customSendCoupon($params)
     public static function customSendCoupon($params)
     {
     {
         try {
         try {

+ 49 - 5
app/admin/service/coupon/CouponService.php

@@ -16,13 +16,57 @@ class CouponService
      */
      */
     public static function checkCouponExpired()
     public static function checkCouponExpired()
     {
     {
-        $couponDetails = Db::select("select * from app_coupon_detail where (coupon_detail_status = 'INIT' OR coupon_detail_status = 'PENDING' OR coupon_detail_status = 'ACTIVED' OR coupon_detail_status = 'WAITING') AND coupon_detail_deadline_datetime != '' AND CAST(UNIX_TIMESTAMP(coupon_detail_deadline_datetime) as SIGNED) < ".time());
-        foreach ($couponDetails as $detail){
+        $couponDetails = Db::select("select * from app_coupon_detail where (coupon_detail_status = 'INIT' OR coupon_detail_status = 'PENDING' OR coupon_detail_status = 'ACTIVED' OR coupon_detail_status = 'WAITING') AND coupon_detail_deadline_datetime != '' AND CAST(UNIX_TIMESTAMP(coupon_detail_deadline_datetime) as SIGNED) < " . time());
+        foreach ($couponDetails as $detail) {
             $endTimeUnix = strtotime($detail->coupon_detail_deadline_datetime);
             $endTimeUnix = strtotime($detail->coupon_detail_deadline_datetime);
-            if ($endTimeUnix < time()){
-                CouponDetail::where('coupon_detail_id',$detail->coupon_detail_id)->update(['coupon_detail_status'=>'EXPIRED']);
-               echo $detail->coupon_detail_id."已过期\n";
+            if ($endTimeUnix < time()) {
+                CouponDetail::where('coupon_detail_id', $detail->coupon_detail_id)->update(['coupon_detail_status' => 'EXPIRED']);
+                echo $detail->coupon_detail_id . "已过期\n";
             }
             }
         }
         }
     }
     }
+
+    public static function couponClassifyInfo($classify, $value, $limit)
+    {
+        try {
+            switch ($classify){
+                case "满减券":
+                    return "满".$limit.'减'.$value;
+                    break;
+                case "立减券":
+                    return "立减".$value;
+                    break;
+                case "抵用券":
+                    return "抵用券";
+                    break;
+                case "折扣券":
+                    if (!empty($limit)){
+                        return "满".$limit.'打'.($value/10).'折';
+                    }else{
+                        return $value.'折';
+                    }
+                    break;
+                case "赠品券":
+                    return "赠品券";
+                    break;
+                case "福利券":
+                    if (!empty($limit)){
+                        return "满".$limit.'抵扣'.$value;
+                    }else{
+                        return '抵扣'.$value;
+                    }
+                    break;
+                case "年卡":
+                    return "年卡";
+                    break;
+                case "季卡":
+                    return "季卡";
+                    break;
+                case "月卡":
+                    return "月卡";
+                    break;
+            }
+        }catch (\Exception $e){}
+
+    }
 }
 }

+ 57 - 0
app/admin/service/order/OrderService.php

@@ -2,6 +2,7 @@
 
 
 namespace app\admin\service\order;
 namespace app\admin\service\order;
 
 
+use app\model\CouponDetail;
 use app\model\GoodsRunning;
 use app\model\GoodsRunning;
 use app\model\GoodsSku;
 use app\model\GoodsSku;
 use app\model\Member;
 use app\model\Member;
@@ -427,6 +428,62 @@ class OrderService
         return $payWay;
         return $payWay;
     }
     }
 
 
+    public static function useCoupon($memberId, $goods, $goodsCount, $coupon, $payAmount, $totalAmount)
+    {
+        try {
+            $goodsId = $goods['goods_id'];
+            $money = $goods['goods_sales_price'] * $goods['nbr'];
+            foreach ($coupon as $couponId) {
+                $couponDetail = CouponDetail::leftJoin('coupon_goods', 'coupon_goods.join_goods_coupon_id', '=', 'coupon_detail.join_detail_coupon_id')
+                    ->leftJoin('coupon', 'coupon.coupon_id', '=', 'coupon_detail.join_detail_coupon_id')
+                    ->select('coupon_detail.coupon_detail_id', 'coupon_goods.coupon_goods_id', 'coupon_id', 'coupon_classify', 'coupon_value', 'coupon_minimum_limit', 'coupon_category')
+                    ->where('coupon_goods.join_coupon_goods_id', $goodsId)
+                    ->where('coupon_goods.join_coupon_goods_sku_id', $goods['sku_id'])
+                    ->where('join_goods_coupon_id', $couponId)
+                    ->where('coupon_detail.join_coupon_detail_member_id', $memberId)
+                    ->first();
+                if (in_array($couponDetail->coupon_classify, ['立减券', '满减券'])) {
+                    if (($couponDetail->coupon_category == 'PIECE' && $goodsCount >= $couponDetail->coupon_minimum_limit) || ($couponDetail->coupon_category == 'NORMAL' && $totalAmount >= $couponDetail->coupon_minimum_limit)) {
+                        if ($money - $couponDetail->coupon_value >= 0) {
+                            $money = $money - $couponDetail->coupon_value;
+                            $payAmount = $payAmount - $couponDetail->coupon_value;
+                        } elseif ($money - $couponDetail->coupon_value < 0) {
+                            $payAmount = $payAmount - $money;
+                            $money = 0;
+                        }
+                    }
+                } elseif ($couponDetail->coupon_classify == '折扣券') {
+                    if (($couponDetail->coupon_category == 'PIECE' && $goodsCount >= $couponDetail->coupon_minimum_limit) || ($couponDetail->coupon_category == 'NORMAL' && $totalAmount >= $couponDetail->coupon_minimum_limit)) {
+                        $payAmount = $payAmount - ($money * $couponDetail->coupon_value / 100);
+                    }
+                } elseif ($couponDetail->coupon_classify == '抵用券') {
+                    if (($couponDetail->coupon_category == 'PIECE' && $goodsCount >= $couponDetail->coupon_value) || ($couponDetail->coupon_category == 'NORMAL' && $totalAmount >= $couponDetail->coupon_minimum_limit)) {
+                        $diyongCouponDetailIds = CouponDetail::leftJoin('coupon_goods', 'coupon_goods.join_goods_coupon_id', '=', 'coupon_detail.join_detail_coupon_id')
+                            ->where('join_detail_coupon_id', $couponId)
+                            ->where('coupon_goods.join_coupon_goods_id', $goodsId)
+                            ->where('coupon_goods.join_coupon_goods_sku_id', $goods['sku_id'])
+                            ->where('coupon_detail_status', 'ACTIVED')
+                            ->where('coupon_detail.join_coupon_detail_member_id', $memberId)
+                            ->pluck('coupon_detail_id')
+                            ->toArray();
+                        foreach ($diyongCouponDetailIds as $detailId) {
+                            $key = "ORDER:USE:COUPON:" . $memberId;
+                            if (!Redis::sIsMember($key, $detailId)) {
+                                Redis::sAdd($key, $detailId);
+                                $payAmount = $payAmount - $money;
+                            }
+                        }
+                    }
+
+                }
+            }
+
+            return $payAmount;
+        } catch (\Exception $e) {
+            dump($e->getMessage());
+        }
+    }
+
 
 
     public static $couponClassify = [
     public static $couponClassify = [
         'wipe' => '抹零',
         'wipe' => '抹零',

+ 3 - 3
app/event/order/KangyangCityEvent.php

@@ -17,7 +17,7 @@ class KangyangCityEvent
         // 会员VIP 标识
         // 会员VIP 标识
         $member = Member::where('member_id', $params['member_id'])->select('member_mobile', 'member_is_vip', 'member_extend_json')->first();
         $member = Member::where('member_id', $params['member_id'])->select('member_mobile', 'member_is_vip', 'member_extend_json')->first();
         $memberUpdateData = [
         $memberUpdateData = [
-            'member_is_vip'=>'Y'
+            'member_is_vip' => 'Y'
         ];
         ];
         if (!empty($params['referee'])) {
         if (!empty($params['referee'])) {
             $memberExtendJson = [];
             $memberExtendJson = [];
@@ -25,7 +25,7 @@ class KangyangCityEvent
                 $memberExtendJson = json_decode($member->member_extend_json, true);
                 $memberExtendJson = json_decode($member->member_extend_json, true);
             }
             }
             $memberExtendJson['referee'][date('Y-m-d H:i:s')] = $params['referee'];
             $memberExtendJson['referee'][date('Y-m-d H:i:s')] = $params['referee'];
-            $memberUpdateData['member_extend_json'] = json_encode($memberExtendJson,JSON_UNESCAPED_UNICODE);
+            $memberUpdateData['member_extend_json'] = json_encode($memberExtendJson, JSON_UNESCAPED_UNICODE);
         }
         }
         Member::where('member_id', $params['member_id'])->update($memberUpdateData);
         Member::where('member_id', $params['member_id'])->update($memberUpdateData);
         // 康养城VIP账户
         // 康养城VIP账户
@@ -68,7 +68,7 @@ class KangyangCityEvent
                     if (!empty($couponModel->coupon_validdate_end)) {
                     if (!empty($couponModel->coupon_validdate_end)) {
                         $endDate = $couponModel->coupon_validdate_end;
                         $endDate = $couponModel->coupon_validdate_end;
                     } elseif ($couponModel->coupon_validdate_day > 0) {
                     } elseif ($couponModel->coupon_validdate_day > 0) {
-                        $endDate = date('Y-m-d H:i:s', time() + ($couponModel->coupon_validdate_day * 24 * 3600));
+                        $endDate = date('Y-m-d H:i:s', time() + ($couponModel->coupon_validdate_day * 24 * 3600) - 1);
                     }
                     }
 
 
                     $num = $coupon['num'];
                     $num = $coupon['num'];

+ 1 - 0
route/admin.php

@@ -880,6 +880,7 @@ Route::group('/admin', function () {
             Route::get('/list', [\app\admin\controller\coupon\CouponDetailController::class, 'select']);
             Route::get('/list', [\app\admin\controller\coupon\CouponDetailController::class, 'select']);
             Route::get('/info', [\app\admin\controller\coupon\CouponDetailController::class, 'info']);
             Route::get('/info', [\app\admin\controller\coupon\CouponDetailController::class, 'info']);
             Route::post('/updateStatus', [\app\admin\controller\coupon\CouponDetailController::class, 'updateStatus']);
             Route::post('/updateStatus', [\app\admin\controller\coupon\CouponDetailController::class, 'updateStatus']);
+            Route::get('/myCouponGrouping',[\app\admin\controller\coupon\CouponDetailController::class,'myCouponGrouping']);
         })->middleware([
         })->middleware([
             \app\middleware\AdminAuthCheck::class
             \app\middleware\AdminAuthCheck::class
         ]);
         ]);