Browse Source
Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix
master
Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix
master
18 changed files with 296 additions and 35 deletions
-
17app/Controller/v3/BalanceStatementController.php
-
38app/Controller/v3/CategoryController.php
-
7app/Controller/v3/CollectStoreController.php
-
85app/Controller/v3/CouponController.php
-
2app/Controller/v3/OrderListController.php
-
9app/Controller/v3/ShopCartController.php
-
2app/Controller/v3/UserAddressController.php
-
18app/Model/v3/Coupon.php
-
9app/Model/v3/CouponRec.php
-
83app/Service/v3/Implementations/CouponRecService.php
-
29app/Service/v3/Implementations/OrderListService.php
-
10app/Service/v3/Implementations/RevenueListService.php
-
11app/Service/v3/Implementations/WithdrawalListService.php
-
3app/Service/v3/Interfaces/CouponRecServiceInterface.php
-
2app/Service/v3/Interfaces/OrderListServiceInterface.php
-
2app/Service/v3/Interfaces/RevenueListServiceInterface.php
-
2app/Service/v3/Interfaces/WithdrawalListServiceInterface.php
-
2config/routes.php
@ -0,0 +1,85 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
/** |
|||
* This file is part of Hyperf. |
|||
* |
|||
* @link https://www.hyperf.io |
|||
* @document https://doc.hyperf.io |
|||
* @contact group@hyperf.io |
|||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE |
|||
*/ |
|||
|
|||
namespace App\Controller\v3; |
|||
|
|||
use Hyperf\Di\Annotation\Inject; |
|||
use App\Controller\BaseController; |
|||
use App\Service\v3\Interfaces\CouponRecServiceInterface; |
|||
|
|||
class CouponController extends BaseController |
|||
{ |
|||
/** |
|||
* @Inject |
|||
* @var CouponRecServiceInterface |
|||
*/ |
|||
protected $couponRecService; |
|||
|
|||
/** |
|||
* 获取用户可领取优惠卷接口 |
|||
*/ |
|||
public function getSystemCouponUserList() |
|||
{ |
|||
|
|||
} |
|||
|
|||
//统计用户
|
|||
public function userCouponAccount() |
|||
{ |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 用户领取优惠卷 |
|||
*/ |
|||
public function userReceiveCoupon() |
|||
{ |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 获取用户已经领取的优惠卷列表 |
|||
*/ |
|||
public function getUserReceiveCouponList() |
|||
{ |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 获取用户当前订单可用的优惠券列表 |
|||
* 按分类(1订单 等优惠)分组返回 |
|||
*/ |
|||
public function getListByUser() |
|||
{ |
|||
$userId = $this->request->input('user_id'); |
|||
$page = $this->request->input('page'); |
|||
$pagesize = $this->request->input('pagesize'); |
|||
$type = $this->request->input('type','1'); |
|||
/** |
|||
* $type unused 未使用 used 已使用 expired已失效 |
|||
*/ |
|||
switch ($type){ |
|||
case 'unused': |
|||
$res = $this->couponRecService->getUnusedListByUser($userId,$page,$pagesize); |
|||
break; |
|||
case 'used': |
|||
$res = $this->couponRecService->getUsedListByUser($userId,$page,$pagesize); |
|||
break; |
|||
case 'expired': |
|||
$res = $this->couponRecService->getExpiredListByUser($userId,$page,$pagesize); |
|||
break; |
|||
} |
|||
|
|||
return $this->success($res); |
|||
} |
|||
|
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue