添加:烟酒店员工信息兼容

This commit is contained in:
wuhui_zzw 2024-03-14 11:28:04 +08:00
parent d3f166088c
commit 7b45836832
3 changed files with 26 additions and 2 deletions

View File

@ -239,6 +239,29 @@ class User extends BaseModel
return !empty($info) ? $info->toArray() : null;
}
public function getSmokeMerServiceAttr(){
$info = (new StoreService())
->field('service_id,uid,nickname,avatar,customer,StoreService.mer_id,is_verify,is_goods,is_open')
->hasWhere('merchant',function($query){
$query->where('is_del', 0)
->where('mer_state', 1)
->where('merchant_type', 3)
->where('status', 1);
})
->where('uid',$this->uid)
->where('StoreService.mer_id','<>',0)
->where('StoreService.is_del',0)
->where('is_open',1)
->order('StoreService.is_verify DESC,StoreService.customer DESC')
// ->fetchSql()
->find();
return !empty($info) ? $info->toArray() : null;
}
public function topService()
{
return $this->hasOne(StoreService::class, 'uid', 'uid')

View File

@ -110,7 +110,7 @@ class StoreServiceRepository extends BaseRepository
else if($merchantType == 1 || $merchantType == 3){
$adminRule = [
Elm::switches('is_verify', '核销权限', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
Elm::switches('product_exchange', '商品兑换码', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
// Elm::switches('product_exchange', '商品兑换码', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
Elm::switches('purchase_permission', '进货权限', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
];
$filed = [
@ -248,6 +248,7 @@ class StoreServiceRepository extends BaseRepository
->select()
->hidden(['pwd'])
->toArray();
// 是否处理总平台客服信息
if($is_sys == 1){
$config = systemConfig(['site_logo','site_name']);

View File

@ -147,7 +147,7 @@ class Auth extends BaseController
public function userInfo()
{
$user = $this->request->userInfo()->hidden(['label_id', 'group_id', 'pwd', 'addres', 'card_id', 'last_time', 'last_ip', 'create_time', 'mark', 'status', 'spread_uid', 'spread_time', 'real_name', 'birthday', 'brokerage_price']);
$user->append(['service', 'topService','shopMerService', 'total_collect_product', 'total_collect_store', 'total_coupon', 'total_visit_product', 'total_unread', 'total_recharge', 'lock_integral', 'total_integral']);
$user->append(['service', 'topService','shopMerService','smokeMerService', 'total_collect_product', 'total_collect_store', 'total_coupon', 'total_visit_product', 'total_unread', 'total_recharge', 'lock_integral', 'total_integral']);
$data = $user->toArray();
$data['total_consume'] = $user['pay_price'];
$data['extension_status'] = systemConfig('extension_status');