Compare commits

...

1 Commits
main ... aa

Author SHA1 Message Date
mkm
db7fbbe70e feat: 增加用户信息查询功能 2024-09-20 10:51:52 +08:00

View File

@ -14,6 +14,7 @@ use app\common\model\store_order_cart_info\StoreOrderCartInfo;
use app\common\model\store_product\StoreProduct;
use app\common\model\store_product_unit\StoreProductUnit;
use app\common\model\system_store\SystemStore;
use app\common\model\user\User;
/**
* 订单购物详情列表
@ -75,11 +76,24 @@ class StoreOrderCartInfoTwoLists extends BaseAdminDataLists implements ListsSear
return $query->limit($this->limitOffset, $this->limitLength)
->select()->each(function ($item) use($is_group){
$find = StoreProduct::where('id', $item['product_id'])->field('image,unit,cate_id,store_name,store_info')->find();
$item['nickname']='';
$item['mobile']='';
if ($find) {
$item['image'] = $find['image']; //商品图片
if($is_group==1){
$item['store_name'] = $find['store_name'].'-'.$item['create_time']; //商品名称
}else{
if($item['uid']>0){
$user=User::where('id',$item['uid'])->field('real_name,mobile')->find();
if($user){
$item['mobile']=$user['mobile'];
if($user['real_name']!=''){
$item['nickname']=$user['real_name'];
}else{
$item['nickname']=$user['mobile'];
}
}
}
$item['store_name'] = $find['store_name']; //商品名称
}
$item['store_info'] = $find['store_info']; //商品规格
@ -156,6 +170,8 @@ class StoreOrderCartInfoTwoLists extends BaseAdminDataLists implements ListsSear
'cart_num' => '数量',
'price' => '单价',
'total_price' => '总价',
'nickname' => '用户',
'mobile' => '手机',
'create_time' => '时间',
];
}