zss
2023-08-09 38128b9d40636d1387a5614a35d9be6927a5e3e6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?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.SaleMapper">
    <select id="selectSaleList" resultType="java.util.Map">
        select id,
        order_number,
        code,
        name,
        proname,
        type,
        DATE_FORMAT(delTime, '%Y-%m-%d') '交货日期'
        from mom_ocean.sale
        <where>
            state=1
            <if test="orderNumber!=null">
                and order_number=#{orderNumber}
            </if>
            <if test="name!=null">
                and name=#{name}
            </if>
            <if test="type!=null">
                and type=#{type}
            </if>
            <if test="delTime!=null">
                and DATE_FORMAT(delTime, '%Y-%m-%d')=#{delTime}
            </if>
        </where>
    </select>
</mapper>