<?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.smartor.mapper.BaseSmsaccountMapper">
|
|
<resultMap type="BaseSmsaccount" id="BaseSmsaccountResult">
|
<result property="smsacountid" column="smsacountid" />
|
<result property="smsname" column="smsname" />
|
<result property="account" column="account" />
|
<result property="password" column="password" />
|
<result property="remark" column="remark" />
|
<result property="orgid" column="orgid" />
|
<result property="delFlag" column="del_flag" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="isupload" column="isupload" />
|
<result property="uploadTime" column="upload_time" />
|
<result property="isenable" column="isenable" />
|
</resultMap>
|
|
<sql id="selectBaseSmsaccountVo">
|
select smsacountid, smsname, account, password, remark, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, isenable from base_smsaccount
|
</sql>
|
|
<select id="selectBaseSmsaccountList" parameterType="BaseSmsaccount" resultMap="BaseSmsaccountResult">
|
<include refid="selectBaseSmsaccountVo"/>
|
<where>
|
<if test="smsname != null and smsname != ''"> and smsname like concat('%', #{smsname}, '%')</if>
|
<if test="account != null and account != ''"> and account = #{account}</if>
|
<if test="password != null and password != ''"> and password = #{password}</if>
|
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
|
<if test="isupload != null "> and isupload = #{isupload}</if>
|
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
|
<if test="isenable != null "> and isenable = #{isenable}</if>
|
</where>
|
</select>
|
|
<select id="selectBaseSmsaccountBySmsacountid" parameterType="Long" resultMap="BaseSmsaccountResult">
|
<include refid="selectBaseSmsaccountVo"/>
|
where smsacountid = #{smsacountid}
|
</select>
|
|
<insert id="insertBaseSmsaccount" parameterType="BaseSmsaccount" useGeneratedKeys="true" keyProperty="smsacountid">
|
insert into base_smsaccount
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="smsname != null">smsname,</if>
|
<if test="account != null">account,</if>
|
<if test="password != null">password,</if>
|
<if test="remark != null">remark,</if>
|
<if test="orgid != null">orgid,</if>
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="isupload != null">isupload,</if>
|
<if test="uploadTime != null">upload_time,</if>
|
<if test="isenable != null">isenable,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="smsname != null">#{smsname},</if>
|
<if test="account != null">#{account},</if>
|
<if test="password != null">#{password},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="orgid != null">#{orgid},</if>
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="isupload != null">#{isupload},</if>
|
<if test="uploadTime != null">#{uploadTime},</if>
|
<if test="isenable != null">#{isenable},</if>
|
</trim>
|
</insert>
|
|
<update id="updateBaseSmsaccount" parameterType="BaseSmsaccount">
|
update base_smsaccount
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="smsname != null">smsname = #{smsname},</if>
|
<if test="account != null">account = #{account},</if>
|
<if test="password != null">password = #{password},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
<if test="orgid != null">orgid = #{orgid},</if>
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="isupload != null">isupload = #{isupload},</if>
|
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
<if test="isenable != null">isenable = #{isenable},</if>
|
</trim>
|
where smsacountid = #{smsacountid}
|
</update>
|
|
<delete id="deleteBaseSmsaccountBySmsacountid" parameterType="Long">
|
delete from base_smsaccount where smsacountid = #{smsacountid}
|
</delete>
|
|
<delete id="deleteBaseSmsaccountBySmsacountids" parameterType="String">
|
delete from base_smsaccount where smsacountid in
|
<foreach item="smsacountid" collection="array" open="(" separator="," close=")">
|
#{smsacountid}
|
</foreach>
|
</delete>
|
</mapper>
|