无关风月
2025-01-10 2c258c39133435fa0e6e6da85d503982fd5a967d
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
61
62
63
64
65
66
67
68
<?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.TLensWarehousingDetailMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.jilongda.manage.model.TLensWarehousingDetail">
        <id column="id" property="id" />
        <result column="brand" property="brand" />
        <result column="supplier" property="supplier" />
        <result column="series" property="series" />
        <result column="refractiveIndex" property="refractiveIndex" />
        <result column="ballMirror" property="ballMirror" />
        <result column="columnMirror" property="columnMirror" />
        <result column="type" property="type" />
        <result column="total" property="total" />
        <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="count" property="count" />
        <result column="seriesId" property="seriesId" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, brand, supplier, series, refractiveIndex, ballMirror, columnMirror, `type`, total, createTime, updateTime, createBy, updateBy, isDelete, `count`, seriesId
    </sql>
    <select id="pageLensList" resultType="com.jilongda.manage.vo.TLensWarehousingDetailVO">
        select tlwd.id, tlwd.warehousingId, tlwd.brand, tlwd.supplier, tlwd.series, tlwd.total, tlwd.refractiveIndex, tlwd.ballMirror, tlwd.code, tlwd.createTime,tlwd.columnMirror,
        tlwd.updateTime, tlwd.createBy, tlwd.updateBy, tlwd.isDelete, tlwd.`type`,tw.storeId,tw.status as status
        from t_lens_warehousing_detail tlwd
        left join t_warehousing tw on tlwd.warehousingId = tw.id
        <where>
            <if test="query.brand != null and query.brand != ''">
                and tlwd.brand = #{query.brand}
            </if>
            <if test="query.series != null and query.series != ''">
                and tlwd.series = #{query.series}
            </if>
            <if test="query.type != null and query.type != ''">
                and tlwd.`type` = #{query.type}
            </if>
            <if test="query.refractiveIndex != null and query.refractiveIndex != ''">
                and tlwd.refractiveIndex = #{query.refractiveIndex}
            </if>
            <if test="query.ballMirror != null and query.ballMirror != ''">
                and tlwd.ballMirror = #{query.ballMirror}
            </if>
            <if test="query.columnMirror != null and query.columnMirror != ''">
                and tlwd.columnMirror = #{query.columnMirror}
            </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 tlwd.createTime between #{query.startTime} and #{query.endTime}
            </if>
            and tlwd.isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        </where>
        and tw.status!=5
        ORDER BY tlwd.createTime DESC
    </select>
 
</mapper>