class WxMpAiOpenServiceImpl implements WxMpAiOpenService {

  @Override
  public String translate(AiLangType langFrom, AiLangType langTo, String content) throws WxErrorException {
    String response = this.wxMpService.post(String.format(TRANSLATE_URL, langFrom.getCode(), langTo.getCode()), content);

    WxError error = WxError.fromJson(response, WxType.MP);
    if (error.getErrorCode() != 0) {
      throw new WxErrorException(error);
    }

    return JSON_PARSER.parse(response).getAsJsonObject().get("to_content").getAsString();
  }

  public  WxMpAiOpenServiceImpl(WxMpService wxMpService);

}