parent
5a8cf11d5f
commit
dd64b29e8b
@ -0,0 +1,29 @@
|
|||||||
|
package cc.yunxi.controller;
|
||||||
|
|
||||||
|
import cc.yunxi.service.impl.WxServiceImpl;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@Api(tags = "测试接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wx")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class WxController {
|
||||||
|
private final WxServiceImpl wxService;
|
||||||
|
|
||||||
|
@ApiOperation("生成设备二维码")
|
||||||
|
@PostMapping("/generate-device-qr-code")
|
||||||
|
public String generateDeviceQRCode(@RequestBody String paramAJsonStr) {
|
||||||
|
JSONObject paramAJsonObj = JSONUtil.parseObj(paramAJsonStr);
|
||||||
|
String strDevCode = paramAJsonObj.getStr("devCode");
|
||||||
|
String strPage = paramAJsonObj.getStr("page");
|
||||||
|
wxService.generateDeviceQRCode(strDevCode, strPage);
|
||||||
|
return strDevCode;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package cc.yunxi.service;
|
||||||
|
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wx接口
|
||||||
|
*/
|
||||||
|
public interface IWxService {
|
||||||
|
|
||||||
|
// 同步方法
|
||||||
|
void syncTest();
|
||||||
|
// 生成设备二维码
|
||||||
|
void generateDeviceQRCode(String strDevCode, String strPage);
|
||||||
|
// 散户-WxSh||回收员-WxHsy 获取token
|
||||||
|
String getToken(String strWxUserType);
|
||||||
|
// 获取设备微信二维码Res
|
||||||
|
HttpResponse getResDevQrCode(String token, String strDevCode, String strPage);
|
||||||
|
// 设备二维码保存
|
||||||
|
void saveDevQrCode(String strDevCode, HttpResponse resDevQrCode);
|
||||||
|
}
|
Loading…
Reference in new issue