| | |
| | | import com.ruoyi.system.mapper.SysUserDeptMapper; |
| | | import com.smartor.service.IServiceSLTDHealthcareRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.mp.bean.template.WxMpTemplateData; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | |
| | | // @PostMapping("/test") |
| | | // public void test(@RequestBody Map<String, Object> map) { |
| | | // WxMpUtils wxMpUtils = new WxMpUtils(wxAppid, wxAppSecret); |
| | | // boolean b = wxMpUtils.sendTextMessage("bA_nlW7yM6CCfQMUX5HpBg", "你好"); |
| | | // System.out.println("b的值为:" + b); |
| | | // |
| | | // Map<String, WxMpTemplateData> dataMap = new HashMap(); |
| | | // |
| | | // dataMap.put("thing2", new WxMpTemplateData("thing2", "康复报告通知", "#FFB6C1")); |
| | | // dataMap.put("thing4", new WxMpTemplateData("thing4", "xx市xx县xx路xx号", "#173177")); |
| | | // dataMap.put("time7", new WxMpTemplateData("time7", "2023-05-15 00:00:00", "#B95EA6")); |
| | | // dataMap.put("thing8", new WxMpTemplateData("thing8", "张三", "#87cefa")); |
| | | // |
| | | // |
| | | // String s = wxMpUtils.sendTemplateMessage("oK3-Z59miSE_ebKdXP4IZuXilEvE", "TDF0WB3hndi1gtQybzcHCXeZWm_Q7HjtjVLNG4MOX8Q", "", dataMap); |
| | | // |
| | | // System.out.println("s的值为:" + s); |
| | | // } |
| | | |
| | | /** |
| | |
| | | private RedirectView buildRedirect(String url) { |
| | | RedirectView redirectView = new RedirectView(); |
| | | redirectView.setUrl(url); |
| | | redirectView.setStatusCode(HttpStatus.MOVED_PERMANENTLY); |
| | | redirectView.setStatusCode(HttpStatus.FOUND); // 302 临时重定向,避免浏览器缓存 |
| | | redirectView.setExposeModelAttributes(false); // 避免模型属性暴露 |
| | | return redirectView; |
| | | } |
| | | |