添加更新条件

This commit is contained in:
wangxiaowei 2024-09-29 15:35:04 +08:00
parent 12aace02c8
commit 7845c62734

@ -363,7 +363,10 @@ class LocalStoreLogic extends Logic
throw new \Exception('经纬度不能为空');
}
$result = LocalStore::where('user_id', $user_id)->update([
$lstore_id = $post['lstore_id'];
unset($post['lstore_id']);
$result = LocalStore::where(['user_id' => $user_id, 'lstore_id' => $lstore_id])->update([
'post_station' => json_encode($post, JSON_UNESCAPED_UNICODE),
'update_time' => date('Y-m-d H:i:s')
]);