|
|
|
@@ -81,4 +81,46 @@ public class WechatWeappSetController { |
|
|
|
} |
|
|
|
return new ResultData(Result.ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "绑定微信用户为小程序体验者", notes = "") |
|
|
|
@PostMapping("/bindTester") |
|
|
|
public ResultData bindTester(@RequestParam(value = "appId") String appId, @RequestParam(value = "wechatId") String wechatId) { |
|
|
|
try { |
|
|
|
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); |
|
|
|
WxOpenResult openRet = openMaService.bindTester(wechatId); |
|
|
|
logger.info(openRet.toString()); |
|
|
|
return new ResultData(openRet); |
|
|
|
} catch (WxErrorException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
} |
|
|
|
return new ResultData(Result.ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "解除绑定小程序的体验者", notes = "") |
|
|
|
@PostMapping("/unbindTester") |
|
|
|
public ResultData unbindTester(@RequestParam(value = "appId") String appId, @RequestParam(value = "wechatId") String wechatId) { |
|
|
|
try { |
|
|
|
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); |
|
|
|
WxOpenResult openRet = openMaService.unbindTester(wechatId); |
|
|
|
logger.info(openRet.toString()); |
|
|
|
return new ResultData(openRet); |
|
|
|
} catch (WxErrorException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
} |
|
|
|
return new ResultData(Result.ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "获取体验者列表", notes = "") |
|
|
|
@PostMapping("/getTesterList") |
|
|
|
public ResultData getTesterList(@RequestParam(value = "appId") String appId) { |
|
|
|
try { |
|
|
|
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); |
|
|
|
WxOpenResult openRet = openMaService.getTesterList(); |
|
|
|
logger.info(openRet.toString()); |
|
|
|
return new ResultData(openRet); |
|
|
|
} catch (WxErrorException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
} |
|
|
|
return new ResultData(Result.ERROR); |
|
|
|
} |
|
|
|
} |