...
|
...
|
@@ -524,22 +524,22 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
}else{
|
|
|
$data[$key] = Db::name('indent') -> where('uid',$val['uid']) -> where("state = 2 or state = 3 or state = 5") -> select() -> toArray();
|
|
|
}
|
|
|
|
|
|
|
|
|
$name = $val['user_nickname'];
|
|
|
$avatar = $val['avatar'];
|
|
|
foreach ($data[$key] as $key1 => $val1){
|
|
|
$book_name = Db::name('indent_goods') -> where("indent_id",$val1['id']) -> find();
|
|
|
$data[$key][$key1]['user_name'] = $name;
|
|
|
$data[$key][$key1]['avatar'] = $avatar;
|
|
|
$data[$key][$key1]['book_name'] = $book_name['book_name'];
|
|
|
$money_income = Db::name('money_income') -> where("indent_id =".$val1['id']." and uid = ".$uid) -> select() -> toArray();
|
|
|
$money = 0;
|
|
|
foreach ($money_income as $key2 => $val2){
|
|
|
$money += $val2['money'];
|
|
|
if(count($data[$key])!=0){
|
|
|
foreach ($data[$key] as $key1 => $val1){
|
|
|
$book_name = Db::name('indent_goods') -> where("indent_id",$val1['id']) -> find();
|
|
|
$data[$key][$key1]['user_name'] = $name;
|
|
|
$data[$key][$key1]['avatar'] = $avatar;
|
|
|
$data[$key][$key1]['book_name'] = $book_name['book_name'];
|
|
|
$money_income = Db::name('money_income') -> where("indent_id =".$val1['id']." and uid = ".$uid) -> select() -> toArray();
|
|
|
$money = 0;
|
|
|
foreach ($money_income as $key2 => $val2){
|
|
|
$money += $val2['money'];
|
|
|
}
|
|
|
$data[$key][$key1]['total_money'] = $money;
|
|
|
$res[] = $data[$key][$key1];
|
|
|
}
|
|
|
$data[$key][$key1]['total_money'] = $money;
|
|
|
$res[] = $data[$key][$key1];
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|