md
This commit is contained in:
parent
ae46ec6e51
commit
8456875983
@ -59,7 +59,8 @@ public class EmisCreditCustomer extends BaseEntity
|
||||
|
||||
|
||||
// 其它扩展字段
|
||||
/* 客户名称 */
|
||||
private String customerName;
|
||||
private String payee;
|
||||
private String salesmen;
|
||||
|
||||
}
|
||||
|
||||
@ -17,6 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="blOpen" column="bl_open" />
|
||||
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="payee" column="payee" />
|
||||
<result property="salesmen" column="salesmen" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisCreditCustomerVo">
|
||||
@ -30,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.credit_money, a.currency, a.trans_type, a.start_date, a.end_date,
|
||||
a.bl_open, a.remark, a.tenant_id, a.del_flag, a.create_by, a.create_time,
|
||||
a.update_by, a.update_time, a.create_site, a.update_site,
|
||||
b.customer_name
|
||||
b.customer_name,b.salesmen,b.payee
|
||||
from emis_credit_customer a,emis_customer_user b
|
||||
<where>
|
||||
a.del_flag='0' and b.del_flag='0' and a.customer_code=b.customer_code
|
||||
@ -54,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createSite != null and createSite != ''"> and a.create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and a.update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="checkUnique" parameterType="EmisCreditCustomer" resultType="int">
|
||||
@ -83,15 +85,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectEmisCreditCustomerById" parameterType="Long" resultMap="EmisCreditCustomerResult">
|
||||
select id, customer_code, cur_money, cur_money_rate, credit_money, currency, trans_type, start_date, end_date, bl_open, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_credit_customer a
|
||||
where a.id = #{id}
|
||||
select
|
||||
a.id, a.customer_code, a.cur_money, a.cur_money_rate,
|
||||
a.credit_money, a.currency, a.trans_type, a.start_date, a.end_date,
|
||||
a.bl_open, a.remark, a.tenant_id, a.del_flag, a.create_by, a.create_time,
|
||||
a.update_by, a.update_time, a.create_site, a.update_site,
|
||||
b.customer_name,b.salesmen,b.payee
|
||||
from emis_credit_customer a,emis_customer_user b
|
||||
where a.customer_code=b.customer_code and a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisCreditCustomer" parameterType="EmisCreditCustomer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_credit_customer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="customerCode != null and customerCode != ''">customer_code,</if>
|
||||
<if test="curMoney != null">cur_money,</if>
|
||||
<if test="curMoneyRate != null">cur_money_rate,</if>
|
||||
@ -112,7 +118,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
|
||||
<if test="curMoney != null">#{curMoney},</if>
|
||||
<if test="curMoneyRate != null">#{curMoneyRate},</if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user