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

126 lines
6.7 KiB
XML
Raw Normal View History

2025-08-30 07:26:15 +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.ProMobileAttendanceConfigMapper">
<resultMap type="ProMobileAttendanceConfig" id="ProMobileAttendanceConfigResult">
<result property="id" column="id" />
<result property="comId" column="com_id" />
<result property="projectId" column="project_id" />
<result property="title" column="title" />
<result property="starteDate" column="starte_date" />
<result property="endDate" column="end_date" />
<result property="address" column="address" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="valid" column="valid" />
<result property="rang" column="rang" />
<result property="state" column="state" />
<result property="remark" column="remark" />
<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="selectProMobileAttendanceConfigVo">
select id, com_id, project_id, title, starte_date, end_date, address, longitude, latitude, valid, rang, state, remark, create_by, create_time, update_by, update_time from pro_mobile_attendance_config
</sql>
<select id="selectProMobileAttendanceConfigList" parameterType="ProMobileAttendanceConfig" resultMap="ProMobileAttendanceConfigResult">
<include refid="selectProMobileAttendanceConfigVo"/>
<where>
<if test="comId != null "> and com_id = #{comId}</if>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="starteDate != null "> and starte_date = #{starteDate}</if>
<if test="endDate != null "> and end_date = #{endDate}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="valid != null "> and valid = #{valid}</if>
<if test="rang != null "> and rang = #{rang}</if>
<if test="state != null "> and state = #{state}</if>
</where>
</select>
<select id="selectProMobileAttendanceConfigById" parameterType="Long" resultMap="ProMobileAttendanceConfigResult">
<include refid="selectProMobileAttendanceConfigVo"/>
where id = #{id}
</select>
<insert id="insertProMobileAttendanceConfig" parameterType="ProMobileAttendanceConfig" useGeneratedKeys="true" keyProperty="id">
insert into pro_mobile_attendance_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="comId != null">com_id,</if>
<if test="projectId != null">project_id,</if>
<if test="title != null and title != ''">title,</if>
<if test="starteDate != null">starte_date,</if>
<if test="endDate != null">end_date,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="valid != null">valid,</if>
<if test="rang != null">rang,</if>
<if test="state != null">state,</if>
<if test="remark != null">remark,</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="comId != null">#{comId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="starteDate != null">#{starteDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="valid != null">#{valid},</if>
<if test="rang != null">#{rang},</if>
<if test="state != null">#{state},</if>
<if test="remark != null">#{remark},</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="updateProMobileAttendanceConfig" parameterType="ProMobileAttendanceConfig">
update pro_mobile_attendance_config
<trim prefix="SET" suffixOverrides=",">
<if test="comId != null">com_id = #{comId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="starteDate != null">starte_date = #{starteDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="valid != null">valid = #{valid},</if>
<if test="rang != null">rang = #{rang},</if>
<if test="state != null">state = #{state},</if>
<if test="remark != null">remark = #{remark},</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="deleteProMobileAttendanceConfigById" parameterType="Long">
delete from pro_mobile_attendance_config where id = #{id}
</delete>
<delete id="deleteProMobileAttendanceConfigByIds" parameterType="String">
delete from pro_mobile_attendance_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>