请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

借用账号支付访问失败

问题区里有人问过,参考后依旧无效
图片描述

自己的Springboot版本本身就和项目一致
图片描述
之前的步骤也看了https://www.imooc.com/article/31607
现在完全卡住了。。。

正在回答 回答被采纳积分+3

1回答

廖师兄 2021-04-06 21:32:17

这是你的项目404了,用localhost可以访问吗?

这里有一篇文章你可以先参考一下

让SpringBoot项目瞬间404的N种方法

https://mp.weixin.qq.com/s/rdUpi2BKIhGh4Qj7jf1nQw


0 回复 有任何疑惑可以回复我~
  • 提问者 Zarathustra1816763 #1
    回复不能过长,分开回复
    
    1.在浏览器使用localhost后(http://127.0.0.1:8080/sell/pay/create?openid=oTgZpwf97UlSn6FtWxGP_3imurY4&orderId=1617373651505654351&returnUrl=http://www.imooc.com),可以进入controller,但浏览器显示Whitelabel Error Page。
    
    在微信中使用微信链接http://proxy.springboot.cn/pay?openid=oTgZpwf97UlSn6FtWxGP_3imurY4&orderId=1617373651505654351&returnUrl=http://www.imooc.com。仍显示访问失败,控制台信息一致
    回复 有任何疑惑可以回复我~ 2021-04-06 22:24:17
  • 提问者 Zarathustra1816763 #2
    控制台信息
    
    进入create方法
    Hibernate: select ordermaste0_.order_id as order_id1_1_0_, ordermaste0_.buyer_address as buyer_ad2_1_0_, ordermaste0_.buyer_name as buyer_na3_1_0_, ordermaste0_.buyer_openid as buyer_op4_1_0_, ordermaste0_.buyer_phone as buyer_ph5_1_0_, ordermaste0_.create_time as create_t6_1_0_, ordermaste0_.order_amount as order_am7_1_0_, ordermaste0_.order_status as order_st8_1_0_, ordermaste0_.pay_status as pay_stat9_1_0_, ordermaste0_.update_time as update_10_1_0_ from order_master ordermaste0_ where ordermaste0_.order_id=?
    Hibernate: select orderdetai0_.detail_id as detail_i1_0_, orderdetai0_.order_id as order_id2_0_, orderdetai0_.product_icon as product_3_0_, orderdetai0_.product_id as product_4_0_, orderdetai0_.product_name as product_5_0_, orderdetai0_.product_price as product_6_0_, orderdetai0_.product_quantity as product_7_0_ from order_detail orderdetai0_ where orderdetai0_.order_id=?
    回复 有任何疑惑可以回复我~ 2021-04-06 22:24:36
  • 提问者 Zarathustra1816763 #3
    controller代码
    
    @Controller
    @RequestMapping("/pay")
    public class PayController {
    
        @Autowired
        private OrderService orderService;
    
        @GetMapping("/create")
        public void create(@RequestParam("orderId") String orderId,
                           @RequestParam("returnUrl") String returnUrl) {
            System.out.println("进入create方法");
    //        1。查询订单
            OrderDTO orderDTO = orderService.findOne(orderId);
            if (orderDTO == null) {
                throw new SellException(ResultEnum.ORDER_NOT_EXIST);
            }
    
    
    //        发起支付
        }
    }
    
    
    2.根据这篇文章都改了试下,但没有效果
    回复 有任何疑惑可以回复我~ 2021-04-06 22:24:55
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信