wms/nflg-wms-repository/src/main/resources/mapper/WmsMaterialMapper.xml

37 lines
1.3 KiB
XML
Raw Normal View History

2025-07-01 16:42:36 +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">
2025-07-02 12:05:31 +08:00
<mapper namespace="com.nflg.wms.repository.mapper.WmsMaterialMapper">
2025-07-01 16:42:36 +08:00
<select id="search" resultType="com.nflg.wms.common.pojo.vo.MaterialVO">
SELECT DISTINCT ON ("no") *
2025-07-03 11:43:44 +08:00
FROM wms_material
2025-07-01 16:42:36 +08:00
<where>
<if test="request.no!=null and request.no!=''">
and "no" like concat('%', #{request.no}, '%')
</if>
2025-07-03 11:43:44 +08:00
<if test="request.describe!=null and request.describe!=''">
and describe like concat('%', #{request.describe}, '%')
</if>
2025-07-01 16:42:36 +08:00
</where>
2025-07-04 16:19:59 +08:00
ORDER BY "no",id DESC
2025-07-01 16:42:36 +08:00
</select>
<select id="getHistory" resultType="com.nflg.wms.common.pojo.vo.MaterialVO">
select *
2025-07-02 12:05:31 +08:00
from wms_material
2025-07-01 16:42:36 +08:00
where no=#{no}
order by id desc
</select>
2025-07-02 12:05:31 +08:00
<select id="getNotSet" resultType="com.nflg.wms.repository.entity.WmsMaterial">
2025-07-01 16:42:36 +08:00
SELECT *
FROM (
SELECT DISTINCT ON ("no") *
2025-07-02 12:05:31 +08:00
FROM wms_material
2025-07-01 16:42:36 +08:00
ORDER BY "no", id DESC
) t
where image is null or weight is null
ORDER BY id
</select>
</mapper>