src/main/resources/mapper/ScheduleMapper.xml
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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.yj.oa.project.mapper.ScheduleMapper">
<resultMap id="BaseResultMap" type="com.yj.oa.project.po.Schedule">
<id column="sId" property="id" jdbcType="INTEGER"/>
<result column="createBy" property="createBy" jdbcType="VARCHAR"/>
<result column="startTime" property="startTime" jdbcType="TIMESTAMP"/>
<result column="endTime" property="endTime" jdbcType="TIMESTAMP"/>
<result column="createTime" property="createTime" jdbcType="TIMESTAMP"/>
<result column="title" property="title" jdbcType="VARCHAR"/>
<result column="descr" property="descr" jdbcType="VARCHAR"/>
<result column="status" property="status" jdbcType="VARCHAR"/>
<result column="isComplete" property="isComplete" jdbcType="INTEGER"/>
<association property="user" javaType="User">
<result column="sName" property="name"/>
<association property="deptPo" javaType="Dept">
<result property="deptName" column="deptName"/>
</association>
</association>
<collection property="userList" ofType="User">
<id column="uid" property="uid"/>
<result column="mName" property="name"/>
<result column="dept" property="dept"/>
</collection>
</resultMap>
<sql id="Base_Column_List">
s.id as sId, createBy, s.startTime, s.endTime,s.createTime, title, s.descr, s.status,isComplete,
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
d.deptName,u.uid,u.name as mName,u.dept,uu.name as sName
from t_dept d
INNER JOIN t_user uu on d.depId=uu.dept
INNER JOIN t_schedule s ON uu.uid = s.createBy
LEFT JOIN t_schedule_user su ON su.s_Id=s.id
LEFT JOIN t_user u ON su.su_Id = u.uId
where s.id = #{id,jdbcType=INTEGER}
</select>
<select id="selectScheduleList" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
d.deptName,u.name as mName,u.dept,uu.name as sName
from t_dept d
INNER JOIN t_user uu on d.depId=uu.dept
INNER JOIN t_schedule s ON uu.uid = s.createBy
LEFT JOIN t_schedule_user su ON su.s_Id=s.id
LEFT JOIN t_user u ON su.su_Id = u.uId
<where>
<if test="id !=null and id!=''">
and id =#{id}
</if>
<if test="createBy !=null and id!=''">
and createBy =#{createBy}
</if>
后面还有 110 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。