@Test public void testActivateMemberCard() throws Exception { WxMpMemberCardActivatedMessage activatedMessage = new WxMpMemberCardActivatedMessage(); activatedMessage.setMembershipNumber(openId); activatedMessage.setCode(code); activatedMessage.setCardId(cardId); activatedMessage.setInitBonus(2000); activatedMessage.setInitBonusRecord("测试激活送积分"); String response = this.wxService.getMemberCardService().activateMemberCard(activatedMessage); assertNotNull(response); System.out.println(response); }
@Override public String activateMemberCard(WxMpMemberCardActivatedMessage activatedMessage) throws WxErrorException { return this.wxMpService.post(MEMBER_CARD_ACTIVATE, GSON.toJson(activatedMessage)); }
WxMpMemberCardServiceImpl implements WxMpMemberCardService { @Override public String activateMemberCard(WxMpMemberCardActivatedMessage activatedMessage) throws WxErrorException { return this.wxMpService.post(MEMBER_CARD_ACTIVATE, GSON.toJson(activatedMessage)); } }
WxMpMemberCardServiceImpl implements WxMpMemberCardService { @Override public String activateMemberCard(WxMpMemberCardActivatedMessage activatedMessage) throws WxErrorException { return this.wxMpService.post(MEMBER_CARD_ACTIVATE, GSON.toJson(activatedMessage)); } WxMpMemberCardServiceImpl(WxMpService wxMpService); }
WxMpMemberCardServiceImpl implements WxMpMemberCardService { @Override public String activateMemberCard(WxMpMemberCardActivatedMessage activatedMessage) throws WxErrorException { return this.wxMpService.post(MEMBER_CARD_ACTIVATE, GSON.toJson(activatedMessage)); } WxMpMemberCardServiceImpl(WxMpService wxMpService); @Override WxMpService getWxMpService(); @Override String activateMemberCard(WxMpMemberCardActivatedMessage activatedMessage); @Override WxMpMemberCardUserInfoResult getUserInfo(String cardId, String code); @Override WxMpMemberCardUpdateResult updateUserMemberCard(WxMpMemberCardUpdateMessage updateUserMessage); }
WxMpMemberCardServiceImpl implements WxMpMemberCardService { @Override public String activateMemberCard(WxMpMemberCardActivatedMessage activatedMessage) throws WxErrorException { return this.wxMpService.post(MEMBER_CARD_ACTIVATE, GSON.toJson(activatedMessage)); } WxMpMemberCardServiceImpl(WxMpService wxMpService); @Override WxMpService getWxMpService(); @Override String activateMemberCard(WxMpMemberCardActivatedMessage activatedMessage); @Override WxMpMemberCardUserInfoResult getUserInfo(String cardId, String code); @Override WxMpMemberCardUpdateResult updateUserMemberCard(WxMpMemberCardUpdateMessage updateUserMessage);  }