PostDischargePatientManage/postdischarge-mobile/src/main/java/com/xinelu/mobile/controller/MobileTestController.java

58 lines
1.7 KiB
Java
Raw Normal View History

2024-02-18 17:08:31 +08:00
package com.xinelu.mobile.controller;
import com.xinelu.mobile.utils.WeChatAppletUtils;
import com.xinelu.mobile.utils.WeChatOfficialAccountUtils;
2024-05-24 15:24:06 +08:00
import com.xinelu.mobile.vo.wechatofficialaccountcallback.PatientVO;
import org.springframework.web.bind.annotation.GetMapping;
2024-02-18 17:08:31 +08:00
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
2024-02-18 17:08:31 +08:00
/**
* @Description 测试controller
* @Author 纪寒
* @Date 2024-02-18 16:39:49
* @Version 1.0
*/
@RestController
@RequestMapping("/testMobile")
public class MobileTestController {
@Resource
private WeChatAppletUtils weChatAppletUtils;
@Resource
private WeChatOfficialAccountUtils weChatOfficialAccountUtils;
/**
* 测试获取微信小程序accessToken
*/
@GetMapping("/getAppletAcccessToken")
public String getAppletAccessToken() {
return weChatAppletUtils.getWeChatAppletAccessToken();
}
2024-02-18 17:08:31 +08:00
/**
* 测试获取微信公众号accessToken
*/
@GetMapping("/getOfficialAccountAccessToken")
public String getOfficialAccountAccessToken() {
return weChatOfficialAccountUtils.getWeChatOfficialAccountAccessToken();
}
/**
* 测试微信公众号模板消息发送
*/
@GetMapping("/sendOfficialAccountTemplate")
2024-06-04 09:38:41 +08:00
public void sendOfficialAccountTemplateMessage() {
weChatOfficialAccountUtils.sendOfficialAccountTemplateMessage();
}
/**
* 测试微信小程序模板消息发送
*/
@GetMapping("/sendAppletTemplate")
public void sendAppletTemplate(PatientVO patientVO) {
weChatOfficialAccountUtils.sendAppletTemplateMessage(patientVO);
}
2024-02-18 17:08:31 +08:00
}