You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.1 KiB
49 lines
2.1 KiB
<?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.qniao.dam.infrastructure.persistent.dao.contract.ContractDao">
|
|
|
|
|
|
<select id="pageCustomizedServiceContract"
|
|
resultType="com.qniao.dam.api.query.contract.user.response.UserPageCustomizedServiceContractVo">
|
|
SELECT
|
|
dac.id,
|
|
dac.first_party_identity_type,
|
|
dac.first_party_id,
|
|
dac.first_party_name,
|
|
dac.first_party_identity_no,
|
|
dac.second_party_identity_type,
|
|
dac.second_party_id,
|
|
dac.second_party_name,
|
|
dac.second_party_identity_no,
|
|
dac.amount,
|
|
dac.sign_date,
|
|
dac.start_date,
|
|
dac.end_date,
|
|
dac.status,
|
|
dac.remark
|
|
from da_contract as dac
|
|
LEFT JOIN da_dating_store_customer as dadsc on dac.first_party_id=dadsc.id
|
|
where dac.is_delete=0
|
|
<if test="queryParams.status != null">
|
|
and dac.status = #{queryParams.status}
|
|
</if>
|
|
<if test="queryParams.datingStoreOrgId != null">
|
|
and dadsc.dating_store_org_id = #{queryParams.datingStoreOrgId}
|
|
</if>
|
|
<if test="queryParams.datingStoreCustomerName != null and queryParams.datingStoreCustomerName != '' ">
|
|
AND dac.first_party_name LIKE CONCAT('%', TRIM(#{queryParams.datingStoreCustomerName}), '%')
|
|
</if>
|
|
<if test="queryParams.datingStoreCustomerIdentityNo != null and queryParams.datingStoreCustomerIdentityNo != '' ">
|
|
AND dac.first_party_identity_no LIKE CONCAT('%', TRIM(#{queryParams.datingStoreCustomerIdentityNo}), '%')
|
|
</if>
|
|
<if test="queryParams.datingStoreCustomerPhone != null and queryParams.datingStoreCustomerPhone != '' ">
|
|
AND dadsc.phone LIKE CONCAT('%', TRIM(#{queryParams.datingStoreCustomerPhone}), '%')
|
|
</if>
|
|
<if test="queryParams.signDateFrom != null and queryParams.signDateTo != null">
|
|
and dac.sign_date BETWEEN #{queryParams.signDateFrom} and #{queryParams.signDateTo}
|
|
</if>
|
|
ORDER BY dac.sign_date desc
|
|
</select>
|
|
|
|
|
|
</mapper>
|