1234567891011121314151617181920212223242526272829 |
- <?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.zjugis.business.mapper.ContractApplyMapper">
- <select id="page" resultType="com.zjugis.business.bean.response.ContractApplyResp">
- SELECT t.*,t1.name as contractName,t2.xmmc as projectName,t2.zrbm as zrbm,t2.xmbh as projectNumber FROM CONTRACT_APPLY t
- LEFT JOIN CONTRACT t1 on t1.ID = t.CONTRACT_ID
- LEFT JOIN PROJECT t2 on t2.ID = t.PROJECT_ID
- <where>
- t.ISVALID = 1
- <if test="params != null and params.projectName != null and params.projectName != ''">
- <bind name="xmmc" value="'%'+params.projectName+'%'"/>
- AND t2.XMMC LIKE #{xmmc}
- </if>
- <if test="params != null and params.projectNumber != null and params.projectNumber != ''">
- <bind name="xmbh" value="'%'+params.projectNumber+'%'"/>
- AND t2.XMBH LIKE #{xmbh}
- </if>
- <if test="params != null and params.isSign != null">
- AND t.IS_SIGN = #{params.isSign,jdbcType=INTEGER}
- </if>
- <if test="params != null and params.applyType != null">
- AND t.APPLY_TYPE = #{params.applyType,jdbcType=INTEGER}
- </if>
- </where>
- ORDER BY t.APPLY_DATE DESC
- </select>
- </mapper>
|