src/main/resources/mapper/AttendCountMapper.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.AttendCountMapper">
<resultMap id="BaseResultMap" type="com.yj.oa.project.po.AttendCount">
<id column="id" property="id" jdbcType="INTEGER"/>
<result column="userId" property="userId" jdbcType="VARCHAR"/>
<result column="deptId" property="deptId" jdbcType="INTEGER"/>
<result column="noAttendCount" property="noAttendCount" jdbcType="INTEGER"/>
<result column="dateYear" property="dateYear" jdbcType="VARCHAR"/>
<result column="dateMoth" property="dateMoth" jdbcType="VARCHAR"/>
<result column="leaveTimeLength" property="leaveTimeLength" jdbcType="DOUBLE"/>
<result column="lateTimeLength" property="lateTimeLength" jdbcType="DOUBLE"/>
<result column="lateCount" property="lateCount" jdbcType="INTEGER"/>
<result column="createTime" property="createTime" jdbcType="TIMESTAMP"/>
<result column="status" property="status" jdbcType="INTEGER"/>
<association property="user" javaType="User">
<result column="name" property="name"/>
</association>
<association property="dept" javaType="Dept">
<result column="deptName" property="deptName"/>
</association>
</resultMap>
<sql id="Base_Column_List">
id, userId, deptId, noAttendCount, dateYear, dateMoth, leaveTimeLength, lateTimeLength,
lateCount, ac.createTime, ac.status
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
from t_attendcount
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAttendCountList" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
,u.name,d.deptName
from t_dept d
RIGHT JOIN t_attendcount ac ON d.depId=ac.deptId
LEFT JOIN t_user u on u.uid=ac.userId
<where>
<if test="user !=null">
<if test="user.name !=null and user.name !=''">
and u.name like concat('%',#{user.name},'%')
</if>
</if>
<if test="dept !=null">
<if test="dept.deptName !=null and dept.deptName !=''">
and d.deptName like concat('%',#{dept.deptName},'%')
</if>
</if>
<if test="dateYear !=null and dateYear!=''">
and dateYear=#{dateYear}
</if>
<if test="dateMoth !=null and dateMoth!=''">
and dateMoth like concat('%',#{dateMoth},'%')
</if>
</where>
</select>
<delete id="deleteByPrimaryKeys" parameterType="java.lang.Integer">
后面还有 118 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。