OpenFeign远程调用实现

package com.java1234.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.java1234.entity.Order;
import com.java1234.feign.OrderFeignService;
import com.java1234.properties.WeixinpayProperties;
import com.java1234.service.IOrderDetailService;
import com.java1234.service.IOrderService;
import com.java1234.util.MD5Util;
import com.java1234.util.XmlUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

/**
 * 微信支付Controller
 * @author java1234_小锋
 * @site www.java1234.com
 * @company 南通小锋网络科技有限公司
 * @create 2022-04-10 9:28
 */
@Controller
@RequestMapping("/pay")
public class WeixinpayController {
   

    @Autowired
    private IOrderService orderService;

    @Autowired
    private OrderFeignService orderFeignService;

    @Autowired
    private WeixinpayProperties weixinpayProperties;



    private final static Logger logger=LoggerFactory.getLogger(WeixinpayController.class);


    @RequestMapping("/test")
    @ResponseBody
    public String test(){
   
        Order order = orderFeignService.getOne("JAVA20231005103107000000933");
        System.out.println("order:"+order);
        order.setConsignee("测试2233366666");
        orderFeignService.save(order);
        return "

你可能感兴趣的:(分布式小程序电商,运维)