TeamForm.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\alliance\models;
  8. use app\models\Goods;
  9. use app\models\Option;
  10. use app\models\Order;
  11. use app\models\OrderDetail;
  12. use app\models\OrderRefund;
  13. use app\models\OrderShare;
  14. use app\models\SaasUser;
  15. use app\models\UserShareMoney;
  16. use yii\base\Model;
  17. use yii\data\Pagination;
  18. use yii\helpers\Json;
  19. use app\models\User;
  20. use app\models\Share;
  21. class TeamForm extends Model
  22. {
  23. public $user_id;
  24. public $saas_id;
  25. public $store_id;
  26. public $level;
  27. public $share_setting;
  28. public $status;
  29. public $page;
  30. public $limit;
  31. public function rules()
  32. {
  33. return [
  34. [['status', 'page', 'limit', 'status','level'], 'integer'],
  35. [['page',], 'default', 'value' => 1],
  36. [['limit',], 'default', 'value' => 10],
  37. [['status'], 'in', 'range' => [1, 2, 3], 'on' => 'TEAM'],
  38. [['status'], 'in', 'range' => [-1, 0, 1, 2], 'on' => 'ORDER'],
  39. [['store_id'],'integer']
  40. ];
  41. }
  42. /**
  43. * 团队信息
  44. * @return array|mixed
  45. */
  46. public function getList()
  47. {
  48. if (!$this->validate()) {
  49. return [
  50. 'code' => 1,
  51. 'msg' => $this->getErrorSummary(false)[0],
  52. ];
  53. }
  54. $exit = Share::find()->andWhere(['user_id' => $this->user_id, 'is_delete' => 0])->exists();
  55. $user = User::findOne(['id' => $this->user_id]);
  56. // $setting = Setting::findOne(['store_id' => $this->store_id]);
  57. $setting = Option::get('share_basic_setting', $this->store_id);
  58. $setting = $setting ? Json::decode($setting['value']) : [];
  59. if ($setting['level']['value'] == 0) {
  60. return [
  61. 'code' => 1,
  62. 'msg' => '网络异常',
  63. 'data' => []
  64. ];
  65. }
  66. if (!$exit || $user->is_distributor != 1) {
  67. return [
  68. 'code' => 1,
  69. 'msg' => '网络异常',
  70. 'data' => []
  71. ];
  72. }
  73. $team = self::team($this->store_id, $this->user_id);
  74. $user_list = $team[1];
  75. $data = $team[0];
  76. if ($setting['level']['value'] > 0 && $this->status == 1) {
  77. $data['list'] = $user_list['f_c'];
  78. }
  79. if ($this->status == 2 && $setting['level']['value'] > 1) {
  80. $data['list'] = $user_list['s_c'];
  81. }
  82. if ($this->status == 3 && $setting['level']['value'] > 2) {
  83. $data['list'] = $user_list['t_c'];
  84. }
  85. foreach ($data['list'] as $index => $value) {
  86. $data['list'][$index]['time'] = date('Y-m-d', $value['created_at']);
  87. $child_count = User::find()->where(['parent_id' => $value['id'], 'is_delete' => 0])->count();
  88. $data['list'][$index]['child_count'] = $child_count ? $child_count : 0;
  89. }
  90. return [
  91. 'code' => 0,
  92. 'msg' => '',
  93. 'data' => $data
  94. ];
  95. }
  96. /**
  97. * 获取团队信息
  98. * @param $store_id
  99. * @param $user_id
  100. * @return array
  101. */
  102. public static function team($store_id, $user_id)
  103. {
  104. // $share_setting = Setting::findOne(['store_id' => $store_id]);
  105. $share_setting = Option::get('share_basic_setting', $store_id);
  106. $share_setting = $share_setting ? Json::decode($share_setting['value']) : [];
  107. $list = User::find()->alias('u')
  108. ->where(['and', ['u.is_delete' => 0, 'u.store_id' => $store_id], ['>', 'u.parent_id', 0]])
  109. ->leftJoin(Order::tableName() . ' o', "o.is_price=1 and o.user_id=u.id and o.parent_id = u.parent_id")
  110. ->andWhere([
  111. 'or',
  112. ['o.is_delete' => 0, ['<>', 'o.trade_status', Order::ORDER_FLOW_CANCEL]],
  113. 'isnull(o.id)'
  114. ])
  115. ->select([
  116. "sum(case when isnull(o.id) then 0 else o.pay_price end) price",
  117. 'count(o.id) count',
  118. 'u.nickname', 'u.created_at', 'u.parent_id', 'u.id', 'u.avatar_url'
  119. ])
  120. ->groupBy('u.id')
  121. ->asArray()->all();
  122. $user_list = array();
  123. $data = [];
  124. $data['first'] = 0;
  125. $data['second'] = 0;
  126. $data['third'] = 0;
  127. $data['list'] = [];
  128. $user_list['f_c'] = [];
  129. $user_list['s_c'] = [];
  130. $user_list['t_c'] = [];
  131. //获取用户下线的数量及订单情况
  132. foreach ($list as $index => $value) {
  133. if ($value['parent_id'] == $user_id) {
  134. $data['first']++;
  135. $user_list['f_c'][] = $value;
  136. if ($share_setting['level']['value'] > 1) {
  137. foreach ($list as $i => $v) {
  138. if ($v['parent_id'] == $value['id']) {
  139. $data['second']++;
  140. $user_list['s_c'][] = $v;
  141. if ($share_setting['level']['value'] > 2) {
  142. foreach ($list as $j => $item) {
  143. if ($item['parent_id'] == $v['id']) {
  144. $data['third']++;
  145. $user_list['t_c'][] = $item;
  146. }
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. return [$data, $user_list];
  155. }
  156. /**
  157. * 获取分销团队总人数
  158. * @return array
  159. */
  160. public function getTeamCount()
  161. {
  162. $team = [
  163. 'f_c' => [],
  164. 's_c' => [],
  165. 't_c' => []
  166. ];
  167. $first = SaasUser::find()->select(['id'])->where(['parent_id' => $this->saas_id, 'is_delete' => 0])->column();
  168. $first_count = count($first);
  169. $count = $first_count;
  170. $team['f_c']['list'] = $first;
  171. $team['f_c']['count'] = $count;
  172. if($first_count > 0){
  173. $second = SaasUser::find()->select(['id'])->where(['parent_id' => $first, 'is_delete' => 0])->column();
  174. $second_count = count($second);
  175. $count += $second_count;
  176. $team['s_c']['list'] = $second;
  177. $team['s_c']['count'] = $second_count;
  178. if($second_count > 0){
  179. $third = SaasUser::find()->select(['id'])->where(['parent_id' => $second, 'is_delete' => 0])->column();
  180. $third_count = count($third);
  181. $count += $third_count;
  182. $team['t_c']['list'] = $third;
  183. $team['t_c']['count'] = $third_count;
  184. }else{
  185. $team['t_c']['list'] = [];
  186. $team['t_c']['count'] = 0;
  187. }
  188. }else{
  189. $team['s_c']['list'] = [];
  190. $team['s_c']['count'] = 0;
  191. $team['t_c']['list'] = [];
  192. $team['t_c']['count'] = 0;
  193. }
  194. return [
  195. 'team_count' => $count,
  196. 'team' => $team
  197. ];
  198. }
  199. /**
  200. * 获取订单数量
  201. * @return array
  202. * @throws \yii\db\Exception
  203. */
  204. public function getOrderCount()
  205. {
  206. $arr = $this->getTeamCount();
  207. $team_arr = $arr['team'];
  208. $sql = $this->getSql();
  209. $order_count = 0;
  210. $andWhere_1 = " WHERE al.user_id != {$this->user_id} AND al.parent_id_1 = {$this->user_id}";
  211. $order_money = 0;
  212. $order_money_un = 0;
  213. $select_1 = "SELECT al.first_price,al.is_price, al.id";
  214. $first_price = \Yii::$app->db->createCommand($select_1 . $sql . $andWhere_1)->queryAll();
  215. if ($first_price) {
  216. foreach ($first_price as $index => $value) {
  217. $order_count++;
  218. $order_money += doubleval($value['first_price']);
  219. if ($value['is_price'] == 0) {
  220. $order_money_un += doubleval($value['first_price']);
  221. }
  222. }
  223. }
  224. $team_f = '(' . implode(',', $team_arr['f_c']) . ')';
  225. $team_s = '(' . implode(',', $team_arr['s_c']) . ')';
  226. $team_t = '(' . implode(',', $team_arr['t_c']) . ')';
  227. if (!empty($team_arr['s_c'])) {
  228. $select_2 = "SELECT al.second_price,al.is_price, al.id";
  229. $andWhere_2 = " WHERE al.user_id != {$this->user_id} AND
  230. ((al.user_id IN {$team_s} AND al.parent_id_1 IN {$team_f} AND al.parent_id_2 = 0)
  231. OR (al.parent_id_2 = {$this->user_id}))";
  232. $second_price = \Yii::$app->db->createCommand($select_2 . $sql . $andWhere_2)->queryAll();
  233. if ($second_price) {
  234. foreach ($second_price as $index => $value) {
  235. $order_count++;
  236. $order_money += doubleval($value['second_price']);
  237. if ($value['is_price'] == 0) {
  238. $order_money_un += doubleval($value['second_price']);
  239. }
  240. }
  241. }
  242. }
  243. if (!empty($team_arr['t_c'])) {
  244. $select_3 = "SELECT al.third_price,al.is_price, al.id";
  245. $andWhere_3 = " WHERE al.user_id != {$this->user_id} AND
  246. ((al.user_id IN {$team_t} AND al.parent_id_1 IN {$team_s} AND al.parent_id_2 = 0)
  247. OR (al.parent_id_3 = {$this->user_id}))";
  248. $third_price = \Yii::$app->db->createCommand($select_3 . $sql . $andWhere_3)->queryAll();
  249. if ($third_price) {
  250. foreach ($third_price as $index => $value) {
  251. $order_count++;
  252. $order_money += doubleval($value['third_price']);
  253. if ($value['is_price'] == 0) {
  254. $order_money_un += doubleval($value['third_price']);
  255. }
  256. }
  257. }
  258. }
  259. $select = "SELECT al.rebate,al.is_price,al.id {$sql} WHERE al.rebate > 0 AND al.user_id = {$this->user_id}";
  260. $rebate = \Yii::$app->db->createCommand($select)->queryAll();
  261. if ($rebate) {
  262. foreach ($rebate as $index => $value) {
  263. $order_count++;
  264. $order_money += doubleval($value['rebate']);
  265. if ($value['is_price'] == 0) {
  266. $order_money_un += doubleval($value['rebate']);
  267. }
  268. }
  269. }
  270. // 因为存在佣金,积分,余额多种发放模式,目前分销中心展示订单数量
  271. $arr['order_count'] = $order_count;
  272. $arr['share_order_count'] = UserShareMoney::find()->where(['store_id' => get_store_id(), 'user_id' => $this->user_id,
  273. 'source' => 5, 'type' => 0])->count();
  274. $arr['order_money'] = doubleval(sprintf('%.2f', $order_money));
  275. $arr['order_money_un'] = doubleval(sprintf('%.2f', $order_money_un));
  276. return $arr;
  277. }
  278. /**
  279. * 获取分销订单详情
  280. * @return array
  281. * @throws \yii\db\Exception
  282. */
  283. public function getOrder()
  284. {
  285. if (!$this->validate()) {
  286. return [
  287. 'code' => 1,
  288. 'msg' => $this->getErrorSummary(false)[0],
  289. ];
  290. }
  291. $arr = $this->getTeamCount();
  292. $team_arr = $arr['team'];
  293. $share_setting = Option::get('share_basic_setting', $this->store_id);
  294. $share_setting = $share_setting ? Json::decode($share_setting['value']) : [];
  295. $first = '(' . implode(',', $team_arr['f_c']) . ')';
  296. $second = '(' . implode(',', $team_arr['s_c']) . ')';
  297. $third = '(' . implode(',', $team_arr['t_c']) . ')';
  298. $all = '(' . implode(',', array_merge($team_arr['f_c'], $team_arr['s_c'], $team_arr['t_c'])) . ')';
  299. $user_table = User::tableName();
  300. $saas_user_table = SaasUser::tableName();
  301. $sql = $this->getSql();
  302. $select = "SELECT al.*,su.name as nickname,su.avatar as avatar_url ";
  303. $where = " WHERE ((al.user_id = {$this->user_id} AND al.rebate > 0)";
  304. if ($share_setting['level']['value'] != 4) {
  305. $where .= "OR (al.user_id != {$this->user_id} ";
  306. if ($share_setting['level']['value'] >= 1) {
  307. $where .= " AND (al.parent_id_1 = {$this->user_id}";
  308. }
  309. if ($share_setting['level']['value'] >= 2) {
  310. $where .= " OR al.parent_id_2 = {$this->user_id} ";
  311. }
  312. if ($share_setting['level']['value'] == 3) {
  313. $where .= " OR al.parent_id_3 = {$this->user_id} ";
  314. }
  315. if (!empty($team_arr['f_c']) && !empty($team_arr['s_c'])) {
  316. $where .= " OR (al.parent_id_2 = 0 AND al.user_id IN {$second} AND al.parent_id_1 IN {$first}) ";
  317. }
  318. if (!empty($team_arr['s_c']) && !empty($team_arr['t_c'])) {
  319. $where .= " OR (al.parent_id_2 = 0 AND al.user_id IN {$third} AND al.parent_id_2 IN {$second})";
  320. }
  321. $where .= "))";
  322. }
  323. $where .= ")";
  324. $sql = $sql . " LEFT JOIN {$user_table} AS u ON u.id=al.user_id LEFT JOIN {$saas_user_table} AS su ON su.mobile=u.binding {$where}";
  325. if ($this->status == 0) {
  326. $sql = $sql . " AND al.is_pay = 0 ";
  327. } elseif ($this->status == 1) {
  328. $sql = $sql . " AND al.is_pay = 1 AND al.is_price = 0 ";
  329. } elseif ($this->status == 2) {
  330. $sql = $sql . " AND al.is_price = 1 ";
  331. }
  332. $sql = $sql . " GROUP BY al.id ,al.order_type ";
  333. $count = \Yii::$app->db->createCommand("select count(*)".$sql)->execute();
  334. $pagination = new Pagination(['totalCount' => $count, 'page' => $this->page - 1, 'pageSize' => $this->limit]);
  335. $list = \Yii::$app->db->createCommand($select . $sql . "ORDER BY al.created_at DESC LIMIT {$pagination->limit} OFFSET {$pagination->offset}")->queryAll();
  336. $new_list = [];
  337. $setting = Option::get('share_money_setting', $this->store_id);
  338. $setting = $setting ? Json::decode($setting['value']) : [];
  339. foreach ($list as $index => $value) {
  340. $new_list[$index]['share_send_type'] = $value['share_send_type'];
  341. $new_list[$index]['order_type'] = $value['order_type'];
  342. $new_list[$index]['order_no'] = $value['order_no'];
  343. $new_list[$index]['nickname'] = $value['nickname'];
  344. $new_list[$index]['avatar_url'] = $value['avatar_url'];
  345. $new_list[$index]['is_price'] = $value['is_price'];
  346. $new_list[$index]['status'] = "待付款";
  347. if ($value['is_pay'] == 0) {
  348. $new_list[$index]['status'] = "待付款";
  349. } elseif ($value['is_pay'] == 1 && $value['is_price'] == 0) {
  350. $new_list[$index]['status'] = "已付款";
  351. } elseif ($value['is_price'] == 1) {
  352. $new_list[$index]['status'] = "已完成";
  353. }
  354. if ($value['parent_id_2'] == 0) {
  355. if ($this->user_id == $value['parent_id_1']) {
  356. $new_list[$index]['share_status'] = $setting['level_one']['text'] ? $setting['level_one']['text'] : "一级";
  357. $new_list[$index]['share_money'] = $value['first_price'];
  358. } elseif (in_array($value['user_id'], $team_arr['s_c']) && in_array($value['parent_id_1'], $team_arr['f_c'])) {
  359. $new_list[$index]['share_status'] = $setting['level_two']['text'] ? $setting['level_two']['text'] : "二级";
  360. $new_list[$index]['share_money'] = $value['second_price'];
  361. } elseif (in_array($value['user_id'], $team_arr['t_c']) && in_array($value['parent_id_1'], $team_arr['s_c'])) {
  362. $new_list[$index]['share_status'] = $setting['level_three']['text'] ? $setting['level_three']['text'] : "三级";
  363. $new_list[$index]['share_money'] = $value['third_price'];
  364. }
  365. } else {
  366. if ($value['parent_id_1'] == $this->user_id) {
  367. $new_list[$index]['share_status'] = $setting['level_one']['text'] ? $setting['level_one']['text'] : "一级";
  368. $new_list[$index]['share_money'] = $value['first_price'];
  369. } elseif ($value['parent_id_2'] == $this->user_id) {
  370. $new_list[$index]['share_status'] = $setting['level_two']['text'] ? $setting['level_two']['text'] : "二级";
  371. $new_list[$index]['share_money'] = $value['second_price'];
  372. } elseif ($value['parent_id_3'] == $this->user_id) {
  373. $new_list[$index]['share_status'] = $setting['level_three']['text'] ? $setting['level_three']['text'] : "三级";
  374. $new_list[$index]['share_money'] = $value['third_price'];
  375. }
  376. }
  377. if ($value['rebate'] > 0 && $value['user_id'] == $this->user_id) {
  378. $new_list[$index]['share_status'] = "自购返现";
  379. $new_list[$index]['share_money'] = $value['rebate'];
  380. }
  381. // 订单商品详情
  382. $new_list[$index]['orderDetail'] = $this->getOrderDetail($value['id']);
  383. $refund = OrderRefund::findOne(['order_id' => $value['id'], 'is_delete' => 0,
  384. 'store_id' => $this->store_id, 'type' => 1]);
  385. if ($refund) {
  386. if ($refund['status'] == 1) {
  387. $new_list[$index]['status'] = "已退款";
  388. } elseif ($refund['status'] == 0) {
  389. $new_list[$index]['status'] = '售后申请中';
  390. }
  391. }
  392. }
  393. return [
  394. 'code' => 0,
  395. 'msg' => 'success',
  396. 'data' => [
  397. 'row_count' => $count,
  398. 'page_count' => $pagination->pageCount,
  399. 'list' => $new_list,
  400. ]
  401. ];
  402. }
  403. // 订单详情--商城
  404. public function getOrderDetail($id)
  405. {
  406. $list = OrderDetail::find()->alias('od')->where(['od.order_id' => $id])
  407. ->leftJoin(['g' => Goods::tableName()], 'g.id=od.goods_id')
  408. ->select(['od.id', 'od.num', 'od.pic goods_pic','od.total_price', 'od.attr', 'g.name', 'g.cover_pic'])
  409. ->asArray()->all();
  410. foreach ($list as $index => $value) {
  411. if (!$value['goods_pic']) {
  412. $list[$index]['goods_pic'] = $value['cover_pic'];
  413. }
  414. }
  415. return $list;
  416. }
  417. //获取团队详情
  418. public function getTeam()
  419. {
  420. if (!$this->validate()) {
  421. return [
  422. 'code' => 1,
  423. 'msg' => $this->getErrorSummary(false)[0],
  424. ];
  425. }
  426. $arr = $this->getTeamCount();
  427. if($arr['team_count'] <= 0){
  428. return [
  429. 'code' => 0,
  430. 'msg' => '',
  431. 'data' => [
  432. 'list'=>[],
  433. 'page'=>$this->page,
  434. 'totalPage'=>0
  435. ]
  436. ];
  437. }
  438. $list = [];
  439. $page_limit = 10;
  440. if($this->level == 1){
  441. if($arr['team']['f_c']['count'] > 0){
  442. //获取开始位置
  443. $start = $this->getStart($arr['team']['f_c']['count'],$page_limit);
  444. $list = $this->getLevelSalesInfo(array_slice($arr['team']['f_c']['list'],$start,$page_limit));
  445. $totalPage = ceil($arr['team']['f_c']['count']/$page_limit);
  446. }
  447. }
  448. if($this->level == 2){
  449. if(isset($arr['team']['s_c']['count']) && $arr['team']['s_c']['count'] > 0){
  450. //获取开始位置
  451. $start = $this->getStart($arr['team']['s_c']['count'],$page_limit);
  452. $list = $this->getLevelSalesInfo(array_slice($arr['team']['s_c']['list'],$start,$page_limit));
  453. $totalPage = ceil($arr['team']['s_c']['count']/$page_limit);
  454. }
  455. }
  456. if($this->level == 3){
  457. if(isset($arr['team']['t_c']['count']) && $arr['team']['t_c']['count'] > 0){
  458. //获取开始位置
  459. $start = $this->getStart($arr['team']['t_c']['count'],$page_limit);
  460. $list = $this->getLevelSalesInfo(array_slice($arr['team']['t_c']['list'],$start,$page_limit));
  461. $totalPage = ceil($arr['team']['t_c']['count']/$page_limit);
  462. }
  463. }
  464. return [
  465. 'code' => 0,
  466. 'msg' => '获取成功',
  467. 'data' => [
  468. 'list'=>$list,
  469. 'page'=>$this->page,
  470. 'totalPage'=>$totalPage
  471. ]
  472. ];
  473. }
  474. //获取位置信息
  475. private function getStart($total,$page_limit){
  476. $max_num = ceil($total/$page_limit);
  477. if($this->page >= $max_num) $this->page = $max_num;
  478. $start = ($this->page - 1) * $page_limit;
  479. return $start;
  480. }
  481. private function getLevelSalesInfo($level_ids){
  482. $orderInfo = Order::find()->where(['saas_id' => $level_ids, 'is_delete' => 0])->select('id,saas_id,total_price')->asArray()->all();
  483. $saas_user_Info = SaasUser::find()->where(['id' => $level_ids, 'is_delete'=>0])->select('id,avatar,created_at,name')->asArray()->all();
  484. $scan_order = \app\plugins\scanCodePay\models\Order::find()->where(['saas_id' => $level_ids, 'is_delete' => 0])
  485. ->select('id,saas_id,total_price')->asArray()->all();
  486. $orderInfo = array_values(array_merge($orderInfo, $scan_order));
  487. $pay_info = [];
  488. foreach($orderInfo as $key=>$val){
  489. if(isset($pay_info[$val['saas_id']]['num']) && $pay_info[$val['saas_id']]['num'] > 0){
  490. $pay_info[$val['saas_id']]['num'] += 1;
  491. $pay_info[$val['saas_id']]['price'] += number_format($val['total_price'], 2);
  492. }else{
  493. $pay_info[$val['saas_id']]['num'] = 1;
  494. $pay_info[$val['saas_id']]['price'] = number_format($val['total_price'], 2);
  495. }
  496. }
  497. foreach($saas_user_Info as $key=>$val){
  498. $saas_user_Info[$key]['child_count'] = SaasUser::find()->select(['id'])->where(['parent_id' => $val['id'], 'is_delete' => 0])->count();
  499. $saas_user_Info[$key]['order_num'] = (isset($pay_info[$val['id']]['num']) && $pay_info[$val['id']]['num'] > 0 ) ? $pay_info[$val['id']]['num']:0;
  500. $saas_user_Info[$key]['total_price'] = (isset($pay_info[$val['id']]['price']) && $pay_info[$val['id']]['price'] > 0 ) ? number_format($pay_info[$val['id']]['price'],2):0;
  501. }
  502. return $saas_user_Info;
  503. }
  504. }