给相关内容添加user_id #14

Merged
weiz merged 1 commits from zhangwei into dev 2023-11-25 11:04:46 +08:00
3 changed files with 3 additions and 0 deletions

View File

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

View File

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

View File

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