|
@@ -31,7 +31,7 @@ public class VideoApiService {
|
|
JSONObject data = res.getJSONObject("data");
|
|
JSONObject data = res.getJSONObject("data");
|
|
return data.getJSONArray("videoCoverImages").toJavaList(String.class);
|
|
return data.getJSONArray("videoCoverImages").toJavaList(String.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("getCoverImagePaths error", e);
|
|
|
|
|
|
+ log.error("VideoApiService getCoverImagePaths error", e);
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
@@ -50,7 +50,7 @@ public class VideoApiService {
|
|
JSONObject res = JSONObject.parseObject(post);
|
|
JSONObject res = JSONObject.parseObject(post);
|
|
return res.getObject("data", WxBaseUserInfoVO.class);
|
|
return res.getObject("data", WxBaseUserInfoVO.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("webLogin error", e);
|
|
|
|
|
|
+ log.error("VideoApiService webLogin error", e);
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
@@ -64,7 +64,7 @@ public class VideoApiService {
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
JSONObject res = JSONObject.parseObject(post);
|
|
JSONObject res = JSONObject.parseObject(post);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("saveUserPhoneNumber error", e);
|
|
|
|
|
|
+ log.error("VideoApiService saveUserPhoneNumber error", e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -82,10 +82,11 @@ public class VideoApiService {
|
|
"&title=" + title +
|
|
"&title=" + title +
|
|
"&viewStatus=1" +
|
|
"&viewStatus=1" +
|
|
"&versionCode=1";
|
|
"&versionCode=1";
|
|
|
|
+ log.info("VideoApiService publishVideo param={}", param);
|
|
String post = httpPoolClient.post(url, param, "application/x-www-form-urlencoded;charset=UTF-8");
|
|
String post = httpPoolClient.post(url, param, "application/x-www-form-urlencoded;charset=UTF-8");
|
|
res = JSONObject.parseObject(post);
|
|
res = JSONObject.parseObject(post);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("publishVideo error", e);
|
|
|
|
|
|
+ log.error("VideoApiService publishVideo error", e);
|
|
}
|
|
}
|
|
if (Objects.isNull(res)) {
|
|
if (Objects.isNull(res)) {
|
|
return null;
|
|
return null;
|
|
@@ -97,7 +98,7 @@ public class VideoApiService {
|
|
}
|
|
}
|
|
JSONObject data = res.getJSONObject("data");
|
|
JSONObject data = res.getJSONObject("data");
|
|
Long videoId = data.getLong("id");
|
|
Long videoId = data.getLong("id");
|
|
- log.info("publishVideo success, uid:{} videoId={}", uid, videoId);
|
|
|
|
|
|
+ log.info("VideoApiService publishVideo success, uid:{} videoId={}", uid, videoId);
|
|
return videoId;
|
|
return videoId;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -121,16 +122,17 @@ public class VideoApiService {
|
|
param.put("price", chargeDetail.getLong("price"));
|
|
param.put("price", chargeDetail.getLong("price"));
|
|
param.put("allowIosPlay", chargeDetail.getLong("allowIosPlay"));
|
|
param.put("allowIosPlay", chargeDetail.getLong("allowIosPlay"));
|
|
param.put("allowDownload", 0);
|
|
param.put("allowDownload", 0);
|
|
|
|
+ log.info("VideoApiService updateVideo param={}", param.toJSONString());
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
res = JSONObject.parseObject(post);
|
|
res = JSONObject.parseObject(post);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("updateVideo error", e);
|
|
|
|
|
|
+ log.error("VideoApiService updateVideo error", e);
|
|
}
|
|
}
|
|
if (Objects.isNull(res)) {
|
|
if (Objects.isNull(res)) {
|
|
throw new CommonException(ExceptionEnum.VIDEO_UPDATE_FAILED);
|
|
throw new CommonException(ExceptionEnum.VIDEO_UPDATE_FAILED);
|
|
}
|
|
}
|
|
if (res.getInteger("code") != 0) {
|
|
if (res.getInteger("code") != 0) {
|
|
- log.error("updateVideo error, uid:{} videoId={} coverUrl={} title={} res={}", uid, videoId, coverUrl, title, res);
|
|
|
|
|
|
+ log.error("VideoApiService updateVideo error, uid:{} videoId={} coverUrl={} title={} res={}", uid, videoId, coverUrl, title, res);
|
|
throw new CommonException(ExceptionEnum.VIDEO_UPDATE_FAILED.getCode(), res.getString("msg"));
|
|
throw new CommonException(ExceptionEnum.VIDEO_UPDATE_FAILED.getCode(), res.getString("msg"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -144,13 +146,13 @@ public class VideoApiService {
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
res = JSONObject.parseObject(post);
|
|
res = JSONObject.parseObject(post);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("getVideoInfo error", e);
|
|
|
|
|
|
+ log.error("VideoApiService getVideoInfo error", e);
|
|
}
|
|
}
|
|
if (Objects.isNull(res)) {
|
|
if (Objects.isNull(res)) {
|
|
throw new CommonException(ExceptionEnum.VIDEO_INFO_FAILED);
|
|
throw new CommonException(ExceptionEnum.VIDEO_INFO_FAILED);
|
|
}
|
|
}
|
|
if (res.getInteger("code") != 0) {
|
|
if (res.getInteger("code") != 0) {
|
|
- log.error("getVideoInfo error, videoId={} res={}", videoId, res);
|
|
|
|
|
|
+ log.error("VideoApiService getVideoInfo error, videoId={} res={}", videoId, res);
|
|
throw new CommonException(ExceptionEnum.VIDEO_INFO_FAILED.getCode(),
|
|
throw new CommonException(ExceptionEnum.VIDEO_INFO_FAILED.getCode(),
|
|
ExceptionEnum.VIDEO_INFO_FAILED.getMsg() + "," + res.getString("msg"));
|
|
ExceptionEnum.VIDEO_INFO_FAILED.getMsg() + "," + res.getString("msg"));
|
|
}
|
|
}
|
|
@@ -167,13 +169,13 @@ public class VideoApiService {
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
String post = httpPoolClient.post(url, param.toJSONString());
|
|
res = JSONObject.parseObject(post);
|
|
res = JSONObject.parseObject(post);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- log.error("deleteVideo error", e);
|
|
|
|
|
|
+ log.error("VideoApiService deleteVideo error", e);
|
|
}
|
|
}
|
|
if (Objects.isNull(res)) {
|
|
if (Objects.isNull(res)) {
|
|
throw new CommonException(ExceptionEnum.VIDEO_DELETE_FAILED);
|
|
throw new CommonException(ExceptionEnum.VIDEO_DELETE_FAILED);
|
|
}
|
|
}
|
|
if (res.getInteger("code") != 0) {
|
|
if (res.getInteger("code") != 0) {
|
|
- log.error("getVideoInfo error, videoId={} res={}", videoId, res);
|
|
|
|
|
|
+ log.error("VideoApiService deleteVideo error, videoId={} res={}", videoId, res);
|
|
throw new CommonException(ExceptionEnum.VIDEO_DELETE_FAILED.getCode(),
|
|
throw new CommonException(ExceptionEnum.VIDEO_DELETE_FAILED.getCode(),
|
|
ExceptionEnum.VIDEO_DELETE_FAILED.getMsg() + "," + res.getString("msg"));
|
|
ExceptionEnum.VIDEO_DELETE_FAILED.getMsg() + "," + res.getString("msg"));
|
|
}
|
|
}
|