无关风月
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
<?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.TInventoryMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.jilongda.manage.model.TInventory">
        <id column="id" property="id" />
        <result column="status" property="status" />
        <result column="type" property="type" />
        <result column="storeId" property="storeId" />
        <result column="remark" property="remark" />
        <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" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, status, type, storeId, remark, createTime, updateTime, createBy, updateBy, isDelete
    </sql>
    <select id="pageList" resultType="com.jilongda.manage.vo.TInventoryVO">
        select t1.*,t2.name as store from
            t_inventory t1
                    left join t_store t2 on t1.storeId = t2.id
        where 1=1
        <if test="query.status != null ">
            and t1.status = #{query.status}
        </if>
          <if test="query.createBy != null ">
            and t1.createBy = #{query.createBy}
        </if>
        <if test="query.type != null ">
            and t1.type = #{query.type}
        </if>
        <if test="query.storeId != null ">
            and t1.storeId = #{query.storeId}
        </if>
        <if test="query.startTime != null and query.startTime != ''">
            and t1.createTime between #{query.startTime} and #{query.endTime}
        </if>
        and t1.isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        order by t1.createTime desc
    </select>
 
</mapper>