2024-08-24 23:40:04 +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="com.hcy.common.mapper.sparePart.SparePartMapper">
|
|
|
|
|
|
|
|
<select id="pageList" resultType="com.hcy.common.dto.SparePartDto">
|
|
|
|
SELECT
|
|
|
|
lsp.*,
|
|
|
|
lw.warehouse_name as warehouseName
|
|
|
|
FROM
|
|
|
|
la_spare_part AS lsp
|
|
|
|
LEFT JOIN la_warehouse AS lw ON lw.id = lsp.warehouse_id
|
|
|
|
<where>
|
|
|
|
lsp.is_delete = 0
|
|
|
|
<if test="param.keywords != null and param.keywords != ''">
|
|
|
|
and (lsp.spare_parts_code like concat('%',#{param.keywords},'%') or
|
|
|
|
lsp.spare_parts_name like concat('%',#{param.keywords},'%') or
|
|
|
|
lw.warehouse_name like concat('%',#{param.keywords},'%'))
|
|
|
|
</if>
|
2024-08-25 20:03:53 +08:00
|
|
|
<if test="param.warehouseIds != null and param.warehouseIds != ''">
|
|
|
|
and find_in_set(lw.id,#{param.warehouseIds})
|
|
|
|
</if>
|
2024-08-24 23:40:04 +08:00
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|