...
|
...
|
@@ -17,6 +17,7 @@ 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;
|
|
|
|
|
|
/**
|
|
|
* 微信接口
|
...
|
...
|
@@ -127,10 +128,10 @@ class Wechat extends Frontend |
|
|
$info->save();
|
|
|
}
|
|
|
// 添加当前社区
|
|
|
$user->house_id = $house_id;
|
|
|
$user->save();
|
|
|
// 社区人数加1
|
|
|
House::where('id',$house_id)->setInc('bindnum');
|
|
|
User::where('id',$user['id'])->setField('house_id',$house_id);
|
|
|
// 更新小区绑定数量
|
|
|
$bindnum = UserHouse::where(['house_id'=>$house_id,'status'=>2])->count();
|
|
|
House::where('id',$house_id)->setField('bindnum',$bindnum);
|
|
|
Db::commit();
|
|
|
} catch (\think\exception\PDOException $e) {
|
|
|
Db::rollback();
|
...
|
...
|
@@ -177,10 +178,10 @@ class Wechat extends Frontend |
|
|
'phone' => $user['mobile']
|
|
|
]);
|
|
|
// 添加当前社区
|
|
|
$user->house_id = $house_id;
|
|
|
$user->save();
|
|
|
// 社区人数加1
|
|
|
House::where('id',$house_id)->setInc('bindnum');
|
|
|
User::where('id',$user['id'])->setField('house_id',$house_id);
|
|
|
// 更新小区绑定数量
|
|
|
$bindnum = UserHouse::where(['house_id'=>$house_id,'status'=>2])->count();
|
|
|
House::where('id',$house_id)->setField('bindnum',$bindnum);
|
|
|
Db::commit();
|
|
|
} catch (\think\exception\PDOException $e) {
|
|
|
Db::rollback();
|
...
|
...
|
|