Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
b46af51480
@ -192,8 +192,21 @@ class OrderLogic extends BaseLogic
|
||||
$store['near_store'] = $nearestStore;
|
||||
}
|
||||
}else{
|
||||
if(empty($user)){
|
||||
$store_id = getenv('STORE_ID') ?? 1;
|
||||
$store['near_store'] =SystemStore::where('id', $store_id)->field('id,name,phone,address,detailed_address,latitude,longitude')->find()??[];
|
||||
}else{
|
||||
$checkOrderStore = StoreOrder::where('uid',$user['id'])->field('id,store_id')
|
||||
->order('id','desc')->find();
|
||||
if($checkOrderStore){
|
||||
$store['near_store'] =SystemStore::where('id', $checkOrderStore['store_id'])->field('id,name,phone,address,detailed_address,latitude,longitude')->find()??[];
|
||||
}else{
|
||||
$store_id = getenv('STORE_ID') ?? 1;
|
||||
$store['near_store'] =SystemStore::where('id', $store_id)->field('id,name,phone,address,detailed_address,latitude,longitude')->find()??[];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
self::setError($e->getMessage());
|
||||
|
Loading…
x
Reference in New Issue
Block a user