青羊经侦大队-数据平台
wl
2022-12-23 b680856aa7a5c7225fae1ea81f2706f10437f373
src/main/java/com/example/jz/controller/WxAppController.java
@@ -17,6 +17,7 @@
import lombok.SneakyThrows;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
@@ -36,9 +37,11 @@
    private final String wxApp_accessToken_verify_url = "https://api.weixin.qq.com/cgi-bin/token";
    private final String appid = "wxebbb232d366dae09";
    @Value("${wx.appid}")
    private  String appid;
    private final String secret = "9a160c97c821eaa163240e8ec9185b77";
    @Value("${wx.secret}")
    private String secret;
    private final String js_code = "";
@@ -389,6 +392,9 @@
    @GetMapping("/group/user/sendMsg")
    public R sendUserMsg(@RequestParam Integer id, @RequestParam Integer groupId, @RequestParam String msg) {
        if (StringUtils.isBlank(msg)){
            return R.failed("msg is blank");
        }
        Message message = new Message();
        message.setUserId(id);
        message.setText(msg);