| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <?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.ruoyi.invest.mapper.TProjectChannelMapper">
-
- <resultMap type="TProjectChannel" id="TProjectChannelResult">
- <result property="id" column="id" />
- <result property="channelName" column="channel_name" />
- <result property="channelCode" column="channel_code" />
- <result property="channelType" column="channel_type" />
- <result property="channelBlurb" column="channel_blurb" />
- <result property="contacts" column="contacts" />
- <result property="telephone" column="telephone" />
- <result property="address" column="address" />
- <result property="channelHead" column="channel_head" />
- <result property="status" column="status" />
- <result property="mark" column="mark" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- </resultMap>
- <sql id="selectTProjectChannelVo">
- select id, channel_name, channel_code, channel_type, channel_blurb, contacts, telephone, address, channel_head, status, mark, del_flag, create_by, create_time, update_by, update_time from t_project_channel
- </sql>
- <select id="selectTProjectChannelList" parameterType="TProjectChannel" resultMap="TProjectChannelResult">
- <include refid="selectTProjectChannelVo"/>
- <where>
- del_flag = 0
- <if test="channelName != null and channelName != ''"> and channel_name like concat('%', #{channelName}, '%')</if>
- <if test="channelCode != null and channelCode != ''"> and channel_code = #{channelCode}</if>
- <if test="channelType != null and channelType != ''"> and channel_type = #{channelType}</if>
- <if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
- <if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
- <if test="channelHead != null and channelHead != ''"> and channel_head = #{channelHead}</if>
- <if test="status != null and status != ''"> and status = #{status}</if>
- </where>
- </select>
-
- <select id="selectTProjectChannelById" parameterType="String" resultMap="TProjectChannelResult">
- <include refid="selectTProjectChannelVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTProjectChannel" parameterType="TProjectChannel">
- insert into t_project_channel
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="channelName != null">channel_name,</if>
- <if test="channelCode != null">channel_code,</if>
- <if test="channelType != null">channel_type,</if>
- <if test="channelBlurb != null">channel_blurb,</if>
- <if test="contacts != null">contacts,</if>
- <if test="telephone != null">telephone,</if>
- <if test="address != null">address,</if>
- <if test="channelHead != null">channel_head,</if>
- <if test="status != null">status,</if>
- <if test="mark != null">mark,</if>
- <if test="delFlag != null">del_flag,</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>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="channelName != null">#{channelName},</if>
- <if test="channelCode != null">#{channelCode},</if>
- <if test="channelType != null">#{channelType},</if>
- <if test="channelBlurb != null">#{channelBlurb},</if>
- <if test="contacts != null">#{contacts},</if>
- <if test="telephone != null">#{telephone},</if>
- <if test="address != null">#{address},</if>
- <if test="channelHead != null">#{channelHead},</if>
- <if test="status != null">#{status},</if>
- <if test="mark != null">#{mark},</if>
- <if test="delFlag != null">#{delFlag},</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>
- </trim>
- </insert>
- <update id="updateTProjectChannel" parameterType="TProjectChannel">
- update t_project_channel
- <trim prefix="SET" suffixOverrides=",">
- <if test="channelName != null">channel_name = #{channelName},</if>
- <if test="channelCode != null">channel_code = #{channelCode},</if>
- <if test="channelType != null">channel_type = #{channelType},</if>
- <if test="channelBlurb != null">channel_blurb = #{channelBlurb},</if>
- <if test="contacts != null">contacts = #{contacts},</if>
- <if test="telephone != null">telephone = #{telephone},</if>
- <if test="address != null">address = #{address},</if>
- <if test="channelHead != null">channel_head = #{channelHead},</if>
- <if test="status != null">status = #{status},</if>
- <if test="mark != null">mark = #{mark},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</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>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteTProjectChannelById" parameterType="String">
- delete from t_project_channel where id = #{id}
- </delete>
- <delete id="deleteTProjectChannelByIds" parameterType="String">
- delete from t_project_channel where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <update id="updateTProjectChannelByIds" parameterType="String">
- update t_project_channel
- set del_flag = 1
- where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
- </mapper>
|