XiaoRuby
2023-08-09 bc672038e88a24d9f0f7127cd45c656a15c231a2
1
2
3
4
5
6
7
8
9
10
11
12
<?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.yuanchu.mom.mapper.SaleMaterialMapper">
    <select id="selectSaleDatil" resultType="com.yuanchu.mom.pojo.SaleMaterial">
        select id, name, specifications, unit, number, price, state, create_time, update_time, sale_id
        from mom_ocean.sale_material
        where state=1
        <if test="id!=null">
            and sale_id=#{id}
        </if>
    </select>
</mapper>