Merge branch 'test6.8.4' of http://git.yoho.cn/ufo/ufo-platform into test6.8.4
Showing
7 changed files
with
29 additions
and
16 deletions
@@ -65,7 +65,7 @@ public class QNUploadServiceImpl implements IQNUploadService { | @@ -65,7 +65,7 @@ public class QNUploadServiceImpl implements IQNUploadService { | ||
65 | 65 | ||
66 | 66 | ||
67 | public static void main(String[] args) { | 67 | public static void main(String[] args) { |
68 | - //fetch(); | 68 | + fetch(); |
69 | transfer(); | 69 | transfer(); |
70 | } | 70 | } |
71 | 71 | ||
@@ -83,11 +83,11 @@ public class QNUploadServiceImpl implements IQNUploadService { | @@ -83,11 +83,11 @@ public class QNUploadServiceImpl implements IQNUploadService { | ||
83 | BucketManager bucketManager = new BucketManager(auth, cfg); | 83 | BucketManager bucketManager = new BucketManager(auth, cfg); |
84 | 84 | ||
85 | //文件保存的空间名和文件名 | 85 | //文件保存的空间名和文件名 |
86 | - String bucket = "yhb-img01"; | 86 | + String bucket = "yhbflv"; |
87 | String key = "ufo/live/m3u8/yohotest15.m3u8"; | 87 | String key = "ufo/live/m3u8/yohotest15.m3u8"; |
88 | 88 | ||
89 | //要fetch的url | 89 | //要fetch的url |
90 | - String url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1544425260&endtime=1544425440"; | 90 | + String url = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8?starttime=1545291515&endtime=1545292115"; |
91 | 91 | ||
92 | try { | 92 | try { |
93 | //调用fetch方法抓取文件 | 93 | //调用fetch方法抓取文件 |
@@ -102,8 +102,8 @@ public class QNUploadServiceImpl implements IQNUploadService { | @@ -102,8 +102,8 @@ public class QNUploadServiceImpl implements IQNUploadService { | ||
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
105 | - // http://api.qiniu.com/status/get/prefop?id=z0.5c13269138b9f349c8b0e84d 查看文件的状态 | ||
106 | - // http://yhb-img01.qiniudn.com/ufo/live/mp4/9817910304768_1544775266.mp4 | 105 | + // http://api.qiniu.com/status/get/prefop?id=z0.5c1b4c0138b9f349c8bb9c46 查看文件的状态 |
106 | + // http://flv01.static.yhbimg.com/ufo/live/mp4/yohotest15.mp4 | ||
107 | private static void transfer() { | 107 | private static void transfer() { |
108 | String m3u8Address = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8"; | 108 | String m3u8Address = "http://yoho-live-down.yohobuy.com/yoho13/yoho.m3u8"; |
109 | //设置账号的AK,SK | 109 | //设置账号的AK,SK |
@@ -113,8 +113,8 @@ public class QNUploadServiceImpl implements IQNUploadService { | @@ -113,8 +113,8 @@ public class QNUploadServiceImpl implements IQNUploadService { | ||
113 | //新建一个OperationManager对象 | 113 | //新建一个OperationManager对象 |
114 | OperationManager operater = new OperationManager(auth, cfg); | 114 | OperationManager operater = new OperationManager(auth, cfg); |
115 | //设置要转码的空间和key,并且这个key在你空间中存在 | 115 | //设置要转码的空间和key,并且这个key在你空间中存在 |
116 | - String bucket = "yhb-img01"; | ||
117 | - String key = "ufo/live/m3u8/9790272561152_1544768896.m3u8"; // 14 4 分钟 15 3分钟 | 116 | + String bucket = "yhbflv"; |
117 | + String key = "ufo/live/m3u8/yohotest15.m3u8"; // 14 4 分钟 15 3分钟 | ||
118 | //设置转码操作参数 1920x1080 1280x720 848x480 | 118 | //设置转码操作参数 1920x1080 1280x720 848x480 |
119 | String fops = "avthumb/mp4/s/1280x720/vb/1m/an/1/hr/0/r/30"; | 119 | String fops = "avthumb/mp4/s/1280x720/vb/1m/an/1/hr/0/r/30"; |
120 | 120 | ||
@@ -122,7 +122,7 @@ public class QNUploadServiceImpl implements IQNUploadService { | @@ -122,7 +122,7 @@ public class QNUploadServiceImpl implements IQNUploadService { | ||
122 | //设置转码的队列 | 122 | //设置转码的队列 |
123 | String pipeline = "yoho-m3u8-to-mp4"; | 123 | String pipeline = "yoho-m3u8-to-mp4"; |
124 | //可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当前空间。 | 124 | //可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当前空间。 |
125 | - String urlbase64 = UrlSafeBase64.encodeToString("yhb-img01:ufo/live/mp4/9790272561152_1544768896.mp4"); | 125 | + String urlbase64 = UrlSafeBase64.encodeToString("yhbflv:ufo/live/mp4/yohotest15.mp4"); |
126 | String pfops = fops + "|saveas/" + urlbase64; | 126 | String pfops = fops + "|saveas/" + urlbase64; |
127 | //设置pipeline参数 http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/ufoLive/ufo_avthumb_notify | 127 | //设置pipeline参数 http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/ufoLive/ufo_avthumb_notify |
128 | StringMap params = new StringMap().putWhen("force", 1, true).putNotEmpty("pipeline", pipeline).put("notifyURL", "http://testapi.yohops.com/ufoLive/ufo_avthumb_notify"); | 128 | 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 { | @@ -38,7 +38,7 @@ public class QNliveUtil { | ||
38 | @Value("${qiniu.secretkey}") | 38 | @Value("${qiniu.secretkey}") |
39 | private String secretKey; | 39 | private String secretKey; |
40 | 40 | ||
41 | - private static String BUCKET = "yhb-img01"; | 41 | + private static String BUCKET = "yhbflv"; |
42 | 42 | ||
43 | private static String FILEKEY_PRE = "ufo/live/m3u8/"; // 码流文件路径 | 43 | private static String FILEKEY_PRE = "ufo/live/m3u8/"; // 码流文件路径 |
44 | 44 | ||
@@ -51,7 +51,7 @@ public class QNliveUtil { | @@ -51,7 +51,7 @@ public class QNliveUtil { | ||
51 | //设置转码的队列 | 51 | //设置转码的队列 |
52 | private static String PIPELINE = "yoho-m3u8-to-mp4"; | 52 | private static String PIPELINE = "yoho-m3u8-to-mp4"; |
53 | 53 | ||
54 | - public static final String LIVE_VEDIO_DOMAIN = "http://yhb-img01.qiniudn.com/"; | 54 | + public static final String LIVE_VEDIO_DOMAIN = "http://flv01.static.yhbimg.com/"; |
55 | 55 | ||
56 | private Auth auth; | 56 | private Auth auth; |
57 | 57 |
@@ -57,7 +57,7 @@ public class UfoLiveController { | @@ -57,7 +57,7 @@ public class UfoLiveController { | ||
57 | LOGGER.info("queryMp4Vedio success. req is {}, fileUrl is {}", req, fileUrl); | 57 | LOGGER.info("queryMp4Vedio success. req is {}, fileUrl is {}", req, fileUrl); |
58 | 58 | ||
59 | if (StringUtils.isEmpty(fileUrl)) { | 59 | if (StringUtils.isEmpty(fileUrl)) { |
60 | - return new ApiResponse.ApiResponseBuilder().code(400).message("视频还未转码完成").build(); | 60 | + return new ApiResponse.ApiResponseBuilder().code(400).message("视频还未转码完成,需要等待约15分钟").build(); |
61 | } | 61 | } |
62 | 62 | ||
63 | return new ApiResponse.ApiResponseBuilder().code(200).data(fileUrl).message("查询成功").build(); | 63 | return new ApiResponse.ApiResponseBuilder().code(200).data(fileUrl).message("查询成功").build(); |
@@ -721,6 +721,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -721,6 +721,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
721 | 721 | ||
722 | result = expressRecordMapper.updateWaybillCode(buyerOrder.getOrderCode(), | 722 | result = expressRecordMapper.updateWaybillCode(buyerOrder.getOrderCode(), |
723 | buyerOrder.getSellerUid(), EXPRESS_TYPE_SELLER_TO_JUDGE, req.getSellerWaybillCode()); | 723 | buyerOrder.getSellerUid(), EXPRESS_TYPE_SELLER_TO_JUDGE, req.getSellerWaybillCode()); |
724 | + //调用前台接口更新物流信息 | ||
725 | + noticeFrontUpdateExpressInfo(req); | ||
724 | }else {//修改买家信息 | 726 | }else {//修改买家信息 |
725 | operateType = OPERATE_TYPE_UPDATE_RECEIVE_INFO; | 727 | operateType = OPERATE_TYPE_UPDATE_RECEIVE_INFO; |
726 | BuyerOrderMeta buyerMeta = buyerOrderMetaMapper.selectByOrderCodeAndKey(req.getOrderCode(), BUYER_ORDER_META_KEY_DELIVERY_ADDRESS); | 728 | BuyerOrderMeta buyerMeta = buyerOrderMetaMapper.selectByOrderCodeAndKey(req.getOrderCode(), BUYER_ORDER_META_KEY_DELIVERY_ADDRESS); |
@@ -778,6 +780,16 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -778,6 +780,16 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
778 | return jsonObject; | 780 | return jsonObject; |
779 | } | 781 | } |
780 | 782 | ||
783 | + private void noticeFrontUpdateExpressInfo(BuyerOrderReq req) { | ||
784 | + AppraiseExpressInfoBo bo = new AppraiseExpressInfoBo(); | ||
785 | + bo.setOrderCode(Long.parseLong(req.getOrderCode())); | ||
786 | + bo.setWayBillCode(req.getSellerWaybillCode()); | ||
787 | + //调用前台接口更新物流信息 | ||
788 | + LOGGER.info("call orderAppraise.triggerSellerToPlatformExpress,buyerOrderMetaUpdateReq is {}", bo); | ||
789 | + JSONObject jsonObject = serviceCaller.call("orderAppraise.triggerSellerToPlatformExpress", bo, JSONObject.class); | ||
790 | + LOGGER.info("call orderAppraise.triggerSellerToPlatformExpress result is {}", jsonObject.toJSONString()); | ||
791 | + } | ||
792 | + | ||
781 | private void saveOrderOperateRecord(String orderCode, UserHelper userInfo, int operateType, String oldInfo) { | 793 | private void saveOrderOperateRecord(String orderCode, UserHelper userInfo, int operateType, String oldInfo) { |
782 | OrderOperateRecord optRecord = new OrderOperateRecord(); | 794 | OrderOperateRecord optRecord = new OrderOperateRecord(); |
783 | optRecord.setOrderCode(orderCode); | 795 | optRecord.setOrderCode(orderCode); |
@@ -729,8 +729,8 @@ function addRecordPage(skup, order_code, id) { | @@ -729,8 +729,8 @@ function addRecordPage(skup, order_code, id) { | ||
729 | $('#startTime').val(parseInt(new Date().getTime() / 1000)); | 729 | $('#startTime').val(parseInt(new Date().getTime() / 1000)); |
730 | //$("#startTime").textbox('setValue',parseInt(new Date().getTime() / 1000)); | 730 | //$("#startTime").textbox('setValue',parseInt(new Date().getTime() / 1000)); |
731 | } else if ($('#endTime').val() == '') { | 731 | } else if ($('#endTime').val() == '') { |
732 | - stopCount(); | ||
733 | $('#endTime').val(parseInt(new Date().getTime() / 1000)); | 732 | $('#endTime').val(parseInt(new Date().getTime() / 1000)); |
733 | + stopCount(); | ||
734 | // $("#endTime").textbox('setValue',parseInt(new Date().getTime() / 1000)); | 734 | // $("#endTime").textbox('setValue',parseInt(new Date().getTime() / 1000)); |
735 | $('#recordBtn').linkbutton({text:'上传云端'}); | 735 | $('#recordBtn').linkbutton({text:'上传云端'}); |
736 | } else if ($('#startTime').val() != '' && $('#endTime').val() != ''){ | 736 | } else if ($('#startTime').val() != '' && $('#endTime').val() != ''){ |
@@ -762,7 +762,8 @@ function addRecordPage(skup, order_code, id) { | @@ -762,7 +762,8 @@ function addRecordPage(skup, order_code, id) { | ||
762 | text: "取消", | 762 | text: "取消", |
763 | iconCls: "icon-cancel", | 763 | iconCls: "icon-cancel", |
764 | handler: function () { | 764 | handler: function () { |
765 | - $(div).dialog("close"); | 765 | + timedCount(); |
766 | + $(div).dialog("destroy"); | ||
766 | } | 767 | } |
767 | }] | 768 | }] |
768 | }); | 769 | }); |
@@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
5 | <title>Insert title here</title> | 5 | <title>Insert title here</title> |
6 | </head> | 6 | </head> |
7 | <body> | 7 | <body> |
8 | - <input style="display: none" id="startTime" type="text"/> | ||
9 | - <input style="display: none" id="endTime" type="text"/> | 8 | + <input id="startTime" type="hidden"/> |
9 | + <input id="endTime" type="hidden"/> | ||
10 | 10 | ||
11 | <ul> | 11 | <ul> |
12 | <li style="padding-bottom: 10px;"> | 12 | <li style="padding-bottom: 10px;"> |
@@ -254,7 +254,7 @@ | @@ -254,7 +254,7 @@ | ||
254 | title = "添加品牌系列"; | 254 | title = "添加品牌系列"; |
255 | message = "确认添加品牌系列信息吗?"; | 255 | message = "确认添加品牌系列信息吗?"; |
256 | } else { | 256 | } else { |
257 | - window.location.href = contextPath + "/html/product/productEdit.html?id=" + id; | 257 | + window.open(contextPath + "/html/product/productEdit.html?id=" + id) |
258 | } | 258 | } |
259 | } | 259 | } |
260 | 260 |
-
Please register or login to post a comment