UserController.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace admin\controllers;
  3. use biz\user\services\UserOldDataService;
  4. use biz\user\services\UserService;
  5. use common\models\xhAdmin;
  6. use common\models\xhStudent;
  7. use Yii;
  8. use common\models\xhUserAlipay;
  9. use common\models\xhUserTag;
  10. use common\models\xhTrainCourse;
  11. use common\models\xhUser;
  12. use common\models\xhUserAsset;
  13. use common\models\xhTrainUserCourse;
  14. use common\services\xhUserAlipayService;
  15. use common\services\xhUserIntegralService;
  16. use common\services\xhTrainClassService;
  17. use common\services\xhOrderService;
  18. use common\services\xhPayToolService;
  19. use common\services\xhRechargeService;
  20. use common\services\xhMerchantExtendService;
  21. use common\services\xhMerchantAssetService;
  22. use common\services\xhUserAssetService;
  23. use common\services\xhCouponService;
  24. use common\services\xhUserTagService;
  25. use common\services\xhUserTagClassService;
  26. use common\services\xhAdminService;
  27. use common\services\xhMerchantService;
  28. use common\components\stringUtil;
  29. use common\components\weixinUtil;
  30. use common\components\configDict;
  31. use common\components\util;
  32. use common\components\page;
  33. use common\services\xhUserService;
  34. use common\services\xhUserByDayService;
  35. use common\services\xhUserUniteService;
  36. use common\services\xhMerchantCapitalService;
  37. use common\services\xhTMessageService;
  38. class UserController extends BaseController
  39. {
  40. public function actionGetList()
  41. {
  42. $get = Yii::$app->request->get();
  43. //组建where
  44. $type = isset($get['type']) ? $get['type'] : 0;
  45. $search = isset($get['search']) ? $get['search'] : '';
  46. $where = ['merchantId' => $this->merchantId];
  47. switch ($type) {
  48. case 1:
  49. //粉丝
  50. $where['subscribe'] = 1;
  51. break;
  52. case 2:
  53. //会员
  54. $where['isMember'] = 1;
  55. break;
  56. default:
  57. }
  58. if (!empty($search)) {
  59. if (stringUtil::isMobieNumber($search)) {
  60. $where['mobile'] = $search;
  61. } else {
  62. $where['userName'] = ['like', $search];
  63. }
  64. }
  65. $list = UserService::getUserList($where);
  66. util::success($list);
  67. }
  68. }