|
@@ -0,0 +1,129 @@
|
|
|
|
|
+<?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.usoftchina.smartschool.school.mapper.SysSchoolMapper" >
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysSchool" >
|
|
|
|
|
+ <id column="school_id" property="school_id" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="school_name" property="school_name" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="school_status" property="school_status" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="school_remarks" property="school_remarks" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="school_address" property="school_address" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="school_phone" property="school_phone" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="school_appid" property="school_appid" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="school_secret" property="school_secret" jdbcType="VARCHAR" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
|
|
+ school_id, school_name, school_status, school_remarks, school_address, school_phone,
|
|
|
|
|
+ school_appid, school_secret
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
|
+ from sys_school
|
|
|
|
|
+ where school_id = #{school_id,jdbcType=BIGINT}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
|
|
+ delete from sys_school
|
|
|
|
|
+ where school_id = #{school_id,jdbcType=BIGINT}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
|
|
|
|
|
+ insert into sys_school (school_id, school_name, school_status,
|
|
|
|
|
+ school_remarks, school_address, school_phone,
|
|
|
|
|
+ school_appid, school_secret)
|
|
|
|
|
+ values (#{school_id,jdbcType=BIGINT}, #{school_name,jdbcType=VARCHAR}, #{school_status,jdbcType=INTEGER},
|
|
|
|
|
+ #{school_remarks,jdbcType=VARCHAR}, #{school_address,jdbcType=VARCHAR}, #{school_phone,jdbcType=VARCHAR},
|
|
|
|
|
+ #{school_appid,jdbcType=VARCHAR}, #{school_secret,jdbcType=VARCHAR})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
|
|
|
|
|
+ insert into sys_school
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
|
+ <if test="school_id != null" >
|
|
|
|
|
+ school_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_name != null" >
|
|
|
|
|
+ school_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_status != null" >
|
|
|
|
|
+ school_status,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_remarks != null" >
|
|
|
|
|
+ school_remarks,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_address != null" >
|
|
|
|
|
+ school_address,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_phone != null" >
|
|
|
|
|
+ school_phone,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_appid != null" >
|
|
|
|
|
+ school_appid,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_secret != null" >
|
|
|
|
|
+ school_secret,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
|
+ <if test="school_id != null" >
|
|
|
|
|
+ #{school_id,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_name != null" >
|
|
|
|
|
+ #{school_name,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_status != null" >
|
|
|
|
|
+ #{school_status,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_remarks != null" >
|
|
|
|
|
+ #{school_remarks,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_address != null" >
|
|
|
|
|
+ #{school_address,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_phone != null" >
|
|
|
|
|
+ #{school_phone,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_appid != null" >
|
|
|
|
|
+ #{school_appid,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_secret != null" >
|
|
|
|
|
+ #{school_secret,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
|
|
|
|
|
+ update sys_school
|
|
|
|
|
+ <set >
|
|
|
|
|
+ <if test="school_name != null" >
|
|
|
|
|
+ school_name = #{school_name,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_status != null" >
|
|
|
|
|
+ school_status = #{school_status,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_remarks != null" >
|
|
|
|
|
+ school_remarks = #{school_remarks,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_address != null" >
|
|
|
|
|
+ school_address = #{school_address,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_phone != null" >
|
|
|
|
|
+ school_phone = #{school_phone,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_appid != null" >
|
|
|
|
|
+ school_appid = #{school_appid,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="school_secret != null" >
|
|
|
|
|
+ school_secret = #{school_secret,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where school_id = #{school_id,jdbcType=BIGINT}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
|
|
|
|
|
+ update sys_school
|
|
|
|
|
+ set school_name = #{school_name,jdbcType=VARCHAR},
|
|
|
|
|
+ school_status = #{school_status,jdbcType=INTEGER},
|
|
|
|
|
+ school_remarks = #{school_remarks,jdbcType=VARCHAR},
|
|
|
|
|
+ school_address = #{school_address,jdbcType=VARCHAR},
|
|
|
|
|
+ school_phone = #{school_phone,jdbcType=VARCHAR},
|
|
|
|
|
+ school_appid = #{school_appid,jdbcType=VARCHAR},
|
|
|
|
|
+ school_secret = #{school_secret,jdbcType=VARCHAR}
|
|
|
|
|
+ where school_id = #{school_id,jdbcType=BIGINT}
|
|
|
|
|
+ </update>
|
|
|
|
|
+</mapper>
|