<?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.ruoyi.technology.mapper.TechnologyBomMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.technology.pojo.TechnologyBom">
|
<id column="id" property="id" />
|
<result column="product_model_id" property="productModelId" />
|
<result column="remark" property="remark" />
|
<result column="version" property="version" />
|
<result column="create_time" property="createTime" />
|
<result column="update_time" property="updateTime" />
|
<result column="create_user" property="createUser" />
|
<result column="update_user" property="updateUser" />
|
<result column="bom_no" property="bomNo" />
|
<result column="dept_id" property="deptId" />
|
</resultMap>
|
|
<select id="listPage" resultType="com.ruoyi.technology.bean.vo.TechnologyBomVo">
|
select tb.*,
|
pm.model as productModelName,
|
p.product_name as productName
|
from technology_bom tb
|
left join product_model pm on tb.product_model_id = pm.id
|
left join product p on pm.product_id = p.id
|
<where>
|
<if test="c.productModelName != null and c.productModelName != ''">
|
and pm.model like concat('%', #{c.productModelName}, '%')
|
</if>
|
<if test="c.productName != null and c.productName != ''">
|
and p.product_name like concat('%', #{c.productName}, '%')
|
</if>
|
<if test="c.bomNo != null and c.bomNo != ''">
|
and tb.bom_no like concat('%', #{c.bomNo}, '%')
|
</if>
|
<if test="c.version != null and c.version != ''">
|
and tb.version = #{c.version}
|
</if>
|
</where>
|
order by tb.id desc
|
</select>
|
</mapper>
|