From 7911497ffa51bd41fc334153b2a456ff02554747 Mon Sep 17 00:00:00 2001 From: shiyunteng <shiyunteng@example.com> Date: 星期二, 01 四月 2025 15:20:37 +0800 Subject: [PATCH] 整体流程测试修改0401-2 --- platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml b/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml index f13d680..942d102 100644 --- a/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml +++ b/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml @@ -21,4 +21,34 @@ <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> -- Gitblit v1.9.1