|
@@ -0,0 +1,173 @@
|
|
|
|
+<?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.caimei.modules.landing.mapper.CmBrandLandingMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="CmBrandLanding" id="CmBrandLandingResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="authUserId" column="authUserId" />
|
|
|
|
+ <result property="type" column="type" />
|
|
|
|
+ <result property="headPcBanner" column="headPcBanner" />
|
|
|
|
+ <result property="headAppBanner" column="headAppBanner" />
|
|
|
|
+ <result property="jumpStatus" column="jumpStatus" />
|
|
|
|
+ <result property="jumpPcPicture" column="jumpPcPicture" />
|
|
|
|
+ <result property="jumpAppPicture" column="jumpAppPicture" />
|
|
|
|
+ <result property="jumpLink" column="jumpLink" />
|
|
|
|
+ <result property="title" column="title" />
|
|
|
|
+ <result property="content" column="content" />
|
|
|
|
+ <result property="video" column="video" />
|
|
|
|
+ <result property="sort" column="sort" />
|
|
|
|
+ <result property="pcStatus" column="pcStatus" />
|
|
|
|
+ <result property="appStatus" column="appStatus" />
|
|
|
|
+ <result property="delFlag" column="delFlag" />
|
|
|
|
+ <result property="updateTime" column="updateTime" />
|
|
|
|
+ <result property="addTime" column="addTime" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <sql id="selectCmBrandLandingVo">
|
|
|
|
+ select id, authUserId, type, headPcBanner, headAppBanner, jumpStatus, jumpPcPicture, jumpAppPicture, jumpLink, title, content, video, sort, pcStatus, appStatus, delFlag, updateTime, addTime from cm_brand_landing
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectCmBrandLandingList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
|
|
|
|
+ <include refid="selectCmBrandLandingVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="id != null and id != ''"> and id = #{id}</if>
|
|
|
|
+ <if test="authUserId != null "> and authUserId = #{authUserId}</if>
|
|
|
|
+ <if test="type != null "> and type = #{type}</if>
|
|
|
|
+ <if test="headPcBanner != null and headPcBanner != ''"> and headPcBanner = #{headPcBanner}</if>
|
|
|
|
+ <if test="headAppBanner != null and headAppBanner != ''"> and headAppBanner = #{headAppBanner}</if>
|
|
|
|
+ <if test="jumpStatus != null "> and jumpStatus = #{jumpStatus}</if>
|
|
|
|
+ <if test="jumpPcPicture != null and jumpPcPicture != ''"> and jumpPcPicture = #{jumpPcPicture}</if>
|
|
|
|
+ <if test="jumpAppPicture != null and jumpAppPicture != ''"> and jumpAppPicture = #{jumpAppPicture}</if>
|
|
|
|
+ <if test="jumpLink != null and jumpLink != ''"> and jumpLink = #{jumpLink}</if>
|
|
|
|
+ <if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
|
+ <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
|
+ <if test="video != null and video != ''"> and video = #{video}</if>
|
|
|
|
+ <if test="sort != null "> and sort = #{sort}</if>
|
|
|
|
+ <if test="pcStatus != null "> and pcStatus = #{pcStatus}</if>
|
|
|
|
+ <if test="appStatus != null "> and appStatus = #{appStatus}</if>
|
|
|
|
+ <if test="delFlag != null "> and delFlag = #{delFlag}</if>
|
|
|
|
+ <if test="updateTime != null "> and updateTime = #{updateTime}</if>
|
|
|
|
+ <if test="addTime != null "> and addTime = #{addTime}</if>
|
|
|
|
+ </where>
|
|
|
|
+ order by sort desc
|
|
|
|
+ </select>
|
|
|
|
+ <select id="findList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
|
|
|
|
+ <include refid="selectCmBrandLandingVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="id != null and id != ''"> and id = #{id}</if>
|
|
|
|
+ <if test="authUserId != null "> and authUserId = #{authUserId}</if>
|
|
|
|
+ <if test="type != null "> and type = #{type}</if>
|
|
|
|
+ <if test="headPcBanner != null and headPcBanner != ''"> and headPcBanner = #{headPcBanner}</if>
|
|
|
|
+ <if test="headAppBanner != null and headAppBanner != ''"> and headAppBanner = #{headAppBanner}</if>
|
|
|
|
+ <if test="jumpStatus != null "> and jumpStatus = #{jumpStatus}</if>
|
|
|
|
+ <if test="jumpPcPicture != null and jumpPcPicture != ''"> and jumpPcPicture = #{jumpPcPicture}</if>
|
|
|
|
+ <if test="jumpAppPicture != null and jumpAppPicture != ''"> and jumpAppPicture = #{jumpAppPicture}</if>
|
|
|
|
+ <if test="jumpLink != null and jumpLink != ''"> and jumpLink = #{jumpLink}</if>
|
|
|
|
+ <if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
|
+ <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
|
+ <if test="video != null and video != ''"> and video = #{video}</if>
|
|
|
|
+ <if test="sort != null "> and sort = #{sort}</if>
|
|
|
|
+ <if test="pcStatus != null "> and pcStatus = #{pcStatus}</if>
|
|
|
|
+ <if test="appStatus != null "> and appStatus = #{appStatus}</if>
|
|
|
|
+ <if test="delFlag != null "> and delFlag = #{delFlag}</if>
|
|
|
|
+ <if test="updateTime != null "> and updateTime = #{updateTime}</if>
|
|
|
|
+ <if test="addTime != null "> and addTime = #{addTime}</if>
|
|
|
|
+ </where>
|
|
|
|
+ order by sort desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectCmBrandLandingById" parameterType="String" resultMap="CmBrandLandingResult">
|
|
|
|
+ <include refid="selectCmBrandLandingVo"/>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findBigSort" resultType="java.lang.String">
|
|
|
|
+ SELECT sort FROM cm_brand_landing ORDER BY sort DESC LIMIT 1
|
|
|
|
+ </select>
|
|
|
|
+ <update id="updateSort">
|
|
|
|
+ update cm_brand_landing set sort=#{sort}
|
|
|
|
+ where id= #{id}
|
|
|
|
+ </update>
|
|
|
|
+ <insert id="insertCmBrandLanding" parameterType="CmBrandLanding" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
+ insert into cm_brand_landing
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="authUserId != null">authUserId,</if>
|
|
|
|
+ <if test="type != null">type,</if>
|
|
|
|
+ <if test="headPcBanner != null">headPcBanner,</if>
|
|
|
|
+ <if test="headAppBanner != null">headAppBanner,</if>
|
|
|
|
+ <if test="jumpStatus != null">jumpStatus,</if>
|
|
|
|
+ <if test="jumpPcPicture != null">jumpPcPicture,</if>
|
|
|
|
+ <if test="jumpAppPicture != null">jumpAppPicture,</if>
|
|
|
|
+ <if test="jumpLink != null">jumpLink,</if>
|
|
|
|
+ <if test="title != null">title,</if>
|
|
|
|
+ <if test="content != null">content,</if>
|
|
|
|
+ <if test="video != null">video,</if>
|
|
|
|
+ <if test="sort != null">sort,</if>
|
|
|
|
+ <if test="pcStatus != null">pcStatus,</if>
|
|
|
|
+ <if test="appStatus != null">appStatus,</if>
|
|
|
|
+ <if test="delFlag != null">delFlag,</if>
|
|
|
|
+ <if test="updateTime != null">updateTime,</if>
|
|
|
|
+ <if test="addTime != null">addTime,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="authUserId != null">#{authUserId},</if>
|
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
|
+ <if test="headPcBanner != null">#{headPcBanner},</if>
|
|
|
|
+ <if test="headAppBanner != null">#{headAppBanner},</if>
|
|
|
|
+ <if test="jumpStatus != null">#{jumpStatus},</if>
|
|
|
|
+ <if test="jumpPcPicture != null">#{jumpPcPicture},</if>
|
|
|
|
+ <if test="jumpAppPicture != null">#{jumpAppPicture},</if>
|
|
|
|
+ <if test="jumpLink != null">#{jumpLink},</if>
|
|
|
|
+ <if test="title != null">#{title},</if>
|
|
|
|
+ <if test="content != null">#{content},</if>
|
|
|
|
+ <if test="video != null">#{video},</if>
|
|
|
|
+ <if test="sort != null">#{sort},</if>
|
|
|
|
+ <if test="pcStatus != null">#{pcStatus},</if>
|
|
|
|
+ <if test="appStatus != null">#{appStatus},</if>
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="addTime != null">#{addTime},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateCmBrandLanding" parameterType="CmBrandLanding">
|
|
|
|
+ update cm_brand_landing
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="authUserId != null">authUserId = #{authUserId},</if>
|
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
|
+ <if test="headPcBanner != null">headPcBanner = #{headPcBanner},</if>
|
|
|
|
+ <if test="headAppBanner != null">headAppBanner = #{headAppBanner},</if>
|
|
|
|
+ <if test="jumpStatus != null">jumpStatus = #{jumpStatus},</if>
|
|
|
|
+ <if test="jumpPcPicture != null">jumpPcPicture = #{jumpPcPicture},</if>
|
|
|
|
+ <if test="jumpAppPicture != null">jumpAppPicture = #{jumpAppPicture},</if>
|
|
|
|
+ <if test="jumpLink != null">jumpLink = #{jumpLink},</if>
|
|
|
|
+ <if test="title != null">title = #{title},</if>
|
|
|
|
+ <if test="content != null">content = #{content},</if>
|
|
|
|
+ <if test="video != null">video = #{video},</if>
|
|
|
|
+ <if test="sort != null">sort = #{sort},</if>
|
|
|
|
+ <if test="pcStatus != null">pcStatus = #{pcStatus},</if>
|
|
|
|
+ <if test="appStatus != null">appStatus = #{appStatus},</if>
|
|
|
|
+ <if test="delFlag != null">delFlag = #{delFlag},</if>
|
|
|
|
+ <if test="updateTime != null">updateTime = #{updateTime},</if>
|
|
|
|
+ <if test="addTime != null">addTime = #{addTime},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteCmBrandLandingById" parameterType="String">
|
|
|
|
+ delete from cm_brand_landing where id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteCmBrandLandingByIds" parameterType="String">
|
|
|
|
+ delete from cm_brand_landing where id in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+</mapper>
|