XiaoRuby
2023-08-17 66ff6f509bbbba04cffc428e7e1c886b534b4f13
inventory-server/src/main/resources/mapper/RepertoryMapper.xml
@@ -2,30 +2,30 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yuanchu.mom.mapper.RepertoryMapper">
    <select id="selectAllRepertory" resultType="java.util.Map">
        select name,
        select id,
        name,
        specifications,
        code,
        requirements,
        order_code,
        seat,
        quality_traceability,
        user_name,
        DATE_FORMAT(create_time, '%Y-%m-%d') '入库日期',
        check_result,
        note
        from mom_ocean.repertory
        <where>
            and state=1
            <if test="name!=null">
                and name =#{name}
            <if test="name!=null and name!=''">
                and name LIKE CONCAT('%',#{name},'%')
            </if>
            <if test="specifications!=null ">
                and specifications=#{specifications}
            <if test="specifications!=null and specifications!=''">
                and specifications LIKE CONCAT('%',#{specifications},'%')
            </if>
            <if test="time!=null ">
            <if test="time!=null and time!=''">
                and create_time=#{time}
            </if>
            <if test="type!=null">
            <if test="type!=null ">
                and type=#{type}
            </if>
            order by id desc
        </where>
    </select>
</mapper>