Authored by mali

Merge branch 'dev_vedio' into test6.9.0

... ... @@ -20,4 +20,6 @@ public interface QiniuLiveRecordMapper {
void updateDiscardVideo(@Param("orderCode")Long orderCode, @Param("showFlag")Integer showFlag);
int insertInitRecord(QiniuLiveRecord record);
int updateVideoUrl(@Param("id")Integer id, @Param("vedioUrl")String vedioUrl, @Param("updateTime")Integer updateTime);
}
\ No newline at end of file
... ...
... ... @@ -41,6 +41,16 @@ public class QiniuLiveRecord {
private Integer cameraCode;
private String vedioUrl; // 新方式生成的视频文件链接
public String getVedioUrl() {
return vedioUrl;
}
public void setVedioUrl(String vedioUrl) {
this.vedioUrl = vedioUrl;
}
public Integer getCameraCode() {
return cameraCode;
}
... ...
... ... @@ -20,10 +20,11 @@
<result column="product_id" property="productId" jdbcType="INTEGER" />
<result column="show_flag" property="showFlag" jdbcType="INTEGER" />
<result column="camera_code" property="cameraCode" javaType="INTEGER" />
<result column="video_url" property="vedioUrl" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, order_code, skup, seller_order_code, depot_no, start_time, end_time, persist_id,
vedio_file_url, create_time, update_time, pid, status, storage_id, goods_id, product_id, show_flag, camera_code
vedio_file_url, create_time, update_time, pid, status, storage_id, goods_id, product_id, show_flag, camera_code, video_url
</sql>
<select id="selectByOrderCodes" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
... ... @@ -94,4 +95,10 @@
set show_flag = #{showFlag,jdbcType=INTEGER}
where order_code = #{orderCode, jdbcType=INTEGER}
</update>
<update id="updateVideoUrl">
update qiniu_live_record
set video_url = #{vedioUrl,jdbcType=VARCHAR}, update_time =#{updateTime, jdbcType=INTEGER}
where id = #{id, jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -127,4 +127,18 @@ public class UfoLiveController {
return new ApiResponse.ApiResponseBuilder().code(200).message("作废成功").build();
}
/**
* 薛超使用的另一套视频文件方案
* @param req
* @return
*/
@RequestMapping(value = "/updateVideoUrl")
public ApiResponse updateVideoUrl(QNliveReq req) {
LOGGER.info("updateVideoUrl method in. req is {}", req);
int result = ufoLiveService.updateVideoUrl(req.getId(), req.getVedioFileUrl());
return new ApiResponse.ApiResponseBuilder().code(result > 0 ? 200 : 400).message(result > 0 ? "更新成功" : "更新失败").build();
}
}
... ...
... ... @@ -261,4 +261,9 @@ public class UfoLiveService {
public void dicardVedio(Long orderCode) {
qiniuLiveRecordMapper.updateDiscardVideo(orderCode, 0);
}
public int updateVideoUrl(Integer id, String vedioUrl) {
return qiniuLiveRecordMapper.updateVideoUrl(id, vedioUrl, DateUtil.getCurrentTimeSeconds());
}
}
... ...
... ... @@ -20,6 +20,7 @@
<list>
<value>platformLogin.do</value>
<value>logout.do</value>
<value>updateVideoUrl</value>
</list>
</property>
</bean>
... ...