jinlin
2024-02-23 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a
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
<?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.zt.modules.sys.dao.SysMapDao">
 
    <select id="getMapsDto" resultType="com.zt.modules.sys.dto.MapDto">
        SELECT a.id,a.code,a.name FROM
            SYS_TEAMGROUP_CLASS a,
            SYS_MAP b
        WHERE a.is_delete =0
            AND b.SUB_ID = a.id
            AND b.TYPE=#{type}
            AND main_id =#{mainId}
    </select>
 
    <select id="getList" resultType="com.zt.modules.sys.model.SysMap">
        select a.*
        from SYS_MAP a
        where a.is_delete = 0
        and a.main_id = #{mainId}
        and a.type = #{type}
    </select>
 
    <update id="deleteByMainId">
        update SYS_MAP set  is_delete =1,UPDATE_DATE = CURRENT_TIMESTAMP where main_id = #{mainId}
        and type = #{type}
    </update>
 
    <select id="checkItemNum" resultType="java.lang.Integer">
        SELECT count(1)
        from SYS_MAP a
        WHERE a.is_delete =0
          AND a.SUB_ID = #{id}
          AND a.TYPE=#{type}
          AND a.main_id =#{mainId}
    </select>
</mapper>