| | |
| | | package com.yeshi.fanli.util.factory;
|
| | |
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class JumpDetailParamsFactory {
|
| | |
|
| | | /**
|
| | | * 百川的跳转参数
|
| | | * |
| | | * @param clientTBPid
|
| | | * @param url
|
| | | * @return
|
| | | */
|
| | | public static String createWEEXParams(ClientTBPid clientTBPid, String url) {
|
| | | JSONObject data = new JSONObject();
|
| | | if (clientTBPid != null)
|
| | | data.put("tbPidInfo", JsonUtil.getGson().toJson(clientTBPid));
|
| | | data.put("url", url);
|
| | | return data.toString();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 百川的跳转参数
|
| | | * |
| | | * @param clientTBPid
|
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public static String createWEEXParams(ClientTBPid clientTBPid, Long auctionId) {
|
| | | JSONObject data = new JSONObject();
|
| | | if (clientTBPid != null)
|
| | | data.put("tbPidInfo", JsonUtil.getGson().toJson(clientTBPid));
|
| | | data.put("id", auctionId);
|
| | | return data.toString();
|
| | | }
|
| | |
|
| | | /**
|
| | | * web的跳转参数
|
| | | * |
| | | * @param clientTBPid
|
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public static String createWEBParams(String url) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("url", url);
|
| | | return data.toString();
|
| | | }
|
| | |
|
| | | /**
|
| | | * weex的跳转参数
|
| | | * |
| | | * @param clientTBPid
|
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public static String createWEEXParams(String url) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("url", url);
|
| | | return data.toString();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 商品详情的跳转参数
|
| | | * |
| | | * @param clientTBPid
|
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public static String createGoodsParams(ClientTBPid clientTBPid, Long auctionId) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("id", auctionId);
|
| | | return data.toString();
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.util.factory; |
| | | |
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid; |
| | | import org.yeshi.utils.JsonUtil; |
| | | |
| | | import net.sf.json.JSONObject; |
| | | |
| | | public class JumpDetailParamsFactory { |
| | | |
| | | |
| | | /** |
| | | * 百川的跳转参数 |
| | | * |
| | | * @param clientTBPid |
| | | * @param auctionId |
| | | * @return |
| | | */ |
| | | public static String createWEEXParams(ClientTBPid clientTBPid, String auctionId) { |
| | | JSONObject data = new JSONObject(); |
| | | if (clientTBPid != null) |
| | | data.put("tbPidInfo", JsonUtil.getGson().toJson(clientTBPid)); |
| | | data.put("id", auctionId); |
| | | return data.toString(); |
| | | } |
| | | |
| | | /** |
| | | * web的跳转参数 |
| | | * |
| | | * @param url |
| | | * @return |
| | | */ |
| | | public static String createWEBParams(String url) { |
| | | JSONObject data = new JSONObject(); |
| | | data.put("url", url); |
| | | return data.toString(); |
| | | } |
| | | |
| | | /** |
| | | * weex的跳转参数 |
| | | * |
| | | * @param url |
| | | * @return |
| | | */ |
| | | public static String createWEEXParams(String url) { |
| | | JSONObject data = new JSONObject(); |
| | | data.put("url", url); |
| | | return data.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 商品详情的跳转参数 |
| | | * |
| | | * @param goodsType |
| | | * @param auctionId |
| | | * @return |
| | | */ |
| | | public static String createGoodsParams(String auctionId, Integer goodsType) { |
| | | JSONObject data = new JSONObject(); |
| | | data.put("id", auctionId); |
| | | if (goodsType != null) |
| | | data.put("goodsType", goodsType); |
| | | return data.toString(); |
| | | } |
| | | |
| | | } |