161 lines
11 KiB
XML
161 lines
11 KiB
XML
<?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.xdadan.erp.emis.mapper.EmisTransLineMapper">
|
|
|
|
<resultMap type="EmisTransLine" id="EmisTransLineResult">
|
|
<result property="id" column="id" />
|
|
<result property="lineCode" column="line_code" />
|
|
<result property="lineName" column="line_name" />
|
|
<result property="status" column="status" />
|
|
<result property="siteAuditMan" column="site_audit_man" />
|
|
<result property="siteAuditManCode" column="site_audit_man_code" />
|
|
<result property="marketMan" column="market_man" />
|
|
<result property="marketManCode" column="market_man_code" />
|
|
<result property="operateMan" column="operate_man" />
|
|
<result property="operateManCode" column="operate_man_code" />
|
|
<result property="fromCountry" column="from_country" />
|
|
<result property="country" column="country" />
|
|
<result property="applyScope" column="apply_scope" />
|
|
<result property="logoType" column="logo_type" />
|
|
<result property="transType" column="trans_type" />
|
|
<result property="remark" column="remark" />
|
|
<result property="tenantId" column="tenant_id" />
|
|
<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="selectEmisTransLineVo">
|
|
select id, line_code, line_name, status, site_audit_man, site_audit_man_code, market_man, market_man_code, operate_man, operate_man_code, from_country, country, apply_scope, logo_type, trans_type, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time from emis_trans_line
|
|
</sql>
|
|
|
|
<select id="selectEmisTransLineList" parameterType="EmisTransLine" resultMap="EmisTransLineResult">
|
|
<include refid="selectEmisTransLineVo"/>
|
|
<where>
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="lineCode != null and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if>
|
|
<if test="lineName != null and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if>
|
|
<if test="status != null "> and status = #{status}</if>
|
|
<if test="siteAuditMan != null and siteAuditMan != ''"> and site_audit_man like concat('%', #{siteAuditMan}, '%')</if>
|
|
<if test="siteAuditManCode != null and siteAuditManCode != ''"> and site_audit_man_code like concat('%', #{siteAuditManCode}, '%')</if>
|
|
<if test="marketMan != null and marketMan != ''"> and market_man like concat('%', #{marketMan}, '%')</if>
|
|
<if test="marketManCode != null and marketManCode != ''"> and market_man_code like concat('%', #{marketManCode}, '%')</if>
|
|
<if test="operateMan != null and operateMan != ''"> and operate_man like concat('%', #{operateMan}, '%')</if>
|
|
<if test="operateManCode != null and operateManCode != ''"> and operate_man_code like concat('%', #{operateManCode}, '%')</if>
|
|
<if test="fromCountry != null and fromCountry != ''"> and from_country like concat('%', #{fromCountry}, '%')</if>
|
|
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
|
<if test="applyScope != null and applyScope != ''"> and apply_scope like concat('%', #{applyScope}, '%')</if>
|
|
<if test="logoType != null and logoType != ''"> and logo_type like concat('%', #{logoType}, '%')</if>
|
|
<if test="transType != null and transType != ''"> and trans_type like concat('%', #{transType}, '%')</if>
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
|
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
|
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
|
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectEmisTransLineById" parameterType="Long" resultMap="EmisTransLineResult">
|
|
select id, line_code, line_name, status, site_audit_man, site_audit_man_code, market_man, market_man_code, operate_man, operate_man_code, from_country, country, apply_scope, logo_type, trans_type, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time
|
|
from emis_trans_line a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertEmisTransLine" parameterType="EmisTransLine">
|
|
insert into emis_trans_line
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="lineCode != null and lineCode != ''">line_code,</if>
|
|
<if test="lineName != null and lineName != ''">line_name,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="siteAuditMan != null and siteAuditMan != ''">site_audit_man,</if>
|
|
<if test="siteAuditManCode != null and siteAuditManCode != ''">site_audit_man_code,</if>
|
|
<if test="marketMan != null and marketMan != ''">market_man,</if>
|
|
<if test="marketManCode != null and marketManCode != ''">market_man_code,</if>
|
|
<if test="operateMan != null and operateMan != ''">operate_man,</if>
|
|
<if test="operateManCode != null and operateManCode != ''">operate_man_code,</if>
|
|
<if test="fromCountry != null and fromCountry != ''">from_country,</if>
|
|
<if test="country != null and country != ''">country,</if>
|
|
<if test="applyScope != null and applyScope != ''">apply_scope,</if>
|
|
<if test="logoType != null and logoType != ''">logo_type,</if>
|
|
<if test="transType != null and transType != ''">trans_type,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="lineCode != null and lineCode != ''">#{lineCode},</if>
|
|
<if test="lineName != null and lineName != ''">#{lineName},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="siteAuditMan != null and siteAuditMan != ''">#{siteAuditMan},</if>
|
|
<if test="siteAuditManCode != null and siteAuditManCode != ''">#{siteAuditManCode},</if>
|
|
<if test="marketMan != null and marketMan != ''">#{marketMan},</if>
|
|
<if test="marketManCode != null and marketManCode != ''">#{marketManCode},</if>
|
|
<if test="operateMan != null and operateMan != ''">#{operateMan},</if>
|
|
<if test="operateManCode != null and operateManCode != ''">#{operateManCode},</if>
|
|
<if test="fromCountry != null and fromCountry != ''">#{fromCountry},</if>
|
|
<if test="country != null and country != ''">#{country},</if>
|
|
<if test="applyScope != null and applyScope != ''">#{applyScope},</if>
|
|
<if test="logoType != null and logoType != ''">#{logoType},</if>
|
|
<if test="transType != null and transType != ''">#{transType},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateEmisTransLine" parameterType="EmisTransLine">
|
|
update emis_trans_line
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if>
|
|
<if test="lineName != null and lineName != ''">line_name = #{lineName},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="siteAuditMan != null and siteAuditMan != ''">site_audit_man = #{siteAuditMan},</if>
|
|
<if test="siteAuditManCode != null and siteAuditManCode != ''">site_audit_man_code = #{siteAuditManCode},</if>
|
|
<if test="marketMan != null and marketMan != ''">market_man = #{marketMan},</if>
|
|
<if test="marketManCode != null and marketManCode != ''">market_man_code = #{marketManCode},</if>
|
|
<if test="operateMan != null and operateMan != ''">operate_man = #{operateMan},</if>
|
|
<if test="operateManCode != null and operateManCode != ''">operate_man_code = #{operateManCode},</if>
|
|
<if test="fromCountry != null and fromCountry != ''">from_country = #{fromCountry},</if>
|
|
<if test="country != null and country != ''">country = #{country},</if>
|
|
<if test="applyScope != null and applyScope != ''">apply_scope = #{applyScope},</if>
|
|
<if test="logoType != null and logoType != ''">logo_type = #{logoType},</if>
|
|
<if test="transType != null and transType != ''">trans_type = #{transType},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteEmisTransLineById" parameterType="Long">
|
|
delete from emis_trans_line where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisTransLineByIds" parameterType="String">
|
|
delete from emis_trans_line where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |