Authored by Lixiaodi

Merge branch 'test6.8.4' of http://git.yoho.cn/ufo/ufo-platform into test6.8.4

... ... @@ -65,7 +65,7 @@ public class QNUploadServiceImpl implements IQNUploadService {
public static void main(String[] args) {
//fetch();
fetch();
transfer();
}
... ... @@ -83,11 +83,11 @@ public class QNUploadServiceImpl implements IQNUploadService {
BucketManager bucketManager = new BucketManager(auth, cfg);
//文件保存的空间名和文件名
String bucket = "yhb-img01";
String bucket = "yhbflv";
String key = "ufo/live/m3u8/yohotest15.m3u8";
//要fetch的url
String url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1544425260&endtime=1544425440";
String url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545291515&endtime=1545292115";
try {
//调用fetch方法抓取文件
... ... @@ -102,8 +102,8 @@ public class QNUploadServiceImpl implements IQNUploadService {
}
}
// http://api.qiniu.com/status/get/prefop?id=z0.5c13269138b9f349c8b0e84d 查看文件的状态
// http://yhb-img01.qiniudn.com/ufo/live/mp4/9817910304768_1544775266.mp4
// http://api.qiniu.com/status/get/prefop?id=z0.5c1b4c0138b9f349c8bb9c46 查看文件的状态
// http://flv01.static.yhbimg.com/ufo/live/mp4/yohotest15.mp4
private static void transfer() {
String m3u8Address = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8";
//设置账号的AK,SK
... ... @@ -113,8 +113,8 @@ public class QNUploadServiceImpl implements IQNUploadService {
//新建一个OperationManager对象
OperationManager operater = new OperationManager(auth, cfg);
//设置要转码的空间和key,并且这个key在你空间中存在
String bucket = "yhb-img01";
String key = "ufo/live/m3u8/9790272561152_1544768896.m3u8"; // 14 4 分钟 15 3分钟
String bucket = "yhbflv";
String key = "ufo/live/m3u8/yohotest15.m3u8"; // 14 4 分钟 15 3分钟
//设置转码操作参数 1920x1080 1280x720 848x480
String fops = "avthumb/mp4/s/1280x720/vb/1m/an/1/hr/0/r/30";
... ... @@ -122,7 +122,7 @@ public class QNUploadServiceImpl implements IQNUploadService {
//设置转码的队列
String pipeline = "yoho-m3u8-to-mp4";
//可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当前空间。
String urlbase64 = UrlSafeBase64.encodeToString("yhb-img01:ufo/live/mp4/9790272561152_1544768896.mp4");
String urlbase64 = UrlSafeBase64.encodeToString("yhbflv:ufo/live/mp4/yohotest15.mp4");
String pfops = fops + "|saveas/" + urlbase64;
//设置pipeline参数 http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/ufoLive/ufo_avthumb_notify
StringMap params = new StringMap().putWhen("force", 1, true).putNotEmpty("pipeline", pipeline).put("notifyURL", "http://testapi.yohops.com/ufoLive/ufo_avthumb_notify");
... ...
... ... @@ -38,7 +38,7 @@ public class QNliveUtil {
@Value("${qiniu.secretkey}")
private String secretKey;
private static String BUCKET = "yhb-img01";
private static String BUCKET = "yhbflv";
private static String FILEKEY_PRE = "ufo/live/m3u8/"; // 码流文件路径
... ... @@ -51,7 +51,7 @@ public class QNliveUtil {
//设置转码的队列
private static String PIPELINE = "yoho-m3u8-to-mp4";
public static final String LIVE_VEDIO_DOMAIN = "http://yhb-img01.qiniudn.com/";
public static final String LIVE_VEDIO_DOMAIN = "http://flv01.static.yhbimg.com/";
private Auth auth;
... ...
... ... @@ -57,7 +57,7 @@ public class UfoLiveController {
LOGGER.info("queryMp4Vedio success. req is {}, fileUrl is {}", req, fileUrl);
if (StringUtils.isEmpty(fileUrl)) {
return new ApiResponse.ApiResponseBuilder().code(400).message("视频还未转码完成").build();
return new ApiResponse.ApiResponseBuilder().code(400).message("视频还未转码完成,需要等待约15分钟").build();
}
return new ApiResponse.ApiResponseBuilder().code(200).data(fileUrl).message("查询成功").build();
... ...
... ... @@ -721,6 +721,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
result = expressRecordMapper.updateWaybillCode(buyerOrder.getOrderCode(),
buyerOrder.getSellerUid(), EXPRESS_TYPE_SELLER_TO_JUDGE, req.getSellerWaybillCode());
//调用前台接口更新物流信息
noticeFrontUpdateExpressInfo(req);
}else {//修改买家信息
operateType = OPERATE_TYPE_UPDATE_RECEIVE_INFO;
BuyerOrderMeta buyerMeta = buyerOrderMetaMapper.selectByOrderCodeAndKey(req.getOrderCode(), BUYER_ORDER_META_KEY_DELIVERY_ADDRESS);
... ... @@ -778,6 +780,16 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
return jsonObject;
}
private void noticeFrontUpdateExpressInfo(BuyerOrderReq req) {
AppraiseExpressInfoBo bo = new AppraiseExpressInfoBo();
bo.setOrderCode(Long.parseLong(req.getOrderCode()));
bo.setWayBillCode(req.getSellerWaybillCode());
//调用前台接口更新物流信息
LOGGER.info("call orderAppraise.triggerSellerToPlatformExpress,buyerOrderMetaUpdateReq is {}", bo);
JSONObject jsonObject = serviceCaller.call("orderAppraise.triggerSellerToPlatformExpress", bo, JSONObject.class);
LOGGER.info("call orderAppraise.triggerSellerToPlatformExpress result is {}", jsonObject.toJSONString());
}
private void saveOrderOperateRecord(String orderCode, UserHelper userInfo, int operateType, String oldInfo) {
OrderOperateRecord optRecord = new OrderOperateRecord();
optRecord.setOrderCode(orderCode);
... ...
... ... @@ -729,8 +729,8 @@ function addRecordPage(skup, order_code, id) {
$('#startTime').val(parseInt(new Date().getTime() / 1000));
//$("#startTime").textbox('setValue',parseInt(new Date().getTime() / 1000));
} else if ($('#endTime').val() == '') {
stopCount();
$('#endTime').val(parseInt(new Date().getTime() / 1000));
stopCount();
// $("#endTime").textbox('setValue',parseInt(new Date().getTime() / 1000));
$('#recordBtn').linkbutton({text:'上传云端'});
} else if ($('#startTime').val() != '' && $('#endTime').val() != ''){
... ... @@ -762,7 +762,8 @@ function addRecordPage(skup, order_code, id) {
text: "取消",
iconCls: "icon-cancel",
handler: function () {
$(div).dialog("close");
timedCount();
$(div).dialog("destroy");
}
}]
});
... ...
... ... @@ -5,8 +5,8 @@
<title>Insert title here</title>
</head>
<body>
<input style="display: none" id="startTime" type="text"/>
<input style="display: none" id="endTime" type="text"/>
<input id="startTime" type="hidden"/>
<input id="endTime" type="hidden"/>
<ul>
<li style="padding-bottom: 10px;">
... ...
... ... @@ -254,7 +254,7 @@
title = "添加品牌系列";
message = "确认添加品牌系列信息吗?";
} else {
window.location.href = contextPath + "/html/product/productEdit.html?id=" + id;
window.open(contextPath + "/html/product/productEdit.html?id=" + id)
}
}
... ...