| | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.*; |
| | |
| | | import java.net.MalformedURLException; |
| | | import java.net.ProtocolException; |
| | | import java.net.URL; |
| | | import java.nio.charset.Charset; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | String paramBody = JSON.toJSONString(map); // 这里用了Alibaba的fastjson |
| | | |
| | | OutputStream out = connection.getOutputStream(); |
| | | BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out)); |
| | | BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out,"utf-8")); |
| | | bw.write(paramBody); // 向流中写入参数字符串 |
| | | bw.flush(); |
| | | |
| | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "拉取公众号列表") |
| | | @GetMapping("/list/noToken") |
| | | @GetMapping(value = "/list/noToken",produces="application/json;charset=utf-8") |
| | | public R pageDiscuss() throws Exception{ |
| | | WxOfficialApi officialApi = new WxOfficialApi(); |
| | | |