无关风月
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
<?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.TLensSeriesMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.jilongda.manage.model.TLensSeries">
        <id column="id" property="id" />
        <result column="name" property="name" />
        <result column="brandId" property="brandId" />
        <result column="supplierId" property="supplierId" />
        <result column="type" property="type" />
        <result column="sphere" property="sphere" />
        <result column="asphericSurface" property="asphericSurface" />
        <result column="doubleNon" property="doubleNon" />
        <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="status" property="status" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, name, brandId, supplierId, type, sphere, asphericSurface, doubleNon, createTime, updateTime, createBy, updateBy, isDelete
    </sql>
    <select id="pageList" resultType="com.jilongda.manage.vo.TLensSeriesVO">
        select t1.*,t2.name as brandName
        from t_lens_series t1
        left join t_brand t2 on t1.brandId = t2.id
              where 1=1
              <if test="query.brandId != null and query.brandId != ''">
                  and t1.brandId = #{query.brandId}
              </if>
              <if test="query.type != null and query.type != ''">
                  and t1.type = #{query.type}
              </if>
              and t2.type = 2
              and t2.status = 1
        and t1.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        and t2.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        order by t1.id asc
    </select>
 
</mapper>