1010/**
1111 * 卡券相关接口
1212 *
13- * @author YuJian(mgcnrx11@ hotmail.com) on 01/11/2016
13+ * @author YuJian(mgcnrx11 @ hotmail.com) on 01/11/2016
1414 * @author yuanqixun 2018-08-29
1515 */
1616public interface WxMpCardService {
@@ -23,6 +23,10 @@ public interface WxMpCardService {
2323 String CARD_TEST_WHITELIST = "https://api.weixin.qq.com/card/testwhitelist/set" ;
2424 String CARD_QRCODE_CREAET = "https://api.weixin.qq.com/card/qrcode/create" ;
2525 String CARD_LANDING_PAGE_CREAET = "https://api.weixin.qq.com/card/landingpage/create" ;
26+ /**
27+ * 将用户的卡券设置为失效状态
28+ */
29+ String CARD_CODE_UNAVAILABLE = "https://api.weixin.qq.com/card/code/unavailable" ;
2630
2731 /**
2832 * 得到WxMpService
@@ -132,33 +136,50 @@ void markCardCode(String code, String cardId, String openId, boolean isMark) thr
132136
133137 /**
134138 * 添加测试白名单
139+ *
135140 * @param openid 用户的openid
136141 * @return
137142 */
138143 String addTestWhiteList (String openid ) throws WxErrorException ;
139144
140145 /**
141146 * 创建卡券二维码
142- * @param cardId 卡券编号
147+ *
148+ * @param cardId 卡券编号
143149 * @param outerStr 二维码标识
144150 * @return WxMpCardQrcodeCreateResult
145151 */
146152 WxMpCardQrcodeCreateResult createQrcodeCard (String cardId , String outerStr ) throws WxErrorException ;
147153
148154 /**
149155 * 创建卡券二维码
150- * @param cardId 卡券编号
151- * @param outerStr 二维码标识
156+ *
157+ * @param cardId 卡券编号
158+ * @param outerStr 二维码标识
152159 * @param expiresIn 失效时间,单位秒,不填默认365天
153160 * @return WxMpCardQrcodeCreateResult
154161 */
155- WxMpCardQrcodeCreateResult createQrcodeCard (String cardId , String outerStr ,int expiresIn ) throws WxErrorException ;
162+ WxMpCardQrcodeCreateResult createQrcodeCard (String cardId , String outerStr , int expiresIn ) throws WxErrorException ;
156163
157164 /**
158165 * 创建卡券货架
166+ *
159167 * @param createRequest 货架创建参数
160168 * @return
161169 * @throws WxErrorException
162170 */
163171 WxMpCardLandingPageCreateResult createLandingPage (WxMpCardLandingPageCreateRequest createRequest ) throws WxErrorException ;
172+
173+ /**
174+ * 将用户的卡券设置为失效状态
175+ * 详见:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025272&anchor=9
176+ *
177+ * @param cardId 卡券编号
178+ * @param code 用户会员卡号
179+ * @param reason 设置为失效的原因
180+ * @return
181+ * @throws WxErrorException
182+ */
183+ String unavailableCardCode (String cardId , String code , String reason ) throws WxErrorException ;
184+
164185}
0 commit comments