@Test(dependsOnMethods = {"testKfAccountUpdate", "testKfAccountAdd"}, dataProvider = "getKfAccount") public void testKfAccountUploadHeadImg(String kfAccount) throws WxErrorException { File imgFile = new File("src\\test\\resources\\mm.jpeg"); boolean result = this.wxService.getKefuService().kfAccountUploadHeadImg(kfAccount, imgFile); assertThat(result).isTrue(); }
@Override public boolean kfAccountUploadHeadImg(String kfAccount, File imgFile) throws WxErrorException { WxMediaUploadResult responseContent = this.wxMpService .execute(MediaUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(KFACCOUNT_UPLOAD_HEAD_IMG, kfAccount), imgFile); return responseContent != null; }
WxMpKefuServiceImpl implements WxMpKefuService { @Override public boolean kfAccountUploadHeadImg(String kfAccount, File imgFile) throws WxErrorException { WxMediaUploadResult responseContent = this.wxMpService .execute(MediaUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(KFACCOUNT_UPLOAD_HEAD_IMG, kfAccount), imgFile); return responseContent != null; } }
WxMpKefuServiceImpl implements WxMpKefuService { @Override public boolean kfAccountUploadHeadImg(String kfAccount, File imgFile) throws WxErrorException { WxMediaUploadResult responseContent = this.wxMpService .execute(MediaUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(KFACCOUNT_UPLOAD_HEAD_IMG, kfAccount), imgFile); return responseContent != null; } WxMpKefuServiceImpl(WxMpService wxMpService); }
WxMpKefuServiceImpl implements WxMpKefuService { @Override public boolean kfAccountUploadHeadImg(String kfAccount, File imgFile) throws WxErrorException { WxMediaUploadResult responseContent = this.wxMpService .execute(MediaUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(KFACCOUNT_UPLOAD_HEAD_IMG, kfAccount), imgFile); return responseContent != null; } WxMpKefuServiceImpl(WxMpService wxMpService); @Override boolean sendKefuMessage(WxMpKefuMessage message); @Override WxMpKfList kfList(); @Override WxMpKfOnlineList kfOnlineList(); @Override boolean kfAccountAdd(WxMpKfAccountRequest request); @Override boolean kfAccountUpdate(WxMpKfAccountRequest request); @Override boolean kfAccountInviteWorker(WxMpKfAccountRequest request); @Override boolean kfAccountUploadHeadImg(String kfAccount, File imgFile); @Override boolean kfAccountDel(String kfAccount); @Override boolean kfSessionCreate(String openid, String kfAccount); @Override boolean kfSessionClose(String openid, String kfAccount); @Override WxMpKfSessionGetResult kfSessionGet(String openid); @Override WxMpKfSessionList kfSessionList(String kfAccount); @Override WxMpKfSessionWaitCaseList kfSessionGetWaitCase(); @Override WxMpKfMsgList kfMsgList(Date startTime, Date endTime, Long msgId, Integer number); @Override WxMpKfMsgList kfMsgList(Date startTime, Date endTime); }
WxMpKefuServiceImpl implements WxMpKefuService { @Override public boolean kfAccountUploadHeadImg(String kfAccount, File imgFile) throws WxErrorException { WxMediaUploadResult responseContent = this.wxMpService .execute(MediaUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(KFACCOUNT_UPLOAD_HEAD_IMG, kfAccount), imgFile); return responseContent != null; } WxMpKefuServiceImpl(WxMpService wxMpService); @Override boolean sendKefuMessage(WxMpKefuMessage message); @Override WxMpKfList kfList(); @Override WxMpKfOnlineList kfOnlineList(); @Override boolean kfAccountAdd(WxMpKfAccountRequest request); @Override boolean kfAccountUpdate(WxMpKfAccountRequest request); @Override boolean kfAccountInviteWorker(WxMpKfAccountRequest request); @Override boolean kfAccountUploadHeadImg(String kfAccount, File imgFile); @Override boolean kfAccountDel(String kfAccount); @Override boolean kfSessionCreate(String openid, String kfAccount); @Override boolean kfSessionClose(String openid, String kfAccount); @Override WxMpKfSessionGetResult kfSessionGet(String openid); @Override WxMpKfSessionList kfSessionList(String kfAccount); @Override WxMpKfSessionWaitCaseList kfSessionGetWaitCase(); @Override WxMpKfMsgList kfMsgList(Date startTime, Date endTime, Long msgId, Integer number); @Override WxMpKfMsgList kfMsgList(Date startTime, Date endTime);  }