41 lines
1.3 KiB
XML
41 lines
1.3 KiB
XML
<?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.hivekion.team.mapper.TeaminfoMapper">
|
|
<resultMap id="DMTeamInfo" type="com.hivekion.team.entity.Teaminfo">
|
|
<result property="id" column="id"/>
|
|
<result property="guid" column="guid"/>
|
|
<result property="name" column="name"/>
|
|
<result property="type" column="type"/>
|
|
<result property="mappingguid" column="mappingguid"/>
|
|
<result property="iconId" column="icon_id"/>
|
|
<!-- 其他字段 -->
|
|
</resultMap>
|
|
<select id="list" resultMap="DMTeamInfo" parameterType="com.hivekion.team.entity.Teaminfo" databaseId="dm">
|
|
select
|
|
t.seq,
|
|
t.*
|
|
FROM (
|
|
SELECT
|
|
ROW_NUMBER() OVER (ORDER BY id desc) AS seq,
|
|
a.*
|
|
FROM tbl_teaminfo a
|
|
<where>
|
|
<if test="type != null" >
|
|
type =#{type}
|
|
</if>
|
|
</where>
|
|
) t
|
|
|
|
WHERE t.seq > #{start} AND t.seq <= (#{start} + #{pageSize})
|
|
</select>
|
|
|
|
<select id="count" resultType="java.lang.Long" parameterType="com.hivekion.team.entity.Teaminfo" databaseId="dm">
|
|
select count(id) from tbl_teaminfo
|
|
<where>
|
|
<if test="type != null" >
|
|
type =#{type}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper>
|