Commit d62e7566 authored by 耿迪迪's avatar 耿迪迪

视频查询 gengdidi

parent 9040e551
......@@ -10,14 +10,14 @@ import com.zehong.common.core.domain.BaseEntity;
* 视频管理对象 t_video_manager
*
* @author zehong
* @date 2021-09-18
* @date 2021-09-22
*/
public class TVideoManager extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 视频管理id */
private String videoManagerId;
private Long videoManagerId;
/** 视频名称 */
@Excel(name = "视频名称")
......@@ -25,7 +25,7 @@ public class TVideoManager extends BaseEntity
/** 视频资源id */
@Excel(name = "视频资源id")
private Long resourceId;
private String resourceId;
/** 经度 */
@Excel(name = "经度")
......@@ -39,12 +39,16 @@ public class TVideoManager extends BaseEntity
@Excel(name = "视频地址")
private String videoAddress;
public void setVideoManagerId(String videoManagerId)
/** 视频类型 */
@Excel(name = "视频类型")
private String type;
public void setVideoManagerId(Long videoManagerId)
{
this.videoManagerId = videoManagerId;
}
public String getVideoManagerId()
public Long getVideoManagerId()
{
return videoManagerId;
}
......@@ -57,12 +61,12 @@ public class TVideoManager extends BaseEntity
{
return videoName;
}
public void setResourceId(Long resourceId)
public void setResourceId(String resourceId)
{
this.resourceId = resourceId;
}
public Long getResourceId()
public String getResourceId()
{
return resourceId;
}
......@@ -93,6 +97,15 @@ public class TVideoManager extends BaseEntity
{
return videoAddress;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
@Override
public String toString() {
......@@ -103,6 +116,7 @@ public class TVideoManager extends BaseEntity
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("videoAddress", getVideoAddress())
.append("type", getType())
.toString();
}
}
......@@ -11,45 +11,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="videoAddress" column="video_address" />
<result property="type" column="type" />
</resultMap>
<sql id="selectTVideoManagerVo">
select video_manager_id, video_name, resource_id, longitude, latitude, video_address from t_video_manager
select video_manager_id, video_name, resource_id, longitude, latitude, video_address, type from t_video_manager
</sql>
<select id="selectTVideoManagerList" parameterType="TVideoManager" resultMap="TVideoManagerResult">
<include refid="selectTVideoManagerVo"/>
<where>
<if test="videoName != null and videoName != ''"> and video_name like concat('%', #{videoName}, '%')</if>
<if test="resourceId != null "> and resource_id = #{resourceId}</if>
<if test="resourceId != null and resourceId != ''"> and resource_id = #{resourceId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="videoAddress != null and videoAddress != ''"> and video_address = #{videoAddress}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
</where>
</select>
<select id="selectTVideoManagerById" parameterType="String" resultMap="TVideoManagerResult">
<select id="selectTVideoManagerById" parameterType="Long" resultMap="TVideoManagerResult">
<include refid="selectTVideoManagerVo"/>
where video_manager_id = #{videoManagerId}
</select>
<insert id="insertTVideoManager" parameterType="TVideoManager">
<insert id="insertTVideoManager" parameterType="TVideoManager" useGeneratedKeys="true" keyProperty="videoManagerId">
insert into t_video_manager
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="videoManagerId != null">video_manager_id,</if>
<if test="videoName != null">video_name,</if>
<if test="resourceId != null">resource_id,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="videoAddress != null">video_address,</if>
<if test="type != null">type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="videoManagerId != null">#{videoManagerId},</if>
<if test="videoName != null">#{videoName},</if>
<if test="resourceId != null">#{resourceId},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="videoAddress != null">#{videoAddress},</if>
<if test="type != null">#{type},</if>
</trim>
</insert>
......@@ -61,11 +63,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="videoAddress != null">video_address = #{videoAddress},</if>
<if test="type != null">type = #{type},</if>
</trim>
where video_manager_id = #{videoManagerId}
</update>
<delete id="deleteTVideoManagerById" parameterType="String">
<delete id="deleteTVideoManagerById" parameterType="Long">
delete from t_video_manager where video_manager_id = #{videoManagerId}
</delete>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment