无关风月
2025-02-28 2f8e70ad2884d2b6b7443dfae0af11ae9cfc8b99
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?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.jilongda.manage.mapper.TFrameWarehousingDetailMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.jilongda.manage.model.TFrameWarehousingDetail">
        <id column="id" property="id" />
        <result column="warehousingId" property="warehousingId" />
        <result column="brand" property="brand" />
        <result column="supplier" property="supplier" />
        <result column="material" property="material" />
        <result column="total" property="total" />
        <result column="color" property="color" />
        <result column="model" property="model" />
        <result column="code" property="code" />
        <result column="createTime" property="createTime" />
        <result column="updateTime" property="updateTime" />
        <result column="createBy" property="createBy" />
        <result column="updateBy" property="updateBy" />
        <result column="isDelete" property="isDelete" />
        <result column="modelId" property="modelId" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, warehousingId, brand, supplier, material, total, color, model, code, createTime, updateTime, createBy, updateBy, isDelete, modelId
    </sql>
    <select id="pageList" resultType="com.jilongda.manage.vo.TFrameWarehousingDetailVO">
        select tfwd.id, tfwd.warehousingId, tfwd.brand, tfwd.supplier, tfwd.material, tfwd.total, tfwd.color, tfwd.model, tfwd.code, tfwd.createTime,
               tfwd.updateTime, tfwd.createBy, tfwd.updateBy, tfwd.isDelete, tfwd.modelId,tw.storeId,tw.status,tfwd.orderId
        from t_frame_warehousing_detail tfwd
        left join t_warehousing tw on tfwd.warehousingId = tw.id
        <where>
            <if test="query.brand != null and query.brand != ''">
                and tfwd.brand = #{query.brand}
            </if>
            <if test="query.supplier != null and query.supplier != ''">
                and tfwd.supplier = #{query.supplier}
            </if>
            <if test="query.color != null and query.color != ''">
                and tfwd.color = #{query.color}
            </if>
            <if test="query.model != null and query.model != ''">
                and tfwd.model like concat('%',#{query.model},'%')
            </if>
            <if test="query.storeId != null">
                and tw.storeId = #{query.storeId}
            </if>
            <if test="query.status != null">
                and tw.status = #{query.status}
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                and tfwd.createTime between #{query.startTime} and #{query.endTime}
            </if>
            and tfwd.isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tfwd.createTime DESC
    </select>
 
</mapper>