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