Commit cc4eca1e authored by Administrator's avatar Administrator

创建项目

parent aae49d8f
<?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="cn.quant.baa.pay.mybatis.mapper.DepartmentsMapper">
<resultMap id="BaseResultMap" type="cn.quant.baa.pay.mybatis.entity.DepartmentsEntity">
<id column="dept_no" jdbcType="CHAR" property="deptNo" />
<result column="dept_name" jdbcType="VARCHAR" property="deptName" />
</resultMap>
<sql id="Base_Column_List">
dept_no, dept_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from departments
where dept_no = #{deptNo,jdbcType=CHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from departments
where dept_no = #{deptNo,jdbcType=CHAR}
</delete>
<insert id="insert" parameterType="cn.quant.baa.pay.mybatis.entity.DepartmentsEntity">
insert into departments (dept_no, dept_name)
values (#{deptNo,jdbcType=CHAR}, #{deptName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="cn.quant.baa.pay.mybatis.entity.DepartmentsEntity">
insert into departments
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptNo != null">
dept_no,
</if>
<if test="deptName != null">
dept_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptNo != null">
#{deptNo,jdbcType=CHAR},
</if>
<if test="deptName != null">
#{deptName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.quant.baa.pay.mybatis.entity.DepartmentsEntity">
update departments
<set>
<if test="deptName != null">
dept_name = #{deptName,jdbcType=VARCHAR},
</if>
</set>
where dept_no = #{deptNo,jdbcType=CHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cn.quant.baa.pay.mybatis.entity.DepartmentsEntity">
update departments
set dept_name = #{deptName,jdbcType=VARCHAR}
where dept_no = #{deptNo,jdbcType=CHAR}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment