diff --git a/app/controller/Donation.php b/app/controller/Donation.php new file mode 100644 index 0000000..a2bebc7 --- /dev/null +++ b/app/controller/Donation.php @@ -0,0 +1,37 @@ +where("id",$student_id)->field("nickname,identifier,avatar,age,type,disabled as is_disabled,city,school,hot,hot_count")->find(); + if(!empty($userinfo)){ + $result['userinfo'] = $userinfo; + } + $result['donation_list'] = []; + $list = Db::name("order")->where(['student_id' => $student_id,"status"=>1])->select()->toArray(); + $users = getAllUsersMessage($list,"user_id","nickname,avatar,shiyou_id"); + + foreach($list as $vo){ + $result['donation_list'][] = [ + "nickname"=>$users[$vo["user_id"]]['nickname'], + "identity"=>empty($users[$vo["user_id"]]['shiyou_id'])?1:0, + "amount"=>$vo['amount'], + ]; + } + return show("获取成功",SUCCESS_CODE,$result); + } + + + +} \ No newline at end of file diff --git a/app/controller/Order.php b/app/controller/Order.php index bf2925b..4699237 100644 --- a/app/controller/Order.php +++ b/app/controller/Order.php @@ -40,5 +40,4 @@ class Order return show("订单创建成功!", SUCCESS_CODE, $order->id); } - } \ No newline at end of file diff --git a/app/controller/Wechat.php b/app/controller/Wechat.php index db1dd29..3a04a2d 100644 --- a/app/controller/Wechat.php +++ b/app/controller/Wechat.php @@ -152,6 +152,7 @@ class Wechat //为用户增加助力值 $zhuLi = env("ZHULI_VALUE")??150; Db::name("student")->inc("hot",$zhuLi)->where("id",$order_detail->id)->update(); + Db::name("student")->inc("hot_count",1)->where("id",$order_detail->id)->update(); } else { $fail('Order not exists.');