123456789101112131415161718192021222324 |
- package com.ruoyi.demo.utils;
- import com.ruoyi.demo.entity.bo.CallBackBean;
- import org.springframework.web.client.RestTemplate;
- import java.time.LocalDateTime;
- public class SendCallBackUtil {
- public static void testCallBack(String callBack){
- RestTemplate restTemplate = new RestTemplate();
- CallBackBean callBackBean = new CallBackBean();
- callBackBean.setTitle("这是个测试信息");
- callBackBean.setState("测试");
- callBackBean.setAuditPerson("自动回复");
- callBackBean.setAuditComment("这是个测试信息,请勿回复");
- callBackBean.setAuditTime(LocalDateTime.now());
- restTemplate.postForObject(callBack,callBackBean,String.class);
- }
- public static void sendCallBack(String callBack,CallBackBean callBackBean){
- RestTemplate restTemplate = new RestTemplate();
- restTemplate.postForObject(callBack,callBackBean,String.class);
- }
- }
|