🆕 #2260【小程序】增加自定义组件之撤销商品审核的接口
This commit is contained in:
@@ -35,4 +35,7 @@ public interface WxMaShopSpuService {
|
|||||||
|
|
||||||
WxMaShopBaseResponse delistingSpu(Integer productId, String outProductId)
|
WxMaShopBaseResponse delistingSpu(Integer productId, String outProductId)
|
||||||
throws WxErrorException;
|
throws WxErrorException;
|
||||||
|
|
||||||
|
WxMaShopBaseResponse deleteAudit(Integer productId, String outProductId)
|
||||||
|
throws WxErrorException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package cn.binarywang.wx.miniapp.api.impl;
|
package cn.binarywang.wx.miniapp.api.impl;
|
||||||
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_ADD_URL;
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_DELISTING_URL;
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_DEL_URL;
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_GET_LIST_URL;
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_GET_URL;
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_LISTING_URL;
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_UPDATE_URL;
|
|
||||||
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.SPU_UPDATE_WITHOUT_URL;
|
|
||||||
|
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaShopSpuService;
|
import cn.binarywang.wx.miniapp.api.WxMaShopSpuService;
|
||||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopSpuInfo;
|
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopSpuInfo;
|
||||||
@@ -28,6 +19,8 @@ import me.chanjar.weixin.common.error.WxErrorException;
|
|||||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||||
import me.chanjar.weixin.common.util.json.GsonParser;
|
import me.chanjar.weixin.common.util.json.GsonParser;
|
||||||
|
|
||||||
|
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Shop.Spu.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author boris
|
* @author boris
|
||||||
*/
|
*/
|
||||||
@@ -131,4 +124,17 @@ public class WxMaShopSpuServiceImpl implements WxMaShopSpuService {
|
|||||||
}
|
}
|
||||||
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
|
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxMaShopBaseResponse deleteAudit(Integer productId, String outProductId)
|
||||||
|
throws WxErrorException {
|
||||||
|
String responseContent = this.wxMaService
|
||||||
|
.post(DEL_AUDIT_URL, GsonHelper.buildJsonObject("product_id", productId,
|
||||||
|
"out_product_id", outProductId));
|
||||||
|
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||||
|
if (jsonObject.get(ERR_CODE).getAsInt() != 0) {
|
||||||
|
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
|
||||||
|
}
|
||||||
|
return WxMaGsonBuilder.create().fromJson(responseContent, WxMaShopBaseResponse.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,6 +311,7 @@ public class WxMaApiUrlConstants {
|
|||||||
String SPU_UPDATE_WITHOUT_URL = "https://api.weixin.qq.com/shop/spu/update_without_audit";
|
String SPU_UPDATE_WITHOUT_URL = "https://api.weixin.qq.com/shop/spu/update_without_audit";
|
||||||
String SPU_LISTING_URL = "https://api.weixin.qq.com/shop/spu/listing";
|
String SPU_LISTING_URL = "https://api.weixin.qq.com/shop/spu/listing";
|
||||||
String SPU_DELISTING_URL = "https://api.weixin.qq.com/shop/spu/delisting";
|
String SPU_DELISTING_URL = "https://api.weixin.qq.com/shop/spu/delisting";
|
||||||
|
String DEL_AUDIT_URL = "https://api.weixin.qq.com/shop/spu/del_audit";
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Order {
|
interface Order {
|
||||||
|
|||||||
Reference in New Issue
Block a user