Commit 75939f704cce634cf8cc010535d225e2e384c052

Authored by 郑超
1 parent 50d2705f

update

src/main/java/com/cnlive/shenhe/api/VideosControllerApi.java
... ... @@ -19,7 +19,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
19 19 import org.springframework.web.bind.annotation.ResponseBody;
20 20  
21 21 import java.net.URLEncoder;
22   -import java.util.Date;
23 22 import java.util.HashMap;
24 23 import java.util.List;
25 24 import java.util.Map;
... ... @@ -208,14 +207,14 @@ public class VideosControllerApi {
208 207 public ShyVideos avsample(ShyVideos video) {
209 208 try {
210 209 JSONObject params = new JSONObject();
211   - String video_url = video.getVideo_url();
  210 + String videoUrl = video.getVideo_url();
212 211 Integer plat = video.getPlat();
213 212 String bucket = video.getBucket();
214 213 Integer spid = video.getSpid();
215 214  
216   - String path = video_url.replace("//", "");
  215 + String path = videoUrl.replace("//", "");
217 216 path = path.substring(path.indexOf("/"), path.length());
218   - String domian = video_url.replace(path, "");
  217 + String domainName = videoUrl.replace(path, "");
219 218 path = "/" + bucket + path;
220 219  
221 220 JSONObject attach = new JSONObject();
... ... @@ -249,7 +248,7 @@ public class VideosControllerApi {
249 248 }
250 249 }
251 250 logger.info("抽帧attach参数:attach:{}", attach);
252   - extParam.put("domain", domian);
  251 + extParam.put("domain", domainName);
253 252 if (CommonConst.KS_PLAT == plat) {
254 253 //金山
255 254 params.put("plat", 0);
... ... @@ -270,7 +269,7 @@ public class VideosControllerApi {
270 269 params.put("attach", attach);
271 270 params.put("extParam", extParam);
272 271 logger.info("抽帧params参数:params:{}", params);
273   - long timestamp = new Date().getTime();
  272 + long timestamp = System.currentTimeMillis();
274 273 String sign = CommonUtils.md5(URLEncoder.encode(appkey + timestamp + params.toJSONString() + appSecret, "utf-8"));
275 274 Map<String, String> dataMap = new HashMap<>();
276 275 dataMap.put("timestamp", timestamp + "");
... ...