|
5 | 5 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Delivery.GET_DELIVERY_COMPANY_URL; |
6 | 6 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.ACCEPT_ADDRESS_MODIFY_URL; |
7 | 7 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.DECODE_SENSITIVE_INFO_URL; |
| 8 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.DELIVERY_COMPENSATION_URL; |
8 | 9 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.ORDER_GET_URL; |
9 | 10 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.ORDER_LIST_URL; |
10 | 11 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.ORDER_SEARCH_URL; |
| 12 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.PRE_SHIPMENT_CHANGE_SKU_APPROVE_URL; |
| 13 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.PRE_SHIPMENT_CHANGE_SKU_GET_URL; |
| 14 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.PRE_SHIPMENT_CHANGE_SKU_REJECT_URL; |
| 15 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.PRESENT_NOTE_ADD_URL; |
| 16 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.PRESENT_SUB_ORDER_GET_URL; |
| 17 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.REAL_NUMBER_APPLY_URL; |
| 18 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.REAL_NUMBER_VIEW_AUDIT_GET_URL; |
11 | 19 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.REJECT_ADDRESS_MODIFY_URL; |
12 | 20 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.UPDATE_ADDRESS_URL; |
13 | 21 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.UPDATE_EXPRESS_URL; |
14 | 22 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.UPDATE_PRICE_URL; |
15 | 23 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.UPDATE_REMARK_URL; |
16 | 24 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.UPLOAD_FRESH_INSPECT_URL; |
| 25 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.VIRTUAL_NUMBER_APPLY_AGAIN_URL; |
| 26 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.VIRTUAL_NUMBER_DELAY_URL; |
17 | 27 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Order.VIRTUAL_TEL_NUMBER_URL; |
| 28 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.PrivateNumber.ADD_PHONE_URL; |
| 29 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.PrivateNumber.GET_PHONE_URL; |
| 30 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.PrivateNumber.SEND_VERIFY_CODE_URL; |
18 | 31 |
|
19 | 32 | import java.util.List; |
20 | 33 | import lombok.extern.slf4j.Slf4j; |
|
30 | 43 | import me.chanjar.weixin.channel.bean.order.DecodeSensitiveInfoResponse; |
31 | 44 | import me.chanjar.weixin.channel.bean.order.DeliveryUpdateParam; |
32 | 45 | import me.chanjar.weixin.channel.bean.order.OrderAddressParam; |
| 46 | +import me.chanjar.weixin.channel.bean.order.OrderCompensationDeliveryParam; |
33 | 47 | import me.chanjar.weixin.channel.bean.order.OrderIdParam; |
34 | 48 | import me.chanjar.weixin.channel.bean.order.OrderInfoParam; |
35 | 49 | import me.chanjar.weixin.channel.bean.order.OrderInfoResponse; |
|
38 | 52 | import me.chanjar.weixin.channel.bean.order.OrderPriceParam; |
39 | 53 | import me.chanjar.weixin.channel.bean.order.OrderRemarkParam; |
40 | 54 | import me.chanjar.weixin.channel.bean.order.OrderSearchParam; |
| 55 | +import me.chanjar.weixin.channel.bean.order.PreShipmentChangeSkuRejectParam; |
| 56 | +import me.chanjar.weixin.channel.bean.order.PreShipmentChangeSkuResponse; |
| 57 | +import me.chanjar.weixin.channel.bean.order.PresentNoteAddParam; |
| 58 | +import me.chanjar.weixin.channel.bean.order.PresentSubOrderResponse; |
| 59 | +import me.chanjar.weixin.channel.bean.order.PrivateNumberAddPhoneParam; |
| 60 | +import me.chanjar.weixin.channel.bean.order.PrivateNumberGetPhoneResponse; |
| 61 | +import me.chanjar.weixin.channel.bean.order.PrivateNumberSendVerifyCodeParam; |
| 62 | +import me.chanjar.weixin.channel.bean.order.RealNumberViewAuditResponse; |
41 | 63 | import me.chanjar.weixin.channel.bean.order.VirtualTelNumberResponse; |
42 | 64 | import me.chanjar.weixin.channel.util.ResponseUtils; |
43 | 65 | import me.chanjar.weixin.common.error.WxErrorException; |
@@ -178,4 +200,95 @@ public DecodeSensitiveInfoResponse decodeSensitiveInfo(String orderId) throws Wx |
178 | 200 | String resJson = shopService.post(DECODE_SENSITIVE_INFO_URL, reqJson); |
179 | 201 | return ResponseUtils.decode(resJson, DecodeSensitiveInfoResponse.class); |
180 | 202 | } |
| 203 | + |
| 204 | + @Override |
| 205 | + public WxChannelBaseResponse addPresentNote(String orderId, String note) throws WxErrorException { |
| 206 | + PresentNoteAddParam param = new PresentNoteAddParam(orderId, note); |
| 207 | + String resJson = shopService.post(PRESENT_NOTE_ADD_URL, param); |
| 208 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 209 | + } |
| 210 | + |
| 211 | + @Override |
| 212 | + public PresentSubOrderResponse getPresentSubOrders(String orderId) throws WxErrorException { |
| 213 | + OrderIdParam param = new OrderIdParam(orderId); |
| 214 | + String resJson = shopService.post(PRESENT_SUB_ORDER_GET_URL, param); |
| 215 | + return ResponseUtils.decode(resJson, PresentSubOrderResponse.class); |
| 216 | + } |
| 217 | + |
| 218 | + @Override |
| 219 | + public PreShipmentChangeSkuResponse getPreShipmentChangeSku(String orderId) throws WxErrorException { |
| 220 | + OrderIdParam param = new OrderIdParam(orderId); |
| 221 | + String resJson = shopService.post(PRE_SHIPMENT_CHANGE_SKU_GET_URL, param); |
| 222 | + return ResponseUtils.decode(resJson, PreShipmentChangeSkuResponse.class); |
| 223 | + } |
| 224 | + |
| 225 | + @Override |
| 226 | + public WxChannelBaseResponse approvePreShipmentChangeSku(String orderId) throws WxErrorException { |
| 227 | + OrderIdParam param = new OrderIdParam(orderId); |
| 228 | + String resJson = shopService.post(PRE_SHIPMENT_CHANGE_SKU_APPROVE_URL, param); |
| 229 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 230 | + } |
| 231 | + |
| 232 | + @Override |
| 233 | + public WxChannelBaseResponse rejectPreShipmentChangeSku(String orderId, String rejectReason) |
| 234 | + throws WxErrorException { |
| 235 | + PreShipmentChangeSkuRejectParam param = new PreShipmentChangeSkuRejectParam(orderId, rejectReason); |
| 236 | + String resJson = shopService.post(PRE_SHIPMENT_CHANGE_SKU_REJECT_URL, param); |
| 237 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 238 | + } |
| 239 | + |
| 240 | + @Override |
| 241 | + public WxChannelBaseResponse applyRealNumber(String orderId) throws WxErrorException { |
| 242 | + OrderIdParam param = new OrderIdParam(orderId); |
| 243 | + String resJson = shopService.post(REAL_NUMBER_APPLY_URL, param); |
| 244 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 245 | + } |
| 246 | + |
| 247 | + @Override |
| 248 | + public RealNumberViewAuditResponse getRealNumberViewAudit(String orderId) throws WxErrorException { |
| 249 | + OrderIdParam param = new OrderIdParam(orderId); |
| 250 | + String resJson = shopService.post(REAL_NUMBER_VIEW_AUDIT_GET_URL, param); |
| 251 | + return ResponseUtils.decode(resJson, RealNumberViewAuditResponse.class); |
| 252 | + } |
| 253 | + |
| 254 | + @Override |
| 255 | + public WxChannelBaseResponse applyVirtualNumberAgain(String orderId) throws WxErrorException { |
| 256 | + OrderIdParam param = new OrderIdParam(orderId); |
| 257 | + String resJson = shopService.post(VIRTUAL_NUMBER_APPLY_AGAIN_URL, param); |
| 258 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 259 | + } |
| 260 | + |
| 261 | + @Override |
| 262 | + public WxChannelBaseResponse delayVirtualNumber(String orderId) throws WxErrorException { |
| 263 | + OrderIdParam param = new OrderIdParam(orderId); |
| 264 | + String resJson = shopService.post(VIRTUAL_NUMBER_DELAY_URL, param); |
| 265 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 266 | + } |
| 267 | + |
| 268 | + @Override |
| 269 | + public WxChannelBaseResponse addPrivatePhone(String phone) throws WxErrorException { |
| 270 | + PrivateNumberAddPhoneParam param = new PrivateNumberAddPhoneParam(phone); |
| 271 | + String resJson = shopService.post(ADD_PHONE_URL, param); |
| 272 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 273 | + } |
| 274 | + |
| 275 | + @Override |
| 276 | + public WxChannelBaseResponse sendPrivatePhoneVerifyCode(String phone) throws WxErrorException { |
| 277 | + PrivateNumberSendVerifyCodeParam param = new PrivateNumberSendVerifyCodeParam(phone); |
| 278 | + String resJson = shopService.post(SEND_VERIFY_CODE_URL, param); |
| 279 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 280 | + } |
| 281 | + |
| 282 | + @Override |
| 283 | + public PrivateNumberGetPhoneResponse getPrivatePhone() throws WxErrorException { |
| 284 | + String resJson = shopService.post(GET_PHONE_URL, "{}"); |
| 285 | + return ResponseUtils.decode(resJson, PrivateNumberGetPhoneResponse.class); |
| 286 | + } |
| 287 | + |
| 288 | + @Override |
| 289 | + public WxChannelBaseResponse compensationDelivery(OrderCompensationDeliveryParam param) |
| 290 | + throws WxErrorException { |
| 291 | + String resJson = shopService.post(DELIVERY_COMPENSATION_URL, param); |
| 292 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 293 | + } |
181 | 294 | } |
0 commit comments