123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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.zkqy.business.mapper.MobilePageDataMapper">
-
- <resultMap type="com.zkqy.business.entity.MobilePageData" id="MobilePageDataResult">
- <result property="id" column="id" />
- <result property="name" column="name" />
- <result property="pageJson" column="pageJson" />
- </resultMap>
- <sql id="selectMobilePageDataVo">
- select id, name, pageJson from {DBNAME}.mobile_page_data
- </sql>
- <select id="selectMobilePageDataList" parameterType="com.zkqy.business.entity.MobilePageData" resultMap="MobilePageDataResult">
- <include refid="selectMobilePageDataVo"/>
- <where>
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
- <if test="pageJson != null and pageJson != ''"> and pageJson = #{pageJson}</if>
- </where>
- </select>
-
- <select id="selectMobilePageDataById" parameterType="Long" resultMap="MobilePageDataResult">
- <include refid="selectMobilePageDataVo"/>
- where id = #{id}
- </select>
- <select id="selectMobilePageDataIndexTrue" resultType="com.zkqy.business.entity.MobilePageData">
- <include refid="selectMobilePageDataVo"/>
- where isIndex ='true'
- </select>
- <insert id="insertMobilePageData" parameterType="com.zkqy.business.entity.MobilePageData" useGeneratedKeys="true" keyProperty="id">
- insert into mobile_page_data
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="name != null">name,</if>
- <if test="pageJson != null">pageJson,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="name != null">#{name},</if>
- <if test="pageJson != null">#{pageJson},</if>
- </trim>
- </insert>
- <update id="updateMobilePageData" parameterType="com.zkqy.business.entity.MobilePageData">
- update mobile_page_data
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null">name = #{name},</if>
- <if test="pageJson != null">pageJson = #{pageJson},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteMobilePageDataById" parameterType="Long">
- delete from mobile_page_data where id = #{id}
- </delete>
- <delete id="deleteMobilePageDataByIds" parameterType="String">
- delete from mobile_page_data where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|