Showing
5 changed files
with
16 additions
and
12 deletions
1 | package com.yoho.ufo.service.impl; | 1 | package com.yoho.ufo.service.impl; |
2 | 2 | ||
3 | +import javax.annotation.PostConstruct; | ||
4 | + | ||
5 | +import org.slf4j.Logger; | ||
6 | +import org.slf4j.LoggerFactory; | ||
7 | +import org.springframework.beans.factory.annotation.Value; | ||
8 | +import org.springframework.stereotype.Service; | ||
9 | + | ||
3 | import com.qiniu.common.QiniuException; | 10 | import com.qiniu.common.QiniuException; |
4 | import com.qiniu.common.Zone; | 11 | import com.qiniu.common.Zone; |
5 | -import com.qiniu.http.Response; | ||
6 | import com.qiniu.processing.OperationManager; | 12 | import com.qiniu.processing.OperationManager; |
7 | import com.qiniu.processing.OperationStatus; | 13 | import com.qiniu.processing.OperationStatus; |
8 | import com.qiniu.storage.BucketManager; | 14 | import com.qiniu.storage.BucketManager; |
@@ -12,12 +18,6 @@ import com.qiniu.util.Auth; | @@ -12,12 +18,6 @@ import com.qiniu.util.Auth; | ||
12 | import com.qiniu.util.StringMap; | 18 | import com.qiniu.util.StringMap; |
13 | import com.qiniu.util.UrlSafeBase64; | 19 | import com.qiniu.util.UrlSafeBase64; |
14 | import com.yoho.ufo.exception.PlatformException; | 20 | import com.yoho.ufo.exception.PlatformException; |
15 | -import org.slf4j.Logger; | ||
16 | -import org.slf4j.LoggerFactory; | ||
17 | -import org.springframework.beans.factory.annotation.Value; | ||
18 | -import org.springframework.stereotype.Service; | ||
19 | - | ||
20 | -import javax.annotation.PostConstruct; | ||
21 | 21 | ||
22 | /** | 22 | /** |
23 | * Created by li.ma on 2018/12/11. | 23 | * Created by li.ma on 2018/12/11. |
@@ -94,8 +94,6 @@ public class QNliveUtil { | @@ -94,8 +94,6 @@ public class QNliveUtil { | ||
94 | logger.info("Resp is {} from bucketManager.fetch", fetch.key); | 94 | logger.info("Resp is {} from bucketManager.fetch", fetch.key); |
95 | 95 | ||
96 | } catch (QiniuException e) { | 96 | } catch (QiniuException e) { |
97 | - //捕获异常信息 | ||
98 | - Response r = e.response; | ||
99 | logger.error("bucketManager.fetch find wrong fileKey is {}, cameraIdentify is {}, startTime is {}, endTime is {} error is {}", fileKey, cameraIdentify, startTime, endTime, e.response); | 97 | logger.error("bucketManager.fetch find wrong fileKey is {}, cameraIdentify is {}, startTime is {}, endTime is {} error is {}", fileKey, cameraIdentify, startTime, endTime, e.response); |
100 | 98 | ||
101 | throw new PlatformException(400); | 99 | throw new PlatformException(400); |
@@ -152,6 +150,8 @@ public class QNliveUtil { | @@ -152,6 +150,8 @@ public class QNliveUtil { | ||
152 | } else if (1 == operationStatus.code || 2 == operationStatus.code) { | 150 | } else if (1 == operationStatus.code || 2 == operationStatus.code) { |
153 | return "operating"; | 151 | return "operating"; |
154 | } | 152 | } |
153 | + | ||
154 | + logger.info("result queryPrefopStatus is {}, persistId is {}", operationStatus.code, persistId); | ||
155 | } catch (QiniuException e) { | 155 | } catch (QiniuException e) { |
156 | logger.error("method queryPrefopStatus find wrong persistId is {}, error is {}", persistId, e.response); | 156 | logger.error("method queryPrefopStatus find wrong persistId is {}, error is {}", persistId, e.response); |
157 | } catch (Exception e) { | 157 | } catch (Exception e) { |
@@ -39,7 +39,7 @@ public class UfoLiveService { | @@ -39,7 +39,7 @@ public class UfoLiveService { | ||
39 | 39 | ||
40 | String persistId = qNliveUtil.transfer(fileName, fileName); | 40 | String persistId = qNliveUtil.transfer(fileName, fileName); |
41 | 41 | ||
42 | - if (StringUtils.isEmpty(persistId)) { | 42 | + if (StringUtils.isEmpty(persistId) || "fail".equals(qNliveUtil.queryPrefopStatus(persistId))) { |
43 | throw new PlatformException(400); | 43 | throw new PlatformException(400); |
44 | } | 44 | } |
45 | 45 | ||
@@ -55,11 +55,12 @@ public class UfoLiveService { | @@ -55,11 +55,12 @@ public class UfoLiveService { | ||
55 | record.setCreateTime(DateUtil.getCurrentTimeSeconds()); | 55 | record.setCreateTime(DateUtil.getCurrentTimeSeconds()); |
56 | record.setEndTime(req.getEndTime()); | 56 | record.setEndTime(req.getEndTime()); |
57 | record.setOrderCode(req.getOrderCode()); | 57 | record.setOrderCode(req.getOrderCode()); |
58 | + record.setSellerOrderCode(0L); | ||
58 | record.setPersistId(persistId); | 59 | record.setPersistId(persistId); |
59 | record.setPid(new UserHelper().getUserId()); | 60 | record.setPid(new UserHelper().getUserId()); |
60 | record.setSkup(req.getSkup()); | 61 | record.setSkup(req.getSkup()); |
61 | record.setStartTime(req.getStartTime()); | 62 | record.setStartTime(req.getStartTime()); |
62 | - record.setStatus(1); | 63 | + record.setStatus(0); |
63 | record.setVedioFileUrl(fileName + ".mp4"); | 64 | record.setVedioFileUrl(fileName + ".mp4"); |
64 | qiniuLiveRecordMapper.insert(record); | 65 | qiniuLiveRecordMapper.insert(record); |
65 | } | 66 | } |
@@ -35,6 +35,7 @@ datasources: | @@ -35,6 +35,7 @@ datasources: | ||
35 | - com.yoho.order.dal.StoredSellerMapper | 35 | - com.yoho.order.dal.StoredSellerMapper |
36 | - com.yoho.order.dal.SellerWalletDetailMapper | 36 | - com.yoho.order.dal.SellerWalletDetailMapper |
37 | - com.yoho.order.dal.SellerWalletMapper | 37 | - com.yoho.order.dal.SellerWalletMapper |
38 | + - com.yoho.order.dal.QiniuLiveRecordMapper | ||
38 | ufo_resource: | 39 | ufo_resource: |
39 | servers: | 40 | servers: |
40 | - 192.168.102.219:3306 | 41 | - 192.168.102.219:3306 |
@@ -35,6 +35,8 @@ datasources: | @@ -35,6 +35,8 @@ datasources: | ||
35 | - com.yoho.order.dal.StoredSellerMapper | 35 | - com.yoho.order.dal.StoredSellerMapper |
36 | - com.yoho.order.dal.SellerWalletDetailMapper | 36 | - com.yoho.order.dal.SellerWalletDetailMapper |
37 | - com.yoho.order.dal.SellerWalletMapper | 37 | - com.yoho.order.dal.SellerWalletMapper |
38 | + - com.yoho.order.dal.QiniuLiveRecordMapper | ||
39 | + | ||
38 | ufo_resource: | 40 | ufo_resource: |
39 | servers: | 41 | servers: |
40 | - ${jdbc.mysql.ufo.master} | 42 | - ${jdbc.mysql.ufo.master} |
@@ -711,7 +711,7 @@ function addRecordPage(skup, order_code, id) { | @@ -711,7 +711,7 @@ function addRecordPage(skup, order_code, id) { | ||
711 | $("#orderListTable").datagrid("reload"); | 711 | $("#orderListTable").datagrid("reload"); |
712 | window.self.$.messager.show({ | 712 | window.self.$.messager.show({ |
713 | title : "提示", | 713 | title : "提示", |
714 | - msg : "鉴定通过操作成功!" | 714 | + msg : "上传云端操作成功!" |
715 | }); | 715 | }); |
716 | }else { | 716 | }else { |
717 | window.self.$.messager.alert("失败", data.message, "error"); | 717 | window.self.$.messager.alert("失败", data.message, "error"); |
-
Please register or login to post a comment