lanan-system/dl-module-repair/src/main/resources/mapper/project/RepairOrderInfoMapper.xml

36 lines
1.6 KiB
XML
Raw Normal View History

2024-09-23 15:24:09 +08:00
<?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="cn.iocoder.yudao.module.project.mapper.RepairOrderInfoMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="queryListPage" resultType="cn.iocoder.yudao.module.project.vo.RepairOrderInfoRespVO">
SELECT
roi.*
FROM
repair_order_info roi
<where>
roi.deleted = 0
<if test="entity.orderNo != null and entity.orderNo != ''">
and roi.order_no like concat('%', #{entity.orderNo}, '%')
</if>
<if test="entity.goodsTitle != null and entity.goodsTitle != ''">
and roi.goods_totle like concat('%', #{entity.goodsTitle}, '%')
</if>
<if test="entity.goodsType != null and entity.goodsType != ''">
and roi.goods_type = #{entity.goodsType}
</if>
<if test="entity.cusName != null and entity.cusName != ''">
and roi.cus_name like concat('%', #{entity.cusName}, '%')
</if>
<if test="entity.orderStatus != null and entity.orderStatus != ''">
and roi.order_status = #{entity.orderStatus}
</if>
</where>
</select>
</mapper>