|
|
|
<?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.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper">
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgApplyAmountInfo">
|
|
|
|
<id column="id" property="id" />
|
|
|
|
<result column="company_id" property="companyId" />
|
|
|
|
<result column="presenter_id" property="presenterId" />
|
|
|
|
<result column="apply_amount" property="applyAmount" />
|
|
|
|
<result column="apply_time" property="applyTime" />
|
|
|
|
<result column="bank" property="bank" />
|
|
|
|
<result column="amount_wide" property="amountWide" />
|
|
|
|
<result column="en_guarantee_measures" property="enGuaranteeMeasures" />
|
|
|
|
<result column="description" property="description" />
|
|
|
|
<result column="business_type" property="businessType" />
|
|
|
|
<result column="create_time" property="createTime" />
|
|
|
|
<result column="update_time" property="updateTime" />
|
|
|
|
</resultMap>
|
|
|
|
<select id="pageByCondition" resultType="com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse">
|
|
|
|
select ai.company_id,ai.presenter_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,ai.create_time,
|
|
|
|
ai.status,cc.name,cc.phone
|
|
|
|
from dg_apply_amount_info ai
|
|
|
|
left join crms_company_customer ccl on ai.company_id = ccl.id
|
|
|
|
left join crms_customer cc on cc.id = ccl.customer_id
|
|
|
|
<where>
|
|
|
|
<if test="CustomerNumberOrName != null and CustomerNumberOrName != ''">
|
|
|
|
AND ai.business_code LIKE CONCAT('%',#{CustomerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{CustomerNumberOrName},'%')
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectAmountList" resultMap="BaseResultMap">
|
|
|
|
select *
|
|
|
|
from dg_apply_amount_info
|
|
|
|
</select>
|
|
|
|
</mapper>
|