ModuleGroupMapper.xml
905 Bytes
<?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.monitor.mysql.mapper.ModuleGroupMapper" >
<resultMap id="BaseResultMap" type="com.model.ModuleGroup" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="cname" property="cname" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, name, cname
</sql>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from module_group
</select>
<select id="selectByName" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from module_group
where name = #{name,jdbcType=VARCHAR}
</select>
</mapper>