<?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>
|