作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

bug修改

... ... @@ -17,7 +17,6 @@ use app\common\controller\Frontend;
use app\api\model\UserHouse;
use app\api\model\House;
use app\api\model\HousePhone;
use app\api\model\User;
/**
* 微信接口
... ... @@ -128,7 +127,8 @@ class Wechat extends Frontend
$info->save();
}
// 添加当前社区
User::where('id',$user['id'])->setField('house_id',$house_id);
$user->house_id = $house_id;
$user->save();
// 更新小区绑定数量
$bindnum = UserHouse::where(['house_id'=>$house_id,'status'=>2])->count();
House::where('id',$house_id)->setField('bindnum',$bindnum);
... ... @@ -178,7 +178,8 @@ class Wechat extends Frontend
'phone' => $user['mobile']
]);
// 添加当前社区
User::where('id',$user['id'])->setField('house_id',$house_id);
$user->house_id = $house_id;
$user->save();
// 更新小区绑定数量
$bindnum = UserHouse::where(['house_id'=>$house_id,'status'=>2])->count();
House::where('id',$house_id)->setField('bindnum',$bindnum);
... ...