<?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.iotek.ssm.dao.ApplyDao"> <select id="queryAllApply" resultType="Apply"> select * from apply </select> <select id="queryApplyByUname" parameterType="String" resultType="Apply"> select * from apply where uname=#{uname} </select> <insert id="insertApply" parameterType="Apply"> insert into apply(uname,deliveryTime,checkStatus,interviewStatus,interviewTime,hiring,did) values(#{uname},#{deliveryTime},#{checkStatus},#{interviewStatus},#{interviewTime},#{hiring},#{did}) </insert> <delete id="deleteApply" parameterType="int"> delete from apply where aid=#{aid} </delete> <update id="updateApply" parameterType="Apply"> update apply set checkStatus=#{checkStatus},interviewStatus=#{interviewStatus}, interviewTime=#{interviewTime},hiring=#{hiring} where aid=#{aid} </update> <select id="queryApplyByAid" parameterType="int" resultType="Apply"> select * from apply where aid=#{aid} </select> <select id="queryApplyByUnameAndInterviewStatus" parameterType="String" resultType="Apply"> select * from apply where uname=#{uname} and interviewStatus="按时面试" </select> <select id="queryApplyByDidAndInterviewStatus" resultType="Apply"> select * from apply where did=#{did} and interviewStatus="确认面试" </select> </mapper>这段代码是干嘛的
时间: 2023-07-19 22:52:21 浏览: 108
xml自动配置:mybatis-3-config.dtd和mybatis-3-mapper.dtd
这段代码是 MyBatis 的 Mapper 文件,用于定义数据库操作的 SQL 语句。该 Mapper 定义了一些 SQL 语句,包括查询所有申请、按用户名查询申请、插入申请、删除申请、更新申请、按申请编号查询申请、按用户名和面试状态查询申请以及按部门编号和面试状态查询申请。这些 SQL 语句可以通过 MyBatis 框架调用执行,从而对数据库进行操作。
阅读全文