jinpengyong
2023-11-01 77fb7786036fd4c7dd16b9b15c6569cdf2d8ba19
screen-api/src/main/java/com/moral/api/controller/AppUserController.java
@@ -5,7 +5,6 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
@@ -81,13 +80,15 @@
        //拼接推送的模版
        WxMssVo wxMssVo = new WxMssVo();
        wxMssVo.setTouser(openid);//用户的openid(要发送给那个用户,通常这里应该动态传进来的)
        wxMssVo.setTemplate_id("CFeSWarQLMPyPjwmiy6AV4eB-IZcipu48V8bFLkBzTU");//订阅消息模板id
        wxMssVo.setTemplate_id("sClgB85aEG1hgaiXpnJBopo5LJX6r91DUsyikOmUgv8");//订阅消息模板id
        wxMssVo.setPage("pages/index/index");
        Map<String, String> m = new HashMap<>(3);
        m.put("thing1", "小程序入门课程");
        m.put("thing6", "杭州浙江大学");
        m.put("time2", "2023-10-23");
        m.put("thing3", "七星");
        m.put("thing7", "第一章第一节");
        m.put("character_string8", "第一章第一节");
        m.put("phrase10", "第一章第一节");
        wxMssVo.setData(m);
        ResponseEntity<String> responseEntity =
                restTemplate.postForEntity(url, wxMssVo, String.class);