<?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.ycl.platform.mapper.TPlatformMapper">
|
|
<resultMap type="TPlatform" id="TPlatformResult">
|
<result property="id" column="id" />
|
<result property="platformCode" column="platform_code" />
|
<result property="platformName" column="platform_name" />
|
<result property="platformContact" column="platform_contact" />
|
<result property="platformContactPhone" column="platform_contact_phone" />
|
<result property="status" column="status" />
|
<result property="remark" column="remark" />
|
<result property="createTime" column="create_time" />
|
<result property="updateTime" column="update_time" />
|
<result property="deleted" column="deleted" />
|
</resultMap>
|
|
<sql id="selectTPlatformVo">
|
select id,
|
platform_code,
|
platform_name,
|
platform_contact,
|
platform_contact_phone,
|
status,
|
remark,
|
create_time,
|
update_time,
|
deleted
|
from t_platform
|
</sql>
|
|
<select id="selectTPlatformList" parameterType="TPlatform" resultMap="TPlatformResult">
|
<include refid="selectTPlatformVo"/>
|
<where>
|
<if test="platformCode != null and platformCode != ''"> and platform_code = #{platformCode}</if>
|
<if test="platformName != null and platformName != ''"> and platform_name like concat('%', #{platformName}, '%')</if>
|
<if test="platformContact != null and platformContact != ''"> and platform_contact = #{platformContact}</if>
|
<if test="platformContactPhone != null and platformContactPhone != ''"> and platform_contact_phone = #{platformContactPhone}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
</where>
|
</select>
|
|
<select id="selectTPlatformById" parameterType="Long" resultMap="TPlatformResult">
|
<include refid="selectTPlatformVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertTPlatform" parameterType="TPlatform" useGeneratedKeys="true" keyProperty="id">
|
insert into t_platform
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="platformCode != null and platformCode != ''">platform_code,</if>
|
<if test="platformName != null and platformName != ''">platform_name,</if>
|
<if test="platformContact != null and platformContact != ''">platform_contact,</if>
|
<if test="platformContactPhone != null and platformContactPhone != ''">platform_contact_phone,</if>
|
<if test="status != null">status,</if>
|
<if test="remark != null">remark,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="deleted != null">deleted,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="platformCode != null and platformCode != ''">#{platformCode},</if>
|
<if test="platformName != null and platformName != ''">#{platformName},</if>
|
<if test="platformContact != null and platformContact != ''">#{platformContact},</if>
|
<if test="platformContactPhone != null and platformContactPhone != ''">#{platformContactPhone},</if>
|
<if test="status != null">#{status},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="deleted != null">#{deleted},</if>
|
</trim>
|
</insert>
|
|
<update id="updateTPlatform" parameterType="TPlatform">
|
update t_platform
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="platformCode != null and platformCode != ''">platform_code = #{platformCode},</if>
|
<if test="platformName != null and platformName != ''">platform_name = #{platformName},</if>
|
<if test="platformContact != null and platformContact != ''">platform_contact = #{platformContact},</if>
|
<if test="platformContactPhone != null and platformContactPhone != ''">platform_contact_phone = #{platformContactPhone},</if>
|
<if test="status != null">status = #{status},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="deleted != null">deleted = #{deleted},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteTPlatformById" parameterType="Long">
|
delete from t_platform where id = #{id}
|
</delete>
|
|
<delete id="deleteTPlatformByIds" parameterType="String">
|
delete from t_platform where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|