Compare commits
No commits in common. "f7ae9e2faf086f4d08d99225b0c9e302ffcc624b" and "924a0fa2f907581dda9af019663afbbfd49f47ec" have entirely different histories.
f7ae9e2faf
...
924a0fa2f9
|
@ -18,7 +18,6 @@ use app\common\{enum\notice\NoticeEnum,
|
||||||
enum\user\UserTerminalEnum,
|
enum\user\UserTerminalEnum,
|
||||||
enum\YesNoEnum,
|
enum\YesNoEnum,
|
||||||
logic\BaseLogic,
|
logic\BaseLogic,
|
||||||
logic\ShopRequestLogic,
|
|
||||||
model\Company,
|
model\Company,
|
||||||
model\user\User,
|
model\user\User,
|
||||||
model\user\UserAuth,
|
model\user\UserAuth,
|
||||||
|
@ -83,6 +82,7 @@ class UserLogic extends BaseLogic
|
||||||
$userRole = UserRole::where(['id' => $data['group_id']])->find();
|
$userRole = UserRole::where(['id' => $data['group_id']])->find();
|
||||||
return $userRole ? $userRole['name'] : '普通用户';
|
return $userRole ? $userRole['name'] : '普通用户';
|
||||||
})
|
})
|
||||||
|
->field('id,sn,sex,is_new_user,account,nickname,real_name,avatar,mobile,create_time,user_money,deposit,income,admin_id,company_id,is_captain,province,province province_name,city,city city_name,area,area area_name,street,street street_name,village,village village_name,brigade,brigade brigade_name, group_id, deposit, deposit_date, user_information_count')
|
||||||
->findOrEmpty();
|
->findOrEmpty();
|
||||||
// $user['avatar'] = $user['avatar'] ? Request()->host() . $user['avatar'] : $user['avatar'];
|
// $user['avatar'] = $user['avatar'] ? Request()->host() . $user['avatar'] : $user['avatar'];
|
||||||
$user['day_money_count']=UserAccountLog::where(['user_id'=>$userId,'action'=>1])->whereDay('create_time')->sum('change_amount');
|
$user['day_money_count']=UserAccountLog::where(['user_id'=>$userId,'action'=>1])->whereDay('create_time')->sum('change_amount');
|
||||||
|
@ -95,10 +95,6 @@ class UserLogic extends BaseLogic
|
||||||
$name=DictData::where('id',$data['company']['company_type'])->value('name');
|
$name=DictData::where('id',$data['company']['company_type'])->value('name');
|
||||||
$data['company']['company_type_name']=$name;
|
$data['company']['company_type_name']=$name;
|
||||||
}
|
}
|
||||||
$inviteUserStatistics = ShopRequestLogic::getInviteUserInfo(['promotion_code' => $data['invite_code']]);
|
|
||||||
$data['register_num'] = $inviteUserStatistics['data']['user_count'];
|
|
||||||
$data['merchant_num'] = $inviteUserStatistics['data']['merchant_count'];
|
|
||||||
$data['trade_amount'] = $inviteUserStatistics['data']['trade_amount'];
|
|
||||||
return $data ;
|
return $data ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,17 +231,4 @@ class ShopRequestLogic extends BaseLogic
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getInviteUserInfo($param)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/invite_user_statistics', [
|
|
||||||
'query' => $param
|
|
||||||
]);
|
|
||||||
return json_decode($requestResponse->getContent(), true);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
self::setError($e->getMessage());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue