|
@@ -0,0 +1,67 @@
|
|
|
+<?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.collectfee.dal.dao.ApplyInfoDao">
|
|
|
+
|
|
|
+ <resultMap type="com.ym.mec.collectfee.api.entity.ApplyInfo" id="ApplyInfo">
|
|
|
+ <result column="id_" property="id" />
|
|
|
+ <result column="name" property="name" />
|
|
|
+ <result column="sex" property="sex" />
|
|
|
+ <result column="birthday" property="birthday" />
|
|
|
+ <result column="city" property="city" />
|
|
|
+ <result column="school" property="school" />
|
|
|
+ <result column="grade" property="grade" />
|
|
|
+ <result column="gClass" property="gclass" />
|
|
|
+ <result column="mobile" property="mobile" />
|
|
|
+ <result column="sub_id" property="subId" />
|
|
|
+ <result column="isAdjust" property="isadjust" />
|
|
|
+ <result column="parent_name" property="parentName" />
|
|
|
+ <result column="parent_company" property="parentCompany" />
|
|
|
+ <result column="status" property="status" />
|
|
|
+ <result column="update_time" property="updateTime" />
|
|
|
+ <result column="create_time" property="createTime" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <select id="get" resultMap="ApplyInfo" >
|
|
|
+ SELECT * FROM apply_info WHERE id_ = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <select id="findAll" resultMap="ApplyInfo">
|
|
|
+ SELECT * FROM apply_info ORDER BY id_
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 向数据库增加一条记录 -->
|
|
|
+ <insert id="insert" parameterType="com.ym.mec.collectfee.api.entity.ApplyInfo" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
+ <!--
|
|
|
+ <selectKey resultClass="int" keyProperty="id" >
|
|
|
+ SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
|
+ </selectKey>
|
|
|
+ -->
|
|
|
+ INSERT INTO apply_info (id_,name,sex,birthday,city,school,grade,gClass,mobile,sub_id,isAdjust,parent_name,parent_company,status,update_time,create_time) VALUES(#{id},#{name},#{sex},#{birthday},#{city},#{school},#{grade},#{gclass},#{mobile},#{subId},#{isadjust},#{parentName},#{parentCompany},#{status},#{updateTime},#{createTime})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <update id="update" parameterType="com.ym.mec.collectfee.api.entity.ApplyInfo">
|
|
|
+ UPDATE apply_info SET birthday = #{birthday},parent_name = #{parentName},parent_company = #{parentCompany},create_time = #{createTime},id_ = #{id},city = #{city},sub_id = #{subId},sex = #{sex},mobile = #{mobile},update_time = #{updateTime},gClass = #{gclass},school = #{school},grade = #{grade},name = #{name},isAdjust = #{isadjust},status = #{status} WHERE id_ = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!-- 根据主键删除一条记录 -->
|
|
|
+ <delete id="delete" >
|
|
|
+ DELETE FROM apply_info WHERE id_ = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="ApplyInfo" parameterType="map">
|
|
|
+ SELECT * FROM apply_info ORDER BY id_ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM apply_info
|
|
|
+ </select>
|
|
|
+</mapper>
|