|
|
@@ -2,19 +2,30 @@
|
|
|
|
|
|
namespace client\controllers;
|
|
|
|
|
|
+use biz\invite\services\InviteAssetService;
|
|
|
use biz\invite\services\InviteService;
|
|
|
+use biz\invite\services\InviteStatService;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
|
|
|
class InviteController extends BaseController
|
|
|
{
|
|
|
|
|
|
- //邀请有礼列表
|
|
|
+ //邀请有礼列表 shish 2019.12.18
|
|
|
public function actionList()
|
|
|
{
|
|
|
- //奖励从 xhInviteAsset 取
|
|
|
- //已邀请 和 已下单 从 xhInviteStat取
|
|
|
- //邀请记录和分页,参考 business/controller/UserController/list方法
|
|
|
+ $where = [];
|
|
|
+ $where['introUserId'] = $this->userId;
|
|
|
+ $list = InviteService::getInviteList($where);
|
|
|
+ util::success($list);
|
|
|
+ }
|
|
|
+
|
|
|
+ //概况 shish 2019.12.18
|
|
|
+ public function actionProfile()
|
|
|
+ {
|
|
|
+ $stat = InviteStatService::getStat($this->userId);
|
|
|
+ $asset = InviteAssetService::getAsset($this->merchantId);
|
|
|
+ util::success(['stat' => $stat, 'asset' => $asset]);
|
|
|
}
|
|
|
|
|
|
//取新人奖励 shish 2019.12.14
|