|
@@ -0,0 +1,182 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.onemap.sanya.mapper.ZtBillboardmodellisthistoryMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.onemap.sanya.domain.business.ZtBillboardmodellisthistory" id="ZtBillboardmodellisthistoryResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="billboardInfoId" column="billboardInfoId" />
|
|
|
+ <result property="billboardName" column="billboardName" />
|
|
|
+ <result property="billboardType" column="billboardType" />
|
|
|
+ <result property="x" column="x" />
|
|
|
+ <result property="y" column="y" />
|
|
|
+ <result property="z" column="z" />
|
|
|
+ <result property="rotateX" column="rotateX" />
|
|
|
+ <result property="rotateY" column="rotateY" />
|
|
|
+ <result property="rotateZ" column="rotateZ" />
|
|
|
+ <result property="ReviewStatus" column="ReviewStatus" />
|
|
|
+ <result property="ReviewComments" column="ReviewComments" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="isAddModel" column="isAddModel" />
|
|
|
+ <result property="remarks" column="remarks" />
|
|
|
+ <result property="template" column="template" />
|
|
|
+ <result property="templateTop" column="templateTop" />
|
|
|
+ <result property="templateCentre" column="templateCentre" />
|
|
|
+ <result property="templateBottom" column="templateBottom" />
|
|
|
+ <result property="results" column="results" />
|
|
|
+ <result property="viewing_angle" column="viewing_angle" />
|
|
|
+ <result property="review_date" column="review_date" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectZtBillboardmodellisthistoryaddjtVo">
|
|
|
+ select id, "billboardInfoId", "billboardName", "billboardType", x, y, z, "rotateX", "rotateY", "rotateZ", "ReviewStatus", "ReviewComments", create_by, create_time, update_by, update_time, remark, "isAddModel", remarks, "template","templateTop", "templateCentre", "templateBottom","results","viewing_angle","review_date" from "zt_billboardModelListHistory"
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectZtBillboardmodellisthistoryList" parameterType="com.onemap.sanya.domain.business.ZtBillboardmodellisthistory" resultMap="ZtBillboardmodellisthistoryResult">
|
|
|
+ SELECT
|
|
|
+ "zt_billboardModelListHistory".*
|
|
|
+ FROM
|
|
|
+ "zt_billboardModelListHistory"
|
|
|
+ <where>
|
|
|
+ <if test="id != null and id != ''"> and "zt_billboardModelListHistory"."id" = #{id}</if>
|
|
|
+ <if test="billboardInfoId != null and billboardInfoId != ''"> and "zt_billboardModelListHistory"."billboardInfoId" = #{billboardInfoId}</if>
|
|
|
+ <if test="billboardName != null and billboardName != ''"> and "zt_billboardModelListHistory"."billboardName" like concat('%', #{billboardName}, '%')</if>
|
|
|
+ <if test="billboardType != null and billboardType != ''"> and "zt_billboardModelListHistory"."billboardType" = #{billboardType}</if>
|
|
|
+ <if test="x != null "> and "zt_billboardModelListHistory".x = #{x}</if>
|
|
|
+ <if test="y != null "> and "zt_billboardModelListHistory".y = #{y}</if>
|
|
|
+ <if test="z != null "> and "zt_billboardModelListHistory".z = #{z}</if>
|
|
|
+ <if test="rotateX != null "> and "zt_billboardModelListHistory"."rotateX" = #{rotateX}</if>
|
|
|
+ <if test="rotateY != null "> and "zt_billboardModelListHistory"."rotateY" = #{rotateY}</if>
|
|
|
+ <if test="rotateZ != null "> and "zt_billboardModelListHistory"."rotateZ" = #{rotateZ}</if>
|
|
|
+ <if test="ReviewStatus != null and ReviewStatus != ''"> and "zt_billboardModelListHistory"."ReviewStatus" = #{ReviewStatus}</if>
|
|
|
+ <if test="ReviewComments != null and ReviewComments != ''"> and "zt_billboardModelListHistory"."ReviewComments" = #{ReviewComments}</if>
|
|
|
+ <if test="isAddModel != null "> and "zt_billboardModelListHistory"."isAddModel" = #{isAddModel}</if>
|
|
|
+ <if test="remarks != null and remarks != ''"> and "zt_billboardModelListHistory".remarks = #{remarks}</if>
|
|
|
+ <if test="template != null and template != ''"> and "zt_billboardModelListHistory"."template" = #{template}::jsonb</if>
|
|
|
+ <if test="templateTop != null and templateTop != ''"> and "zt_billboardModelListHistory"."templateTop" = #{templateTop}::jsonb</if>
|
|
|
+ <if test="templateCentre != null and templateCentre != ''"> and "zt_billboardModelListHistory"."templateCentre" = #{templateCentre}::jsonb</if>
|
|
|
+ <if test="templateBottom != null and templateBottom != ''"> and "zt_billboardModelListHistory"."templateBottom" = #{templateBottom}::jsonb</if>
|
|
|
+ </where>
|
|
|
+ order by "create_time" desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectZtBillboardmodellisthistoryById" parameterType="String" resultMap="ZtBillboardmodellisthistoryResult">
|
|
|
+ SELECT
|
|
|
+ "zt_billboardModelListHistory".*
|
|
|
+ FROM
|
|
|
+ "zt_billboardModelListHistory"
|
|
|
+ where "zt_billboardModelListHistory".id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertZtBillboardmodellisthistory" parameterType="com.onemap.sanya.domain.business.ZtBillboardmodellisthistory">
|
|
|
+ insert into "zt_billboardModelListHistory"
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="billboardInfoId != null">"billboardInfoId",</if>
|
|
|
+ <if test="billboardName != null">"billboardName",</if>
|
|
|
+ <if test="billboardType != null">"billboardType",</if>
|
|
|
+ <if test="x != null">x,</if>
|
|
|
+ <if test="y != null">y,</if>
|
|
|
+ <if test="z != null">z,</if>
|
|
|
+ <if test="rotateX != null">"rotateX",</if>
|
|
|
+ <if test="rotateY != null">"rotateY",</if>
|
|
|
+ <if test="rotateZ != null">"rotateZ",</if>
|
|
|
+ <if test="ReviewStatus != null">"ReviewStatus",</if>
|
|
|
+ <if test="ReviewComments != null">"ReviewComments",</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="isAddModel != null">"isAddModel",</if>
|
|
|
+ <if test="remarks != null">remarks,</if>
|
|
|
+ <if test="template != null">"template",</if>
|
|
|
+ <if test="templateTop != null">"templateTop",</if>
|
|
|
+ <if test="templateCentre != null">"templateCentre",</if>
|
|
|
+ <if test="templateBottom != null">"templateBottom",</if>
|
|
|
+ <if test="results != null">"results",</if>
|
|
|
+ <if test="viewing_angle != null">"viewing_angle",</if>
|
|
|
+ <if test="review_date != null">"review_date",</if>
|
|
|
+
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="billboardInfoId != null">#{billboardInfoId},</if>
|
|
|
+ <if test="billboardName != null">#{billboardName},</if>
|
|
|
+ <if test="billboardType != null">#{billboardType},</if>
|
|
|
+ <if test="x != null">#{x},</if>
|
|
|
+ <if test="y != null">#{y},</if>
|
|
|
+ <if test="z != null">#{z},</if>
|
|
|
+ <if test="rotateX != null">#{rotateX},</if>
|
|
|
+ <if test="rotateY != null">#{rotateY},</if>
|
|
|
+ <if test="rotateZ != null">#{rotateZ},</if>
|
|
|
+ <if test="ReviewStatus != null">#{ReviewStatus},</if>
|
|
|
+ <if test="ReviewComments != null">#{ReviewComments},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="isAddModel != null">#{isAddModel},</if>
|
|
|
+ <if test="remarks != null">#{remarks},</if>
|
|
|
+ <if test="template != null">#{template}::jsonb,</if>
|
|
|
+ <if test="templateTop != null">#{templateTop}::jsonb,</if>
|
|
|
+ <if test="templateCentre != null">#{templateCentre}::jsonb,</if>
|
|
|
+ <if test="templateBottom != null">#{templateBottom}::jsonb,</if>
|
|
|
+ <if test="results != null">#{results}::jsonb,</if>
|
|
|
+ <if test="viewing_angle != null ">#{viewing_angle}::jsonb,</if>
|
|
|
+ <if test="review_date != null ">#{review_date}</if>
|
|
|
+
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+
|
|
|
+ <update id="updateZtBillboardmodellisthistory" parameterType="com.onemap.sanya.domain.business.ZtBillboardmodellisthistory">
|
|
|
+ update "zt_billboardModelListHistory"
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="billboardInfoId != null">"billboardInfoId" = #{billboardInfoId},</if>
|
|
|
+ <if test="billboardName != null">"billboardName" = #{billboardName},</if>
|
|
|
+ <if test="billboardType != null">"billboardType" = #{billboardType},</if>
|
|
|
+ <if test="x != null">x = #{x},</if>
|
|
|
+ <if test="y != null">y = #{y},</if>
|
|
|
+ <if test="z != null">z = #{z},</if>
|
|
|
+ <if test="rotateX != null">"rotateX" = #{rotateX},</if>
|
|
|
+ <if test="rotateY != null">"rotateY" = #{rotateY},</if>
|
|
|
+ <if test="rotateZ != null">"rotateZ" = #{rotateZ},</if>
|
|
|
+ <if test="ReviewStatus != null">"ReviewStatus" = #{ReviewStatus},</if>
|
|
|
+ <if test="ReviewComments != null">"ReviewComments" = #{ReviewComments},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="isAddModel != null">"isAddModel" = #{isAddModel},</if>
|
|
|
+ <if test="remarks != null">remarks = #{remarks},</if>
|
|
|
+ <if test="template != null">"template" = #{template}::jsonb,</if>
|
|
|
+ <if test="templateTop != null">"templateTop" = #{templateTop}::jsonb,</if>
|
|
|
+ <if test="templateCentre != null">"templateCentre" = #{templateCentre}::jsonb,</if>
|
|
|
+ <if test="templateBottom != null">"templateBottom" = #{templateBottom}::jsonb,</if>
|
|
|
+ <if test="results != null">"results" = #{results}::jsonb,</if>
|
|
|
+ <if test="viewing_angle != null">"viewing_angle" = #{viewing_angle}::jsonb,</if>
|
|
|
+ <if test="review_date != null">review_date = #{review_date},</if>
|
|
|
+
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteZtBillboardmodellisthistoryById" parameterType="String">
|
|
|
+ delete from "zt_billboardModelListHistory" where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteZtBillboardmodellisthistoryByIds" parameterType="String">
|
|
|
+ delete from "zt_billboardModelListHistory" where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|