success('返回成功', $this->request->param()); } /** * 无需登录的接口 * */ public function test1() { $this->success('返回成功', ['action' => 'test1']); } /** * 需要登录的接口 * */ public function test2() { $this->success('返回成功', ['action' => 'test2']); } /** * 需要登录且需要验证有相应组的权限 * */ public function test3() { $this->success('返回成功', ['action' => 'test3']); } //支付回调后的逻辑,或者计划任务的逻辑 public function test4(){ $order_id = 488359520289034240; $product_list = Db::name('unishop_order_product')->where('order_id',$order_id)->select();//已支付 foreach($product_list as $key => $product){ //收益 $shouyi = bcmul($product['number'],$product['pifa_shouyi'],0); } } }