144 lines
9.9 KiB
XML
144 lines
9.9 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.EmisCustomerAccountMapper">
|
|
|
|
<resultMap type="EmisCustomerAccount" id="EmisCustomerAccountResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
|
<result property="id" column="id" />
|
|
<result property="accCode" column="acc_code" />
|
|
<result property="curMoney" column="cur_money" />
|
|
<result property="frozenMoney" column="frozen_money" />
|
|
<result property="confirmMoney" column="confirm_money" />
|
|
<result property="watchMoney" column="watch_money" />
|
|
<result property="closeMoney" column="close_money" />
|
|
<result property="earnestMoney" column="earnest_money" />
|
|
<result property="currency" column="currency" />
|
|
<result property="startDate" column="start_date" />
|
|
<result property="blOpen" column="bl_open" />
|
|
<result property="blLock" column="bl_lock" />
|
|
|
|
</resultMap>
|
|
|
|
<sql id="selectEmisCustomerAccountVo">
|
|
select id, acc_code, cur_money, frozen_money, confirm_money, watch_money, close_money, earnest_money, currency, start_date, bl_open, bl_lock, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark from emis_customer_account
|
|
</sql>
|
|
|
|
<select id="selectEmisCustomerAccountList" parameterType="EmisCustomerAccount" resultMap="EmisCustomerAccountResult">
|
|
<include refid="selectEmisCustomerAccountVo"/>
|
|
<where>
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="accCode != null and accCode != ''"> and acc_code like concat('%', #{accCode}, '%')</if>
|
|
<if test="curMoney != null and curMoney != ''"> and cur_money like concat('%', #{curMoney}, '%')</if>
|
|
<if test="frozenMoney != null and frozenMoney != ''"> and frozen_money like concat('%', #{frozenMoney}, '%')</if>
|
|
<if test="confirmMoney != null and confirmMoney != ''"> and confirm_money like concat('%', #{confirmMoney}, '%')</if>
|
|
<if test="watchMoney != null and watchMoney != ''"> and watch_money like concat('%', #{watchMoney}, '%')</if>
|
|
<if test="closeMoney != null and closeMoney != ''"> and close_money like concat('%', #{closeMoney}, '%')</if>
|
|
<if test="earnestMoney != null and earnestMoney != ''"> and earnest_money like concat('%', #{earnestMoney}, '%')</if>
|
|
<if test="currency != null and currency != ''"> and currency like concat('%', #{currency}, '%')</if>
|
|
<if test="startDate != null and startDate != ''"> and start_date like concat('%', #{startDate}, '%')</if>
|
|
<if test="blOpen != null and blOpen != ''"> and bl_open like concat('%', #{blOpen}, '%')</if>
|
|
<if test="blLock != null and blLock != ''"> and bl_lock like concat('%', #{blLock}, '%')</if>
|
|
<if test="createSiteCode != null and createSiteCode != ''"> and create_site_code like concat('%', #{createSiteCode}, '%')</if>
|
|
<if test="modifySiteCode != null and modifySiteCode != ''"> and modify_site_code like concat('%', #{modifySiteCode}, '%')</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>
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectEmisCustomerAccountById" parameterType="Long" resultMap="EmisCustomerAccountResult">
|
|
select id, acc_code, cur_money, frozen_money, confirm_money, watch_money, close_money, earnest_money, currency, start_date, bl_open, bl_lock, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark
|
|
from emis_customer_account a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertEmisCustomerAccount" parameterType="EmisCustomerAccount">
|
|
insert into emis_customer_account
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="accCode != null and accCode != ''">acc_code,</if>
|
|
<if test="curMoney != null and curMoney != ''">cur_money,</if>
|
|
<if test="frozenMoney != null and frozenMoney != ''">frozen_money,</if>
|
|
<if test="confirmMoney != null and confirmMoney != ''">confirm_money,</if>
|
|
<if test="watchMoney != null and watchMoney != ''">watch_money,</if>
|
|
<if test="closeMoney != null and closeMoney != ''">close_money,</if>
|
|
<if test="earnestMoney != null and earnestMoney != ''">earnest_money,</if>
|
|
<if test="currency != null and currency != ''">currency,</if>
|
|
<if test="startDate != null and startDate != ''">start_date,</if>
|
|
<if test="blOpen != null and blOpen != ''">bl_open,</if>
|
|
<if test="blLock != null and blLock != ''">bl_lock,</if>
|
|
<if test="createSiteCode != null and createSiteCode != ''">create_site_code,</if>
|
|
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code,</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>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="accCode != null and accCode != ''">#{accCode},</if>
|
|
<if test="curMoney != null and curMoney != ''">#{curMoney},</if>
|
|
<if test="frozenMoney != null and frozenMoney != ''">#{frozenMoney},</if>
|
|
<if test="confirmMoney != null and confirmMoney != ''">#{confirmMoney},</if>
|
|
<if test="watchMoney != null and watchMoney != ''">#{watchMoney},</if>
|
|
<if test="closeMoney != null and closeMoney != ''">#{closeMoney},</if>
|
|
<if test="earnestMoney != null and earnestMoney != ''">#{earnestMoney},</if>
|
|
<if test="currency != null and currency != ''">#{currency},</if>
|
|
<if test="startDate != null and startDate != ''">#{startDate},</if>
|
|
<if test="blOpen != null and blOpen != ''">#{blOpen},</if>
|
|
<if test="blLock != null and blLock != ''">#{blLock},</if>
|
|
<if test="createSiteCode != null and createSiteCode != ''">#{createSiteCode},</if>
|
|
<if test="modifySiteCode != null and modifySiteCode != ''">#{modifySiteCode},</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>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateEmisCustomerAccount" parameterType="EmisCustomerAccount">
|
|
update emis_customer_account
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="accCode != null and accCode != ''">acc_code = #{accCode},</if>
|
|
<if test="curMoney != null and curMoney != ''">cur_money = #{curMoney},</if>
|
|
<if test="frozenMoney != null and frozenMoney != ''">frozen_money = #{frozenMoney},</if>
|
|
<if test="confirmMoney != null and confirmMoney != ''">confirm_money = #{confirmMoney},</if>
|
|
<if test="watchMoney != null and watchMoney != ''">watch_money = #{watchMoney},</if>
|
|
<if test="closeMoney != null and closeMoney != ''">close_money = #{closeMoney},</if>
|
|
<if test="earnestMoney != null and earnestMoney != ''">earnest_money = #{earnestMoney},</if>
|
|
<if test="currency != null and currency != ''">currency = #{currency},</if>
|
|
<if test="startDate != null and startDate != ''">start_date = #{startDate},</if>
|
|
<if test="blOpen != null and blOpen != ''">bl_open = #{blOpen},</if>
|
|
<if test="blLock != null and blLock != ''">bl_lock = #{blLock},</if>
|
|
<if test="createSiteCode != null and createSiteCode != ''">create_site_code = #{createSiteCode},</if>
|
|
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code = #{modifySiteCode},</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>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteEmisCustomerAccountById" parameterType="Long">
|
|
delete from emis_customer_account where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisCustomerAccountByIds" parameterType="String">
|
|
delete from emis_customer_account where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |