重命名客服接口获取方法名称,保证统一

This commit is contained in:
BinaryWang 2016-07-05 10:30:41 +08:00
parent e169bcc2e9
commit 244df15d83
3 changed files with 12 additions and 3 deletions

View File

@ -1377,7 +1377,7 @@ public class WxMpServiceImpl implements WxMpService {
return this.kefuService; return this.kefuService;
} }
public void setCustomerService(WxMpKefuService kefuService) { public void setKefuService(WxMpKefuService kefuService) {
this.kefuService = kefuService; this.kefuService = kefuService;
this.kefuService.setWxMpService(this); this.kefuService.setWxMpService(this);
} }

View File

@ -20,6 +20,14 @@ import me.chanjar.weixin.mp.bean.customerservice.result.WxMpKfOnlineList;
public class WxMpKefuServiceImpl implements WxMpKefuService { public class WxMpKefuServiceImpl implements WxMpKefuService {
private WxMpService wxMpService; private WxMpService wxMpService;
public WxMpKefuServiceImpl(){
}
public WxMpKefuServiceImpl(WxMpService wxMpService) {
this.wxMpService = wxMpService;
}
@Override @Override
public void setWxMpService(WxMpService wxMpService) { public void setWxMpService(WxMpService wxMpService) {
this.wxMpService = wxMpService; this.wxMpService = wxMpService;

View File

@ -23,8 +23,9 @@ public class ApiTestModule implements Module {
WxXmlMpInMemoryConfigStorage.class, is1); WxXmlMpInMemoryConfigStorage.class, is1);
WxMpServiceImpl wxService = new WxMpServiceImpl(); WxMpServiceImpl wxService = new WxMpServiceImpl();
wxService.setWxMpConfigStorage(config); wxService.setWxMpConfigStorage(config);
WxMpKefuService customerService = new WxMpKefuServiceImpl();
wxService.setCustomerService(customerService); WxMpKefuService kefuService = new WxMpKefuServiceImpl();
wxService.setKefuService(kefuService);
binder.bind(WxMpServiceImpl.class).toInstance(wxService); binder.bind(WxMpServiceImpl.class).toInstance(wxService);
binder.bind(WxMpConfigStorage.class).toInstance(config); binder.bind(WxMpConfigStorage.class).toInstance(config);