YZProjectCloud/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProMobileAttendanceDataMapp...

121 lines
6.3 KiB
XML
Raw Normal View History

2025-09-03 15:36:22 +08:00
<?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.yanzhu.manage.mapper.ProMobileAttendanceDataMapper">
<resultMap type="ProMobileAttendanceData" id="ProMobileAttendanceDataResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="projectId" column="project_id" />
<result property="cfgId" column="cfg_id" />
<result property="inOut" column="in_out" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="attDate" column="att_date" />
<result property="attImg" column="att_img" />
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
<result property="state" column="state" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectProMobileAttendanceDataVo">
select id, user_id, project_id, cfg_id, in_out, longitude, latitude, att_date, att_img, is_del, remark, state, create_by, create_time, update_by, update_time from pro_mobile_attendance_data
</sql>
<select id="selectProMobileAttendanceDataList" parameterType="ProMobileAttendanceData" resultMap="ProMobileAttendanceDataResult">
<include refid="selectProMobileAttendanceDataVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
<if test="inOut != null and inOut != ''"> and in_out = #{inOut}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="attDate != null "> and att_date = #{attDate}</if>
<if test="attImg != null and attImg != ''"> and att_img = #{attImg}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
<if test="state != null "> and state = #{state}</if>
</where>
</select>
<select id="selectProMobileAttendanceDataById" parameterType="Long" resultMap="ProMobileAttendanceDataResult">
<include refid="selectProMobileAttendanceDataVo"/>
where id = #{id}
</select>
<insert id="insertProMobileAttendanceData" parameterType="ProMobileAttendanceData" useGeneratedKeys="true" keyProperty="id">
insert into pro_mobile_attendance_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="projectId != null">project_id,</if>
<if test="cfgId != null">cfg_id,</if>
<if test="inOut != null">in_out,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="attDate != null">att_date,</if>
<if test="attImg != null">att_img,</if>
<if test="isDel != null">is_del,</if>
<if test="remark != null">remark,</if>
<if test="state != null">state,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="cfgId != null">#{cfgId},</if>
<if test="inOut != null">#{inOut},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="attDate != null">#{attDate},</if>
<if test="attImg != null">#{attImg},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remark != null">#{remark},</if>
<if test="state != null">#{state},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateProMobileAttendanceData" parameterType="ProMobileAttendanceData">
update pro_mobile_attendance_data
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="cfgId != null">cfg_id = #{cfgId},</if>
<if test="inOut != null">in_out = #{inOut},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="attDate != null">att_date = #{attDate},</if>
<if test="attImg != null">att_img = #{attImg},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="state != null">state = #{state},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteProMobileAttendanceDataById" parameterType="Long">
delete from pro_mobile_attendance_data where id = #{id}
</delete>
<delete id="deleteProMobileAttendanceDataByIds" parameterType="String">
delete from pro_mobile_attendance_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>