admin
2019-08-03 efd965b02d6ca3c1506d027feb27c95a36a33ea0
智能推荐增加拼多多/京东链接
13个文件已修改
242 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5StrategyPictureController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/goods/taobao/dataoke/DaTaoKeGoodsDetailV2Dao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/taobao/dataoke/DaTaoKeDetailV2.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/xcx/StrategyPicture.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/StrategyPictureMapper.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/dataoke/DaTaoKeGoodsDetailV2ServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/StrategyPictureImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/StrategyPictureService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoUtil.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -27,6 +27,7 @@
import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.goods.CommonGoods;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.taobao.SearchFilter;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
@@ -50,6 +51,7 @@
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.Utils;
import com.yeshi.fanli.util.cache.TaoBaoGoodsCacheUtil;
import com.yeshi.fanli.util.factory.CommonGoodsFactory;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.jd.JDApiUtil;
import com.yeshi.fanli.util.jd.JDUtil;
@@ -118,8 +120,8 @@
            out.print(JsonUtil.loadFalseResult("值为空"));
            return;
        }
        //去除前后空格
        text=text.trim();
        // 去除前后空格
        text = text.trim();
        if (text.length() > 256) {
            out.print(JsonUtil.loadFalseResult("值过长"));
@@ -159,6 +161,7 @@
            return;
        }
        CommonGoods commonGoods = null;
        text = matcher.group();
        if (text.contains("ju.taobao.com") || text.contains(".juhuasuan.com")) {// 聚划算
            int index = text.indexOf("item_id");
@@ -191,26 +194,55 @@
            }
        } else {
            tb = TaoBaoUtil.parsePhoneShareUrlByTB(text);
            if (tb == null)// 淘宝是空值
            {
                String jdId = JDUtil.getJDGoodsId(text);
                if (!StringUtil.isNullOrEmpty(jdId)) {
                    JDGoods goods = JDApiUtil.getGoodsDetail(Long.parseLong(jdId));
                    if (goods != null)
                        commonGoods = CommonGoodsFactory.create(goods);
                } else {
                    String pddId = PinDuoDuoUtil.getPDDGoodsId(text);
                    if (!StringUtil.isNullOrEmpty(pddId)) {
                        PDDGoodsDetail goods = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(pddId));
                        if (goods != null)
                            commonGoods = CommonGoodsFactory.create(goods);
                    }
                }
            }
        }
        if (tb == null) {
        if (tb == null && commonGoods == null) {
            out.println(JsonUtil.loadFalseResult("暂未找到该商品,请稍后再试!"));
            return;
        }
        if (tb != null) {
            commonGoods = new CommonGoods();
            commonGoods.setPrice(tb.getZkPrice());
            commonGoods.setTitle(tb.getTitle());
            commonGoods.setGoodsId(tb.getAuctionId());
            commonGoods.setGoodsType(Constant.SOURCE_TYPE_TAOBAO);
            commonGoods.setPicture(tb.getPictUrl());
        }
        JSONObject data = new JSONObject();
        JSONObject taoBaoGoodsJSON = new JSONObject();
        taoBaoGoodsJSON.put("title", tb.getTitle());
        taoBaoGoodsJSON.put("zkPrice", tb.getZkPrice());
        taoBaoGoodsJSON.put("id", tb.getAuctionId());
        taoBaoGoodsJSON.put("goodsType", Constant.SOURCE_TYPE_TAOBAO);
        taoBaoGoodsJSON.put("url", "http://item.taobao.com/item.htm?id=" + tb.getAuctionId());
        data.put("goods", taoBaoGoodsJSON);
        if (!StringUtil.isNullOrEmpty(tb.getPictUrl())) {
            if (tb.getImgList() == null)
                tb.setImgList(new ArrayList<>());
            tb.getImgList().add(0, TbImgUtil.getTBSize220Img(tb.getPictUrl()));
        taoBaoGoodsJSON.put("title", commonGoods.getTitle());
        taoBaoGoodsJSON.put("zkPrice", commonGoods.getPrice() + "");
        taoBaoGoodsJSON.put("id", commonGoods.getGoodsId());
        taoBaoGoodsJSON.put("goodsType", commonGoods.getGoodsType());
        if (commonGoods.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) {
            taoBaoGoodsJSON.put("url", "http://item.taobao.com/item.htm?id=" + commonGoods.getGoodsId());
        } else if (commonGoods.getGoodsType() == Constant.SOURCE_TYPE_JD) {
            taoBaoGoodsJSON.put("url", String.format("https://item.jd.com/%s.html", commonGoods.getGoodsId() + ""));
        } else if (commonGoods.getGoodsType() == Constant.SOURCE_TYPE_PDD) {
            taoBaoGoodsJSON.put("url", "http://yangkeduo.com/goods.html?goods_id=" + commonGoods.getGoodsId());
        }
        data.put("imgs", tb.getImgList());
        data.put("goods", taoBaoGoodsJSON);
        List<String> picList = new ArrayList<>();
        picList.add(commonGoods.getPicture());
        data.put("imgs", picList);
        JSONObject root = new JSONObject();
        root.put("type", 1);
        root.put("data", data);
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5StrategyPictureController.java
@@ -63,7 +63,7 @@
    @RequestMapping(value = "getStrategyPictureList")
    public void strategyPicture(String callback, AcceptData acceptData, PrintWriter out) {
        List<StrategyPicture> list = strategtPictureService.getStrategyPictureListCache();
        List<StrategyPicture> list = strategtPictureService.getTextStrategyPictureListCache();
        Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
        if (StringUtil.isNullOrEmpty(callback)) {
            List<StrategyPicture> newList = new ArrayList<StrategyPicture>();
fanli/src/main/java/com/yeshi/fanli/dao/goods/taobao/dataoke/DaTaoKeGoodsDetailV2Dao.java
@@ -3,6 +3,7 @@
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
@@ -47,6 +48,7 @@
    }
    public void saveWithCommision(DaTaoKeDetailV2 v2) {
        v2.setUpdateTime(new Date());
        BigDecimal commision = MoneyBigDecimalUtil
                .div(MoneyBigDecimalUtil.mul(v2.getActualPrice(), v2.getCommissionRate()), new BigDecimal(100));
        int commissionInt = commision.multiply(new BigDecimal(100)).intValue();
fanli/src/main/java/com/yeshi/fanli/entity/taobao/dataoke/DaTaoKeDetailV2.java
@@ -9,7 +9,7 @@
import org.springframework.data.mongodb.core.mapping.Field;
@Document(collection = "daTaoKeGoods")
public class DaTaoKeDetailV2 implements Serializable{
public class DaTaoKeDetailV2 implements Serializable {
    /**
     * 
     */
@@ -57,7 +57,7 @@
    @Field
    private Integer activityType;// 活动类型,1-无活动,2-淘抢购,3-聚划算
    @Field
    private String createTime;// 商品创建时间
    private Date createTime;// 商品创建时间
    @Field
    private String mainPic;// 商品主图链接
    @Field
@@ -102,7 +102,7 @@
    private Integer tbcid;// 商品在淘宝的二级分类id ,非大淘客的二级分类
    @Field
    private Date updateTime;
    //额外字段维护
    // 额外字段维护
    @Field
    private Integer commission;// 佣金金额,单位为分
@@ -290,11 +290,11 @@
        this.activityType = activityType;
    }
    public String getCreateTime() {
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(String createTime) {
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
fanli/src/main/java/com/yeshi/fanli/entity/xcx/StrategyPicture.java
@@ -11,6 +11,10 @@
@Table("ye_yeshi_strategy_picture")
public class StrategyPicture {
    public static int TYPE_TEXT = 1;
    public static int TYPE_VIDEO = 2;
    @Expose
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
@@ -31,6 +35,30 @@
    @Column(name = "orderBy")
    private Integer orderBy;
    @Expose
    @Column(name = "type")
    private Integer type;
    @Expose
    @Column(name = "video_url")
    private String videoUrl;
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public String getVideoUrl() {
        return videoUrl;
    }
    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }
    public String getPostPicture() {
        return postPicture;
    }
fanli/src/main/java/com/yeshi/fanli/mapping/StrategyPictureMapper.xml
@@ -9,32 +9,29 @@
        <result column="post_picture" property="postPicture" jdbcType="VARCHAR" />
        <result column="title" property="title" jdbcType="VARCHAR" />
        <result column="orderBy" property="orderBy" jdbcType="INTEGER" />
        <result column="type" property="type" jdbcType="INTEGER" />
        <result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">id,strategyPicture,post_picture,title,orderBy</sql>
    <sql id="Base_Column_List">id,strategyPicture,post_picture,title,orderBy,type,video_url
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from ye_yeshi_strategy_picture where id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectStrategyPictureList" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from ye_yeshi_strategy_picture order by orderBy desc
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        ye_yeshi_strategy_picture where id = #{id,jdbcType=BIGINT}
    </delete>
        ye_yeshi_strategy_picture where id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture"
        useGeneratedKeys="true" keyProperty="id">insert into
        ye_yeshi_strategy_picture
        (id,strategyPicture,post_picture,title,orderBy) values
        (#{id,jdbcType=BIGINT},#{strategyPicture,jdbcType=VARCHAR},#{postPicture,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{orderBy,jdbcType=INTEGER})
        (id,strategyPicture,post_picture,title,orderBy,type,video_url) values
        (#{id,jdbcType=BIGINT},#{strategyPicture,jdbcType=VARCHAR},#{postPicture,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{orderBy,jdbcType=INTEGER},#{type,jdbcType=INTEGER},#{videoUrl,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture"
        useGeneratedKeys="true" keyProperty="id">
@@ -45,6 +42,8 @@
            <if test="postPicture != null">post_picture,</if>
            <if test="title != null">title,</if>
            <if test="orderBy != null">orderBy,</if>
            <if test="type != null">type,</if>
            <if test="videoUrl != null">video_url,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -53,15 +52,17 @@
            <if test="postPicture != null">#{postPicture,jdbcType=VARCHAR},</if>
            <if test="title != null">#{title,jdbcType=VARCHAR},</if>
            <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if>
            <if test="type != null">#{type,jdbcType=INTEGER},</if>
            <if test="videoUrl != null">#{videoUrl,jdbcType=VARCHAR}</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture">update
        ye_yeshi_strategy_picture set strategyPicture =
        #{strategyPicture,jdbcType=VARCHAR},post_picture =
        #{postPicture,jdbcType=VARCHAR},title =
        #{title,jdbcType=VARCHAR},orderBy = #{orderBy,jdbcType=INTEGER} where
        id = #{id,jdbcType=BIGINT}
    </update>
        #{title,jdbcType=VARCHAR},orderBy = #{orderBy,jdbcType=INTEGER} ,type
        =#{type,jdbcType=INTEGER} ,video_url =#{videoUrl,jdbcType=VARCHAR}
        where id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture">
        update ye_yeshi_strategy_picture
        <set>
@@ -69,6 +70,8 @@
            <if test="postPicture != null">post_picture=#{postPicture,jdbcType=VARCHAR},</if>
            <if test="title != null">title=#{title,jdbcType=VARCHAR},</if>
            <if test="orderBy != null">orderBy=#{orderBy,jdbcType=INTEGER},</if>
            <if test="type !=null">type =#{type,jdbcType=INTEGER},</if>
            <if test="videoUrl !=null">video_url =#{videoUrl,jdbcType=VARCHAR},</if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java
@@ -372,7 +372,7 @@
        JSONObject arcMap = new JSONObject();
        String indexArc = "index_arc";
        if (VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion()))
        if (VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion()))
            indexArc = "index_arc_1.6.0";
        else if (VersionUtil.greaterThan_1_5_70(acceptData.getPlatform(), acceptData.getVersion()))
            indexArc = "index_arc_1.5.7";
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -522,9 +522,9 @@
            }
            // 分享、邀请 隐藏订单号
            if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType || HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType
                    || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType
                    || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) {
            if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType || HongBaoV2.TYPE_YAOQING == hongBaoType
                    || HongBaoV2.TYPE_YIJI == hongBaoType || HongBaoV2.TYPE_ERJI == hongBaoType
                    || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) {
                order.setOrderNo(UserUtil.filterOrderId(order.getOrderNo()));
            }
        }
@@ -752,16 +752,6 @@
                commonOrderGoodsMapper.insertSelective(cog);
                newCommonOrder.setCommonOrderGoods(cog);
            } else {
                if (!Constant.IS_OUTNET) {
                    PDDGoodsDetail pddGoods = null;
                    pddGoods = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(cog.getGoodsId()));
                    if (pddGoods != null) {
                        cog = CommonOrderGoodsFactory.create(pddGoods);
                        commonGoodsList.get(0).setPicture(cog.getPicture());
                        commonOrderGoodsMapper.updateByPrimaryKeySelective(commonGoodsList.get(0));
                    }
                }
            }
            newCommonOrder.setUserInfo(new UserInfo(uid));
            commonOrderList.add(addCommonOrder(newCommonOrder));
@@ -807,6 +797,9 @@
            if (commonGoodsList.size() <= 0)// 不存在就插入商品
            {
                JDGoods goods = JDApiUtil.getGoodsDetail(itemOrder.getSkuId());
                if (goods == null) {
                    goods = JDUtil.getGoodsFromWeb(itemOrder.getSkuId());
                }
                if (goods != null) {
                    cog = CommonOrderGoodsFactory.create(goods);
@@ -815,14 +808,7 @@
                cog.setUpdateTime(new Date());
                commonOrderGoodsMapper.insertSelective(cog);
            } else {
                if (!Constant.IS_OUTNET) {
                    JDGoods goods = JDApiUtil.getGoodsDetail(itemOrder.getSkuId());
                    if(goods==null)
                        goods=JDUtil.getGoodsFromWeb(itemOrder.getSkuId());
                    commonGoodsList.get(0).setTitle(goods.getSkuName());
                    commonGoodsList.get(0).setPicture(goods.getPicUrl());
                    commonOrderGoodsMapper.updateByPrimaryKeySelective(commonGoodsList.get(0));
                }
            }
            newCommonOrder.setUserInfo(new UserInfo(uid));
            commonOrderList.add(addCommonOrder(newCommonOrder));
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/dataoke/DaTaoKeGoodsDetailV2ServiceImpl.java
@@ -22,8 +22,6 @@
import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
import com.yeshi.fanli.util.BeanUtil;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
@@ -47,7 +45,13 @@
        while (result.getGoodsList() != null && result.getGoodsList().size() > 0) {
            System.out.println(page++);
            for (DaTaoKeDetailV2 v2 : result.getGoodsList())
                daTaoKeGoodsDetailV2Dao.saveWithCommision(v2);
            {
                try {
                    daTaoKeGoodsDetailV2Dao.saveWithCommision(v2);
                } catch (Exception e) {
                }
            }
            result = DaTaoKeApiUtil.listAll(result.getPageId());
            try {
                Thread.sleep(10);
@@ -99,7 +103,7 @@
        String startTime = null;
        DaTaoKeDetailV2 latest = daTaoKeGoodsDetailV2Dao.selectLatest();
        if (latest != null) {
            startTime = latest.getCreateTime();
            startTime =TimeUtil.getGernalTime(latest.getCreateTime().getTime(),"yyyy-MM-dd HH:mm:ss");
        }
        DaTaoKeGoodsResult result = DaTaoKeApiUtil.getNewGoodsList(null, startTime, null);
        while (!StringUtil.isNullOrEmpty(result.getPageId())) {
fanli/src/main/java/com/yeshi/fanli/service/impl/user/StrategyPictureImpl.java
@@ -25,8 +25,27 @@
    }
    @Override
    public List<StrategyPicture> getStrategyPictureListCache() {
        return strategyPictureMapper.selectStrategyPictureList();
    public List<StrategyPicture> getTextStrategyPictureListCache() {
        List<StrategyPicture> list = strategyPictureMapper.selectStrategyPictureList();
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).getType() != StrategyPicture.TYPE_TEXT) {
                list.remove(i);
                i--;
            }
        }
        return list;
    }
    @Override
    public List<StrategyPicture> getVideoStrategyPictureListCache() {
        List<StrategyPicture> list = strategyPictureMapper.selectStrategyPictureList();
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).getType() != StrategyPicture.TYPE_VIDEO) {
                list.remove(i);
                i--;
            }
        }
        return list;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/inter/user/StrategyPictureService.java
@@ -8,6 +8,8 @@
    String strategyPictureList(Long id);
    List<StrategyPicture> getStrategyPictureListCache();
    List<StrategyPicture> getTextStrategyPictureListCache();
    List<StrategyPicture> getVideoStrategyPictureListCache();
}
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
@@ -524,5 +524,28 @@
        return null;
    }
    public static String getJDGoodsId(String url) {
        try {
            if (url.startsWith("https://item.m.jd.com/product/") || url.startsWith("http://item.m.jd.com/product/")
                    || url.startsWith("https://item.jd.com/") || url.startsWith("http://item.jd.com/")) {
                String preUrl = url.split("\\?")[0];
                String index = preUrl.split("/")[preUrl.split("/").length - 1];
                index = index.split("\\.")[0];
                return index.trim();
            } else if (url.startsWith("https://item.m.jd.com/ware/view.action?")) {
                String preUrl = url.substring(url.indexOf("?") + 1, url.length());
                String[] sts = preUrl.split("&");
                for (String st : sts) {
                    if (st.startsWith("wareId=")) {
                        return st.split("=")[1].trim();
                    }
                }
            }
        } catch (Exception e) {
        }
        return null;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoUtil.java
@@ -477,4 +477,23 @@
        return goods;
    }
    public static String getPDDGoodsId(String url) {
        try {
            if (url.startsWith("https://mobile.yangkeduo.com/goods.html?")
                    || url.startsWith("http://mobile.yangkeduo.com/goods.html?")||url.contains("yangkeduo.com/duo_coupon_landing.html?")) {
                String preUrl = url.substring(url.indexOf("?") + 1, url.length());
                String[] sts = preUrl.split("&");
                for (String st : sts) {
                    if (st.startsWith("goods_id=")) {
                        return st.split("=")[1].trim();
                    }
                }
            }
        } catch (Exception e) {
        }
        return null;
    }
}