Commit efe9dea0 by 冷斌

fix bug

parent c377b942
...@@ -130,26 +130,38 @@ class Model_Home extends PhalApi_Model_NotORM { ...@@ -130,26 +130,38 @@ class Model_Home extends PhalApi_Model_NotORM {
if (empty($familyinfo) && empty($familyinfo2)) { if (empty($familyinfo) && empty($familyinfo2)) {
return []; return [];
} }
$familyid = !empty($familyinfo2) ? $familyinfo2['id'] : $familyinfo['familyid'];
if (!empty($familyinfo2)) { // if (!empty($familyinfo2)) {
$touid=DI()->notorm->users_family // $touid=DI()->notorm->users_family
->select("uid") // ->select("uid")
->where("familyid=? and state=2",$familyinfo2['id']) // ->where("familyid=? and state=2",$familyinfo2['id'])
->fetchAll(); // ->fetchAll();
} // }
//
// if (!empty($familyinfo)) {
// $touid=DI()->notorm->users_family
// ->select("uid")
// ->where("familyid=? and state=2",$familyinfo['familyid'])
// ->fetchAll();
// $familyinfo2 = DI()->notorm->family
// ->where('id=?',$familyinfo['familyid'])
// ->fetchOne();
// if (!empty($familyinfo2)) {
// $touid[] = ['uid' => $familyinfo2['uid']];
// }
// }
if (!empty($familyinfo)) {
$touid=DI()->notorm->users_family $touid=DI()->notorm->users_family
->select("uid") ->select("uid")
->where("familyid=? and state=2",$familyinfo['familyid']) ->where("familyid=? and state=2", $familyid)
->fetchAll(); ->fetchAll();
$familyinfo2 = DI()->notorm->family $familyinfo2 = DI()->notorm->family
->where('id=?',$familyinfo['familyid']) ->where('id=?', $familyid)
->fetchOne(); ->fetchOne();
if (!empty($familyinfo2)) { if (!empty($familyinfo2)) {
$touid[] = ['uid' => $familyinfo2['uid']]; $touid[] = ['uid' => $familyinfo2['uid']];
} }
}
if (empty($touid)) { if (empty($touid)) {
return []; return [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment