12345678910111213141516171819202122232425 |
- <?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.zglc.kg.dao.FaultDao">
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.zglc.kg.entity.FaultEntity" id="faultMap">
- <result property="id" column="id"/>
- <result property="fault_name" column="fault_name"/>
- <result property="describes" column="describes"/>
- <result property="remarks" column="remarks"/>
- </resultMap>
- <select id="listAll" resultMap="faultMap">
- select *
- from t_fault
- where id > 0
- </select>
- <select id="findByName" parameterType="String" resultMap="faultMap">
- select * from t_fault
- where fault_name like #{name}
- </select>
- </mapper>
|