Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
| | |
| | | @RequestMapping(value = "getGoodsDetail", method = RequestMethod.GET)
|
| | | public void getGoodsDetail(final AcceptData acceptData, final String id, String tid, String uid, String callback,
|
| | | PrintWriter out) {
|
| | | if (!StringUtil.isNullOrEmpty(uid))
|
| | | uid = uid.replace(" ", "+");
|
| | |
|
| | | LogHelper.shareGoods("分享出去的H5访问: uid:" + uid + " id:" + id);
|
| | | long begin = java.lang.System.currentTimeMillis();
|
| | | if (StringUtil.isNullOrEmpty(id)) {
|
| | |
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.apache.log4j.Logger;
|
| | |
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
| | | import org.apache.http.util.EntityUtils;
|
| | | import org.yeshi.utils.entity.ProxyIP;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class HttpUtil {
|
| | |
| | | private static String getShortLink3(String url) {
|
| | | try {
|
| | | String totalUrl = String.format(
|
| | | "http://api.ft12.com/api.php?format=json&url=%s&apikey=Lqh4eXURkvKhbboXwz@ddd",
|
| | | "http://h5.flq001.com/short/createShort?url=%s",
|
| | | URLEncoder.encode(url, "UTF-8"));
|
| | | String result = get(totalUrl, null);
|
| | | JSONObject data = JSONObject.fromObject(result);
|
| | | return data.optString("url");
|
| | | return data.optString("short_url");
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|