Compare commits

..

2 Commits

Author SHA1 Message Date
weiz 0932758165 Merge pull request '给相关内容添加user_id' (#14) from zhangwei into dev
Reviewed-on: #14
2023-11-25 11:04:45 +08:00
weiz af3b375156 给相关内容添加user_id 2023-11-25 11:04:14 +08:00
3 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,7 @@
}
Db::transaction(function()use($params,$plant,$land){
Action::create([
'user_id' => $plant['user_id'],
'plant_id' => $params['plant_id'],
'type' => $params['type'],
'type_text' => $this->actionMessage[$params['type']],

View File

@ -36,6 +36,7 @@
Db::transaction(function()use($land,$device) {
Device::where('id',$device['id'])->update([
'is_bind' => 2,
'user_id' => $land['user_id'],
'update_time' => time()
]);
LandDevice::create([

View File

@ -51,6 +51,7 @@
Db::transaction(function()use($params,$land) {
Plant::create([
'land_id' => $params['land_id'],
'user_id' => $land['user_id'],
'kind' => $params['kind'],
'breed' => $params['breed'],
'area' => $params['area'],