feat(user): 增加用户标签查询功能
This commit is contained in:
parent
6b59bb043d
commit
9f3a36201d
@ -20,6 +20,7 @@ use app\common\{logic\BaseLogic,
|
|||||||
model\vip_flow\VipFlow,
|
model\vip_flow\VipFlow,
|
||||||
service\SmsService,
|
service\SmsService,
|
||||||
service\wechat\WeChatMnpService};
|
service\wechat\WeChatMnpService};
|
||||||
|
use app\common\model\user_label\UserLabel;
|
||||||
use support\Cache;
|
use support\Cache;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ class UserLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
$data = User::with(['userShip'])->where('id',$uid)
|
$data = User::with(['userShip'])->where('id',$uid)
|
||||||
->field('id,avatar,real_name,nickname,account,mobile,sex,login_ip,now_money,total_recharge_amount,user_ship
|
->field('id,avatar,real_name,nickname,account,mobile,sex,login_ip,now_money,total_recharge_amount,user_ship
|
||||||
,purchase_funds,integral,pay_password')
|
,purchase_funds,integral,pay_password,label_id')
|
||||||
->find();
|
->find();
|
||||||
//判断是不是员工
|
//判断是不是员工
|
||||||
if($data){
|
if($data){
|
||||||
@ -105,6 +106,7 @@ class UserLogic extends BaseLogic
|
|||||||
$data['store_id'] = $check['store_id'];
|
$data['store_id'] = $check['store_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$data['label_name']=UserLabel::where('label_id',$data['label_id'])->value('label_name');
|
||||||
$data['return_money'] = Db::name('vip_flow')->
|
$data['return_money'] = Db::name('vip_flow')->
|
||||||
where(['user_id'=>$uid,'status'=>0])
|
where(['user_id'=>$uid,'status'=>0])
|
||||||
->sum('number');
|
->sum('number');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user