|
@@ -0,0 +1,83 @@
|
|
|
+<?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.ym.mec.biz.dal.dao.StudentInstrumentDao">
|
|
|
+ <resultMap id="StudentInstrument" type="com.ym.mec.biz.dal.entity.StudentInstrument" extends="com.ym.mec.biz.dal.dao.GoodsDao.Goods">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ <!--@Table student_instrument-->
|
|
|
+ <id column="id_" property="id" />
|
|
|
+ <result column="goods_id_" property="goodsId" />
|
|
|
+ <result column="status_" property="status" />
|
|
|
+ <result column="start_time_" property="startTime" />
|
|
|
+ <result column="end_time_" property="endTime" />
|
|
|
+ <result column="create_time_" property="createTime" />
|
|
|
+ <result column="update_time" property="updateTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ id_, goods_id_, status_, start_time_, end_time_, create_time_, update_time
|
|
|
+ </sql>
|
|
|
+ <select id="get" parameterType="java.lang.Integer" resultMap="StudentInstrument">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from student_instrument
|
|
|
+ where id_ = #{id}
|
|
|
+ </select>
|
|
|
+ <delete id="delete" parameterType="java.lang.Integer">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ delete from student_instrument
|
|
|
+ where id_ = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.StudentInstrument" useGeneratedKeys="true">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into student_instrument (goods_id_, status_, start_time_, end_time_, create_time_, update_time
|
|
|
+ )
|
|
|
+ values (#{goodsId}, #{status}, #{startTime}, #{endTime}, #{createTime}, #{updateTime}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentInstrument">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ update student_instrument
|
|
|
+ <set>
|
|
|
+ <if test="goodsId != null">
|
|
|
+ goods_id_ = #{goodsId},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status_ = #{status},
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ start_time_ = #{startTime},
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ end_time_ = #{endTime},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_ = #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id_ = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <select id="findAll" resultMap="StudentInstrument">
|
|
|
+ SELECT *
|
|
|
+ FROM student
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="StudentInstrument" parameterType="map">
|
|
|
+ SELECT * FROM student
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM student
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|