Commit d93c6a5d by fanjiaxin

修改为定向计划

parent 4ec30ea6
Pipeline #71799 passed with stages
in 1 minute 2 seconds
......@@ -44,7 +44,7 @@ public class WeChatShopPromoteProductDetailRequest implements IWeChatRequest {
*/
public WeChatPromoteProductDetailVO handle(String shopAppid, Long productId) {
WeChatPromoteProductDetailBO params = WeChatPromoteProductDetailBO.builder()
.plan_type(ProductPlanTypeEnum.OPEN.getCode())
.plan_type(ProductPlanTypeEnum.TARGET.getCode())
.shop_appid(shopAppid)
.product_id(productId)
.build();
......
package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import com.alibaba.fastjson.JSON;
import com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig;
import com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi;
import com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder;
......@@ -45,64 +44,11 @@ public class WeChatShopPromoteProductListRequest implements IWeChatRequest {
*/
public WeChatPromoteProductListVO handle(String keyword, String nextKey, Integer pageSize) {
WeChatPromoteProductListBO params = WeChatPromoteProductListBO.builder()
.plan_type(ProductPlanTypeEnum.OPEN.getCode())
.plan_type(ProductPlanTypeEnum.TARGET.getCode())
.keyword(keyword)
.next_key(nextKey)
.page_size(pageSize)
.build();
return weChatRestTemplateHandler.execute(getRequestUrl(), getRequestMethod(), params, WeChatPromoteProductListVO.class);
}
public static void main(String[] args) {
String resultJson = "{\n" +
" \"errcode\": 0,\n" +
" \"errmsg\": \"ok\",\n" +
" \"product_list\": [\n" +
" {\n" +
" \"product_id\": \"10000032169520\",\n" +
" \"shop_appid\": \"wxdad237db7677c305\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000157865162\",\n" +
" \"shop_appid\": \"wx015b4279a9e8f6fa\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000018293357\",\n" +
" \"shop_appid\": \"wxe0aa3c442f854635\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000129786349\",\n" +
" \"shop_appid\": \"wx55ea53cbc4855c21\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000168454112\",\n" +
" \"shop_appid\": \"wxf69920284f28bbe3\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000029788412\",\n" +
" \"shop_appid\": \"wx31f74421a0acf076\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000143496444\",\n" +
" \"shop_appid\": \"wx15aa8d178f9946ca\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000134193908\",\n" +
" \"shop_appid\": \"wx2e8388eeeea714de\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000144234386\",\n" +
" \"shop_appid\": \"wxd4c232e8fe49f909\"\n" +
" },\n" +
" {\n" +
" \"product_id\": \"10000076193764\",\n" +
" \"shop_appid\": \"wx66b0a1ddf47badf0\"\n" +
" }\n" +
" ],\n" +
" \"next_key\": \"CAoQChoWChQxMDAwMDAzMjk3MjY4MzM3NDMzMw==\"\n" +
"}";
WeChatPromoteProductListVO productListVO = JSON.parseObject(resultJson, WeChatPromoteProductListVO.class);
System.err.println(JSON.toJSONString(productListVO));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment