feat(user): 增加用户标签查询功能

This commit is contained in:
mkm 2024-06-28 16:10:50 +08:00
parent 6b59bb043d
commit 9f3a36201d

View File

@ -20,6 +20,7 @@ use app\common\{logic\BaseLogic,
model\vip_flow\VipFlow,
service\SmsService,
service\wechat\WeChatMnpService};
use app\common\model\user_label\UserLabel;
use support\Cache;
use think\facade\Db;
@ -83,7 +84,7 @@ class UserLogic extends BaseLogic
{
$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
,purchase_funds,integral,pay_password')
,purchase_funds,integral,pay_password,label_id')
->find();
//判断是不是员工
if($data){
@ -105,6 +106,7 @@ class UserLogic extends BaseLogic
$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')->
where(['user_id'=>$uid,'status'=>0])
->sum('number');