...
|
...
|
@@ -4,8 +4,10 @@ import com.yoho.order.model.BuyerOrderReq; |
|
|
import com.yoho.order.model.QiniuLiveRecord;
|
|
|
import com.yoho.ufo.exception.PlatformException;
|
|
|
import com.yoho.ufo.order.service.impl.AsynVideoLiveService;
|
|
|
import com.yoho.ufo.order.service.impl.PhoneUidCameraService;
|
|
|
import com.yoho.ufo.order.service.impl.UfoLiveService;
|
|
|
import com.yoho.ufo.service.model.ApiResponse;
|
|
|
import com.yohobuy.ufo.model.order.bo.PhoneUidCameraBo;
|
|
|
import com.yohobuy.ufo.model.order.req.QNliveReq;
|
|
|
import com.yohobuy.ufo.model.order.resp.CameraRecordResp;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -31,6 +33,9 @@ public class UfoLiveController { |
|
|
@Autowired
|
|
|
private AsynVideoLiveService asynVideoLiveService;
|
|
|
|
|
|
@Autowired
|
|
|
private PhoneUidCameraService phoneUidCameraService;
|
|
|
|
|
|
@RequestMapping(value = "/generateMp4Vedio")
|
|
|
public ApiResponse generateMp4Vedio(BuyerOrderReq req) {
|
|
|
LOGGER.info("generateMp4Vedio in. req is {}", req);
|
...
|
...
|
@@ -158,4 +163,33 @@ public class UfoLiveController { |
|
|
List<QiniuLiveRecord> result = ufoLiveService.queryVideoInfo(req.getStartTime(), req.getEndTime());
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 当前手机标识的摄像头
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/queryPhoneCurrentCamera")
|
|
|
public ApiResponse queryPhoneCurrentCamera(PhoneUidCameraBo phoneUidCameraBo) {
|
|
|
LOGGER.info("queryPhoneCurrentCamera in. ");
|
|
|
PhoneUidCameraBo reslut = phoneUidCameraService.selectByphoneUid(phoneUidCameraBo.getPhoneUid());
|
|
|
if(reslut == null){
|
|
|
return new ApiResponse.ApiResponseBuilder().code(400).data("").message("查询无摄像头信息").build();
|
|
|
}
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(reslut).message("查询成功").build();
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/savePhoneCameraRecord")
|
|
|
public ApiResponse savePhoneCameraRecord(PhoneUidCameraBo phoneUidCameraBo) {
|
|
|
LOGGER.info("savePhoneCameraRecord in. phoneUidCameraBo is {}", phoneUidCameraBo);
|
|
|
Boolean reslut = phoneUidCameraService.insert(phoneUidCameraBo);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(reslut).message("查询成功").build();
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/updatePhoneCameraRecord")
|
|
|
public ApiResponse updatePhoneCameraRecord(PhoneUidCameraBo phoneUidCameraBo) {
|
|
|
LOGGER.info("updatePhoneCameraRecord in. phoneUidCameraBo is {}", phoneUidCameraBo);
|
|
|
int reslut = phoneUidCameraService.updateByphoneUid(phoneUidCameraBo);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(reslut).message("更新成功").build();
|
|
|
}
|
|
|
} |
...
|
...
|
|