| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace saas\controllers;
- use biz\merchant\services\MerchantAssetService;
- use biz\retail\services\RetailAssetService;
- use biz\user\services\UserService;
- use common\components\util;
- use Yii;
- class UserController extends BaseController
- {
-
- public function actionList()
- {
- $get = Yii::$app->request->get();
- $type = isset($get['type']) ? $get['type'] : -1;
- $where = [];
- switch ($type) {
- case 1:
- //粉丝
- $where['subscribe'] = 1;
- break;
- case 2:
- //会员
- $where['isMember'] = 1;
- break;
- default:
- }
- $list = UserService::getUserList($where);
- $asset = RetailAssetService::getAsset();
- $list['asset'] = $asset;
- util::success($list);
- }
-
- //客户列表 shish 2019.11.30
- public function actionOaList()
- {
- $get = Yii::$app->request->get();
- $type = isset($get['type']) ? $get['type'] : -1;
- $merchantId = 12358;
- $where = ['merchantId' => $merchantId];
- switch ($type) {
- case 1:
- //粉丝
- $where['subscribe'] = 1;
- break;
- case 2:
- //会员
- $where['isMember'] = 1;
- break;
- default:
- }
- $list = UserService::getUserList($where);
- $merchantAsset = MerchantAssetService::getByMerchantId($merchantId);
- $list['asset'] = $merchantAsset;
- util::success($list);
- }
-
- }
|