gonglilong
2024-09-14 7f615dc1f37ccc9efd7f5b2f7e044c2e62f01074
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
<?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="cn.gistack.sm.sg.mapper.SgGxMapper">
 
    <select id="queryPageList" resultType="cn.gistack.sm.sg.VO.SgGxVO">
        select * from  YWXT.SG_GX gx where 1=1 and GX_TYPE not in('sgzb','sgys')
        <if test="dto.gxType != null and dto.gxType != ''">
            and gx.gx_type  = #{dto.gxType}
            <if test="dto.childTypeList != null and !dto.childTypeList.isEmpty()">
                or gx.gx_type in
                <foreach collection="dto.childTypeList" open="(" close=")" separator="," item="id">
                    #{id}
                </foreach>
            </if>
        </if>
        <if test="dto.gxName != null and dto.gxName != ''">
            and gx.gx_name LIKE CONCAT('%', #{dto.gxName}, '%')
        </if>
    </select>
    <select id="queryStepByIds" resultType="cn.gistack.sm.sg.DO.SgGxStepDO">
        select * from YWXT.SG_GX_STEP step where 1=1
        <if test="ids.size>0 and ids != null">
            and step.gx_info_id in
            <foreach collection="ids" open="(" close=")" separator="," item="id">
                #{id}
            </foreach>
        </if>
    </select>
    <select id="selectByGxType" resultType="cn.gistack.sm.sg.VO.SgGxVO">
        select * from  YWXT.SG_GX  where gx_type = #{gxType}
    </select>
    <select id="getById" resultType="cn.gistack.sm.sg.VO.SgGxVO">
        select * from  YWXT.SG_GX  where id = #{id}
    </select>
    <select id="childType" resultType="java.lang.String">
        select dict_key from "YWXT"."BLADE_DICT_BIZ" where parent_id = (select id from "YWXT"."BLADE_DICT_BIZ" where dict_key = #{gxType});
    </select>
</mapper>