From e2aa651db9f17d58819329de571037edc0f9eba2 Mon Sep 17 00:00:00 2001 From: yaowanxin <3588231647@qq.com> Date: 星期一, 23 六月 2025 18:13:37 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml | 194 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 194 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml b/src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml new file mode 100644 index 0000000..2db9406 --- /dev/null +++ b/src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml @@ -0,0 +1,194 @@ +<?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.ruoyi.staff_management.mapper.RyglAddEmployeeMapper"> + + <resultMap id="BaseResultMap" type="staff_management.domain.RyglAddEmployee"> + <id property="id" column="id" jdbcType="INTEGER"/> + <result property="status" column="status" jdbcType="INTEGER"/> + <result property="employeeNumber" column="employee_number" jdbcType="VARCHAR"/> + <result property="name" column="name" jdbcType="VARCHAR"/> + <result property="sex" column="sex" jdbcType="VARCHAR"/> + <result property="nativePlace" column="native_place" jdbcType="VARCHAR"/> + <result property="post" column="post" jdbcType="VARCHAR"/> + <result property="homeAddress" column="home_address" jdbcType="VARCHAR"/> + <result property="firstDegree" column="first_degree" jdbcType="VARCHAR"/> + <result property="major" column="major" jdbcType="VARCHAR"/> + <result property="idNumber" column="id_number" jdbcType="INTEGER"/> + <result property="age" column="age" jdbcType="INTEGER"/> + <result property="contactNumber" column="contact_number" jdbcType="INTEGER"/> + <result property="emergencyContact" column="emergency_contact" jdbcType="VARCHAR"/> + <result property="emergencyContactNumber" column="emergency_contact_number" jdbcType="INTEGER"/> + <result property="contractTerm" column="contract_term" jdbcType="VARCHAR"/> + <result property="contractStartDate" column="contract_start_date" jdbcType="TIMESTAMP"/> + <result property="contractEndDate" column="contract_end_date" jdbcType="TIMESTAMP"/> + </resultMap> + + <sql id="Base_Column_List"> + id,status,employee_number, + name,sex,native_place, + post,home_address,first_degree, + major,id_number,age, + contact_number,emergency_contact,emergency_contact_number, + contract_term,contract_start_date,contract_end_date + </sql> + + <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> + select + <include refid="Base_Column_List" /> + from rygl_add_employee + where id = #{id,jdbcType=INTEGER} + </select> + <select id="getAllEmployees" resultType="com.ruoyi.staff_management.domain.RyglAddEmployee"> + SELECT * FROM rygl_add_employee + </select> + <select id="searchByName" resultType="com.ruoyi.staff_management.domain.RyglAddEmployee"> + SELECT * FROM rygl_add_employee WHERE name LIKE CONCAT('%', #{name}, '%') + </select> + + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> + delete from rygl_add_employee + where id = #{id,jdbcType=INTEGER} + </delete> + + <insert id="insert" keyColumn="id" keyProperty="id" parameterType="staff_management.domain.RyglAddEmployee" useGeneratedKeys="true"> + insert into rygl_add_employee + ( id,status,employee_number + ,name,sex,native_place + ,post,home_address,first_degree + ,major,id_number,age + ,contact_number,emergency_contact,emergency_contact_number + ,contract_term,contract_start_date,contract_end_date + ) + values (#{id,jdbcType=INTEGER},#{status,jdbcType=INTEGER},#{employeeNumber,jdbcType=VARCHAR} + ,#{name,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR},#{nativePlace,jdbcType=VARCHAR} + ,#{post,jdbcType=VARCHAR},#{homeAddress,jdbcType=VARCHAR},#{firstDegree,jdbcType=VARCHAR} + ,#{major,jdbcType=VARCHAR},#{idNumber,jdbcType=INTEGER},#{age,jdbcType=INTEGER} + ,#{contactNumber,jdbcType=INTEGER},#{emergencyContact,jdbcType=VARCHAR},#{emergencyContactNumber,jdbcType=INTEGER} + ,#{contractTerm,jdbcType=VARCHAR},#{contractStartDate,jdbcType=TIMESTAMP},#{contractEndDate,jdbcType=TIMESTAMP} + ) + </insert> + <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="staff_management.domain.RyglAddEmployee" useGeneratedKeys="true"> + insert into rygl_add_employee + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null">id,</if> + <if test="status != null">status,</if> + <if test="employeeNumber != null">employee_number,</if> + <if test="name != null">name,</if> + <if test="sex != null">sex,</if> + <if test="nativePlace != null">native_place,</if> + <if test="post != null">post,</if> + <if test="homeAddress != null">home_address,</if> + <if test="firstDegree != null">first_degree,</if> + <if test="major != null">major,</if> + <if test="idNumber != null">id_number,</if> + <if test="age != null">age,</if> + <if test="contactNumber != null">contact_number,</if> + <if test="emergencyContact != null">emergency_contact,</if> + <if test="emergencyContactNumber != null">emergency_contact_number,</if> + <if test="contractTerm != null">contract_term,</if> + <if test="contractStartDate != null">contract_start_date,</if> + <if test="contractEndDate != null">contract_end_date,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null">#{id,jdbcType=INTEGER},</if> + <if test="status != null">#{status,jdbcType=INTEGER},</if> + <if test="employeeNumber != null">#{employeeNumber,jdbcType=VARCHAR},</if> + <if test="name != null">#{name,jdbcType=VARCHAR},</if> + <if test="sex != null">#{sex,jdbcType=VARCHAR},</if> + <if test="nativePlace != null">#{nativePlace,jdbcType=VARCHAR},</if> + <if test="post != null">#{post,jdbcType=VARCHAR},</if> + <if test="homeAddress != null">#{homeAddress,jdbcType=VARCHAR},</if> + <if test="firstDegree != null">#{firstDegree,jdbcType=VARCHAR},</if> + <if test="major != null">#{major,jdbcType=VARCHAR},</if> + <if test="idNumber != null">#{idNumber,jdbcType=INTEGER},</if> + <if test="age != null">#{age,jdbcType=INTEGER},</if> + <if test="contactNumber != null">#{contactNumber,jdbcType=INTEGER},</if> + <if test="emergencyContact != null">#{emergencyContact,jdbcType=VARCHAR},</if> + <if test="emergencyContactNumber != null">#{emergencyContactNumber,jdbcType=INTEGER},</if> + <if test="contractTerm != null">#{contractTerm,jdbcType=VARCHAR},</if> + <if test="contractStartDate != null">#{contractStartDate,jdbcType=TIMESTAMP},</if> + <if test="contractEndDate != null">#{contractEndDate,jdbcType=TIMESTAMP},</if> + </trim> + </insert> + <update id="updateByPrimaryKeySelective" parameterType="staff_management.domain.RyglAddEmployee"> + update rygl_add_employee + <set> + <if test="status != null"> + status = #{status,jdbcType=INTEGER}, + </if> + <if test="employeeNumber != null"> + employee_number = #{employeeNumber,jdbcType=VARCHAR}, + </if> + <if test="name != null"> + name = #{name,jdbcType=VARCHAR}, + </if> + <if test="sex != null"> + sex = #{sex,jdbcType=VARCHAR}, + </if> + <if test="nativePlace != null"> + native_place = #{nativePlace,jdbcType=VARCHAR}, + </if> + <if test="post != null"> + post = #{post,jdbcType=VARCHAR}, + </if> + <if test="homeAddress != null"> + home_address = #{homeAddress,jdbcType=VARCHAR}, + </if> + <if test="firstDegree != null"> + first_degree = #{firstDegree,jdbcType=VARCHAR}, + </if> + <if test="major != null"> + major = #{major,jdbcType=VARCHAR}, + </if> + <if test="idNumber != null"> + id_number = #{idNumber,jdbcType=INTEGER}, + </if> + <if test="age != null"> + age = #{age,jdbcType=INTEGER}, + </if> + <if test="contactNumber != null"> + contact_number = #{contactNumber,jdbcType=INTEGER}, + </if> + <if test="emergencyContact != null"> + emergency_contact = #{emergencyContact,jdbcType=VARCHAR}, + </if> + <if test="emergencyContactNumber != null"> + emergency_contact_number = #{emergencyContactNumber,jdbcType=INTEGER}, + </if> + <if test="contractTerm != null"> + contract_term = #{contractTerm,jdbcType=VARCHAR}, + </if> + <if test="contractStartDate != null"> + contract_start_date = #{contractStartDate,jdbcType=TIMESTAMP}, + </if> + <if test="contractEndDate != null"> + contract_end_date = #{contractEndDate,jdbcType=TIMESTAMP}, + </if> + </set> + where id = #{id,jdbcType=INTEGER} + </update> + <update id="updateByPrimaryKey" parameterType="staff_management.domain.RyglAddEmployee"> + update rygl_add_employee + set + status = #{status,jdbcType=INTEGER}, + employee_number = #{employeeNumber,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=VARCHAR}, + native_place = #{nativePlace,jdbcType=VARCHAR}, + post = #{post,jdbcType=VARCHAR}, + home_address = #{homeAddress,jdbcType=VARCHAR}, + first_degree = #{firstDegree,jdbcType=VARCHAR}, + major = #{major,jdbcType=VARCHAR}, + id_number = #{idNumber,jdbcType=INTEGER}, + age = #{age,jdbcType=INTEGER}, + contact_number = #{contactNumber,jdbcType=INTEGER}, + emergency_contact = #{emergencyContact,jdbcType=VARCHAR}, + emergency_contact_number = #{emergencyContactNumber,jdbcType=INTEGER}, + contract_term = #{contractTerm,jdbcType=VARCHAR}, + contract_start_date = #{contractStartDate,jdbcType=TIMESTAMP}, + contract_end_date = #{contractEndDate,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + </update> +</mapper> -- Gitblit v1.9.3