| | |
| | | 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; |
| | |
| | | |
| | | 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 = ""; |
| | | |
| | |
| | | |
| | | @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); |