This commit is contained in:
linfso 2025-03-11 09:39:27 +08:00
parent a31a8aa4d7
commit 3c88e978ea
2 changed files with 15 additions and 6 deletions

View File

@ -37,6 +37,8 @@ public class EmisCreditCustomer extends BaseEntity
private Long id;
/* 客户编码 */
private String customerCode;
/* 月结卡号 */
private String monthlyPayCode;
/* 当前余额 */
private BigDecimal curMoney;
/* 余额比率 */
@ -56,6 +58,8 @@ public class EmisCreditCustomer extends BaseEntity
/* 是否启用 1-启用 0-未启用 */
private String blOpen;
// 其它扩展字段
private String customerName;
private String payee;

View File

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="EmisCreditCustomer" id="EmisCreditCustomerResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
<result property="id" column="id" />
<result property="customerCode" column="customer_code" />
<result property="monthlyPayCode" column="monthly_pay_code" />
<result property="curMoney" column="cur_money" />
<result property="curMoneyRate" column="cur_money_rate" />
<result property="creditMoney" column="credit_money" />
@ -22,13 +23,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectEmisCreditCustomerVo">
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
select id, customer_code, monthly_pay_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
from emis_credit_customer
</sql>
<select id="selectEmisCreditCustomerList" parameterType="EmisCreditCustomer" resultMap="EmisCreditCustomerResult">
select
a.id, a.customer_code, a.cur_money, a.cur_money_rate,
a.id, a.customer_code, a.monthly_pay_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,
@ -38,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.del_flag='0' and b.del_flag='0' and a.customer_code=b.customer_code
<if test="id != null "> and a.id = #{id}</if>
<if test="customerCode != null and customerCode != ''"> and a.customer_code=#{customerCode}</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''"> and monthly_pay_code=#{monthlyPayCode}</if>
<if test="curMoney != null "> and a.cur_money = #{curMoney}</if>
<if test="curMoneyRate != null "> and a.cur_money_rate = #{curMoneyRate}</if>
<if test="creditMoney != null "> and a.credit_money = #{creditMoney}</if>
@ -109,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEmisCreditCustomerById" parameterType="Long" resultMap="EmisCreditCustomerResult">
select
a.id, a.customer_code, a.cur_money, a.cur_money_rate,
a.id, a.customer_code,a.monthly_pay_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,
@ -117,11 +119,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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="customerCode != null and customerCode != ''">customer_code,</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''">monthly_pay_code,</if>
<if test="curMoney != null">cur_money,</if>
<if test="curMoneyRate != null">cur_money_rate,</if>
<if test="creditMoney != null">credit_money,</if>
@ -139,9 +142,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''">#{monthlyPayCode},</if>
<if test="curMoney != null">#{curMoney},</if>
<if test="curMoneyRate != null">#{curMoneyRate},</if>
<if test="creditMoney != null">#{creditMoney},</if>
@ -159,13 +163,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</trim>
</insert>
<update id="updateEmisCreditCustomer" parameterType="EmisCreditCustomer">
update emis_credit_customer
<trim prefix="SET" suffixOverrides=",">
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
<if test="monthlyPayCode != null and monthlyPayCode != ''">monthly_pay_code = #{monthlyPayCode},</if>
<if test="curMoney != null">cur_money = #{curMoney},</if>
<if test="curMoneyRate != null">cur_money_rate = #{curMoneyRate},</if>
<if test="creditMoney != null">credit_money = #{creditMoney},</if>