| | |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | <select id="pageNew" resultType="com.by4cloud.platformx.device.entity.vo.ContractItemPageVo"> |
| | | select |
| | | ci.id, |
| | | ci.amount, |
| | | ci.month, |
| | | ci.name, |
| | | ci.num, |
| | | ci.price, |
| | | ci.specification, |
| | | ci.unit, |
| | | ci.contract_id, |
| | | ci.device_id, |
| | | d.name deviceName, |
| | | c.name contractName |
| | | from |
| | | contract_item ci |
| | | join contract c on ci.contract_id = c.id |
| | | join device d on d.id = ci.device_id |
| | | where |
| | | ci.del_flag = '0' |
| | | <if test="queryDTO.deviceId != null"> |
| | | and ci.device_id = #{queryDTO.deviceId} |
| | | </if> |
| | | <if test="queryDTO.contractId != null"> |
| | | and ci.contract_id = #{queryDTO.contractId} |
| | | </if> |
| | | <if test="queryDTO.contractName != null and queryDTO.contractName !=''"> |
| | | and c.name like CONCAT('%', #{queryDTO.contractName}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |