Browse Source

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

master
BinaryWang 9 years ago
parent
commit
244df15d83
3 changed files with 12 additions and 3 deletions
  1. +1
    -1
      weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java
  2. +8
    -0
      weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpKefuServiceImpl.java
  3. +3
    -2
      weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/ApiTestModule.java

+ 1
- 1
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java 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);
} }


+ 8
- 0
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpKefuServiceImpl.java 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;


+ 3
- 2
weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/ApiTestModule.java 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);


Loading…
Cancel
Save