1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?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.minpay.db.table.own.mapper.ContractMapper">
- <select id="queryContract" resultType="hashmap" parameterType="java.util.Map">
- SELECT
- inf.OIF_ORDERNO "orderNo",
- inf.OIF_COM_ID "comId",
- info.CIF_NAME "cifName",
- fi.FRS_NO "no",
- fi.FRS_FILE_NAME "fileName",
- fi.FRS_FILE_URL "fileUrl",
- fi.FRS_CREATETIME "createTime",
- '00' as "productNum"
- FROM pub_file_resources fi, tp_order_inf inf, tp_company_info info
- WHERE
- info.CIF_ID = inf.OIF_COM_ID
- and fi.FRS_NO = inf.OIF_FINANCING_CON
- <if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
- AND fi.FRS_CREATETIME BETWEEN #{startDate,jdbcType=VARCHAR} AND #{endDate,jdbcType=VARCHAR}
- </if>
- <if test="contractNo == null or contractNo == ''">
- and fi.FRS_NO like CONCAT('%',#{contractNo, jdbcType=VARCHAR},'%')
- </if>
- <if test="contractType != null and contractType == '00'">
- and fi.FRS_NO = inf.OIF_FINANCING_CON
- </if>
- <if test="contractType != null and contractType == '01'">
- and fi.FRS_NO = inf.OIF_PRO_CON
- </if>
- <if test="contractType != null and contractType == '02'">
- and fi.FRS_NO = inf.OIF_GENER_AGREEMENT
- </if>
- <if test="contractType != null and contractType == '03'">
- and fi.FRS_NO = inf.OIF_FORWARD_CON_RUL
- </if>
- <if test="contractType == null and contractType == ''">
- and (fi.FRS_NO = inf.OIF_FINANCING_CON or fi.FRS_NO = inf.OIF_PRO_CON or fi.FRS_NO = inf.OIF_GENER_AGREEMENT or fi.FRS_NO = inf.OIF_FORWARD_CON_RUL)
- </if>
- <if test="contractNo != null and contractNo != ''">
- and fi.FRS_FILE_NAME like CONCAT('%', #{contractNo,jdbcType=VARCHAR}, '%')
- </if>
- <if test="orderNo != null and orderNo != ''">
- and inf.OIF_ORDERNO like CONCAT('%', #{orderNo,jdbcType=VARCHAR}, '%')
- </if>
- <if test="busName != null and busName != ''">
- and info.CIF_NAME like CONCAT('%', #{busName,jdbcType=VARCHAR}, '%')
- </if>
- </select>
-
- </mapper>
|