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.
37 lines
1.3 KiB
37 lines
1.3 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.ccic.safeliab.dao.CustomerRetMapper"> |
|
|
|
<!-- 通用查询映射结果 --> |
|
<resultMap id="dictResultMap" type="com.ccic.safeliab.vo.CustomerRetentionVO"> |
|
<id column="id" property="id"/> |
|
<result column="customer_id" property="customerId"/> |
|
<result column="description" property="description"/> |
|
<result column="upload_time" property="uploadTime"/> |
|
<result column="file_id" property="fileId"/> |
|
<result column="file_name" property="fileName"/> |
|
<result column="file_uid" property="fileUid"/> |
|
</resultMap> |
|
|
|
<select id="selectCustomerRetPage" resultMap="dictResultMap"> |
|
SELECT |
|
a.id, |
|
a.customer_id, |
|
a.description, |
|
a.upload_time, |
|
a.file_id, |
|
a.file_name, |
|
b.file_name as file_uid |
|
FROM |
|
ex_customer_retention a |
|
LEFT JOIN ex_file b ON b.ID = A.file_id |
|
AND b.is_deleted = 0 |
|
WHERE |
|
a.is_deleted = 0 |
|
<if test="customerRet.customerId != null and customerRet.customerId != ''"> |
|
and a.customer_id = #{customerRet.customerId} |
|
</if> |
|
order by a.updated_at desc |
|
</select> |
|
|
|
</mapper>
|
|
|