初始化
This commit is contained in:
@@ -0,0 +1,201 @@
|
||||
<?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.srs.staff.mapper.SrsStaffOneStopCommunityActivitiesMapper">
|
||||
|
||||
<resultMap type="SrsStaffOneStopCommunityActivities" id="SrsStaffOneStopCommunityActivitiesResult">
|
||||
<result property="activityId" column="activity_id"/>
|
||||
<result property="activityTheme" column="activity_theme"/>
|
||||
<result property="galleryful" column="galleryful"/>
|
||||
<result property="activityPlace" column="activity_place"/>
|
||||
<result property="publishStatus" column="publish_status"/>
|
||||
<result property="activityStatus" column="activity_status"/>
|
||||
<result property="signUpStartTime" column="sign_up_start_time"/>
|
||||
<result property="signUpEndTime" column="sign_up_end_time"/>
|
||||
<result property="activityStartTime" column="activity_start_time"/>
|
||||
<result property="activityEndTime" column="activity_end_time"/>
|
||||
<result property="specificRequirements" column="specific_requirements"/>
|
||||
<result property="signUpPrompt" column="sign_up_prompt"/>
|
||||
<result property="feedback" column="feedback"/>
|
||||
<result property="eventPromoter" column="event_promoter"/>
|
||||
<result property="feedbackImgs" column="feedback_imgs"/>
|
||||
<result property="activityImgs" column="activity_imgs"/>
|
||||
<result property="activePackage" column="active_package"/>
|
||||
<collection property="oneStopRegistrationRecords" column="{activityId=activity_id}"
|
||||
javaType="java.util.ArrayList" select="selectSrsStaffOneStopRegistrationRecordByRecordId"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SrsStaffOneStopRegistrationRecord" id="SrsStaffOneStopRegistrationRecordResult">
|
||||
<result property="recordId" column="record_id"/>
|
||||
<result property="activityId" column="activity_id"/>
|
||||
<result property="activityTheme" column="activity_theme"/>
|
||||
<result property="initiator" column="initiator"/>
|
||||
<result property="applicant" column="applicant"/>
|
||||
<result property="registrationTime" column="registration_time"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="jobNumber" column="job_number"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectSrsStaffOneStopRegistrationRecordByRecordId" resultMap="SrsStaffOneStopRegistrationRecordResult">
|
||||
select *
|
||||
from srs_staff_one_stop_registration_record
|
||||
<where>
|
||||
<if test="activityId != null">
|
||||
and activity_id = #{activityId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<sql id="selectSrsStaffOneStopCommunityActivitiesVo">
|
||||
select activity_id,
|
||||
activity_theme,
|
||||
galleryful,
|
||||
activity_place,
|
||||
publish_status,
|
||||
activity_status,
|
||||
sign_up_start_time,
|
||||
sign_up_end_time,
|
||||
activity_start_time,
|
||||
activity_end_time,
|
||||
specific_requirements,
|
||||
sign_up_prompt,
|
||||
feedback,
|
||||
event_promoter,
|
||||
feedback_imgs,
|
||||
activity_imgs,
|
||||
active_package
|
||||
from srs_staff_one_stop_community_activities
|
||||
</sql>
|
||||
|
||||
<select id="selectSrsStaffOneStopCommunityActivitiesList" parameterType="SrsStaffOneStopCommunityActivities"
|
||||
resultMap="SrsStaffOneStopCommunityActivitiesResult">
|
||||
<include refid="selectSrsStaffOneStopCommunityActivitiesVo"/>
|
||||
<where>
|
||||
<if test="activityTheme != null and activityTheme != ''">
|
||||
and activity_theme like concat('%', #{activityTheme}, '%')
|
||||
</if>
|
||||
<if test="galleryful != null">
|
||||
and galleryful = #{galleryful}
|
||||
</if>
|
||||
<if test="signUpStartTime != null and signUpEndTime != null">
|
||||
and sign_up_start_time >= #{signUpStartTime}
|
||||
and sign_up_end_time <= #{signUpEndTime}
|
||||
</if>
|
||||
<if test="activityStartTime != null and activityEndTime != null">
|
||||
and activity_start_time >= #{activityStartTime}
|
||||
and activity_end_time <= #{activityEndTime}
|
||||
</if>
|
||||
<if test="activityPlace != null and activityPlace != ''">
|
||||
and activity_place like concat('%', #{activityPlace}, '%')
|
||||
</if>
|
||||
<if test="publishStatus != null">
|
||||
and publish_status = #{publishStatus}
|
||||
</if>
|
||||
<if test="activityStatus != null">
|
||||
and activity_status = #{activityStatus}
|
||||
</if>
|
||||
<if test="specificRequirements != null and specificRequirements != ''">
|
||||
and specific_requirements = #{specificRequirements}
|
||||
</if>
|
||||
<if test="signUpPrompt != null and signUpPrompt != ''">
|
||||
and sign_up_prompt = #{signUpPrompt}
|
||||
</if>
|
||||
<if test="feedback != null and feedback != ''">
|
||||
and feedback = #{feedback}
|
||||
</if>
|
||||
<if test="eventPromoter != null and eventPromoter != ''">
|
||||
and event_promoter = #{eventPromoter}
|
||||
</if>
|
||||
<if test="feedbackImgs != null and feedbackImgs != ''">
|
||||
and feedback_imgs = #{feedbackImgs}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY activity_id desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectSrsStaffOneStopCommunityActivitiesByActivityId" parameterType="Long"
|
||||
resultMap="SrsStaffOneStopCommunityActivitiesResult">
|
||||
<include refid="selectSrsStaffOneStopCommunityActivitiesVo"/>
|
||||
where activity_id = #{activityId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSrsStaffOneStopCommunityActivities" parameterType="SrsStaffOneStopCommunityActivities">
|
||||
insert into srs_staff_one_stop_community_activities
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="activityId != null">activity_id,</if>
|
||||
<if test="activityTheme != null and activityTheme != ''">activity_theme,</if>
|
||||
<if test="galleryful != null">galleryful,</if>
|
||||
<if test="activityPlace != null and activityPlace != ''">activity_place,</if>
|
||||
<if test="publishStatus != null">publish_status,</if>
|
||||
<if test="activityStatus != null">activity_status,</if>
|
||||
<if test="signUpStartTime != null">sign_up_start_time,</if>
|
||||
<if test="signUpEndTime != null">sign_up_end_time,</if>
|
||||
<if test="activityStartTime != null">activity_start_time,</if>
|
||||
<if test="activityEndTime != null">activity_end_time,</if>
|
||||
<if test="specificRequirements != null and specificRequirements != ''">specific_requirements,</if>
|
||||
<if test="signUpPrompt != null">sign_up_prompt,</if>
|
||||
<if test="feedback != null">feedback,</if>
|
||||
<if test="eventPromoter != null">event_promoter,</if>
|
||||
<if test="feedbackImgs != null">feedback_imgs,</if>
|
||||
<if test="activityImgs != null">activity_imgs,</if>
|
||||
<if test="activePackage != null">active_package,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="activityId != null">#{activityId},</if>
|
||||
<if test="activityTheme != null and activityTheme != ''">#{activityTheme},</if>
|
||||
<if test="galleryful != null">#{galleryful},</if>
|
||||
<if test="activityPlace != null and activityPlace != ''">#{activityPlace},</if>
|
||||
<if test="publishStatus != null">#{publishStatus},</if>
|
||||
<if test="activityStatus != null">#{activityStatus},</if>
|
||||
<if test="signUpStartTime != null">#{signUpStartTime},</if>
|
||||
<if test="signUpEndTime != null">#{signUpEndTime},</if>
|
||||
<if test="activityStartTime != null">#{activityStartTime},</if>
|
||||
<if test="activityEndTime != null">#{activityEndTime},</if>
|
||||
<if test="specificRequirements != null and specificRequirements != ''">#{specificRequirements},</if>
|
||||
<if test="signUpPrompt != null">#{signUpPrompt},</if>
|
||||
<if test="feedback != null">#{feedback},</if>
|
||||
<if test="eventPromoter != null">#{eventPromoter},</if>
|
||||
<if test="feedbackImgs != null">#{feedbackImgs},</if>
|
||||
<if test="activityImgs != null">#{activityImgs},</if>
|
||||
<if test="activePackage != null">#{activePackage},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSrsStaffOneStopCommunityActivities" parameterType="SrsStaffOneStopCommunityActivities">
|
||||
update srs_staff_one_stop_community_activities
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="activityTheme != null and activityTheme != ''">activity_theme = #{activityTheme},</if>
|
||||
<if test="galleryful != null">galleryful = #{galleryful},</if>
|
||||
<if test="activityPlace != null and activityPlace != ''">activity_place = #{activityPlace},</if>
|
||||
<if test="publishStatus != null">publish_status = #{publishStatus},</if>
|
||||
<if test="activityStatus != null">activity_status = #{activityStatus},</if>
|
||||
<if test="signUpStartTime != null">sign_up_start_time = #{signUpStartTime},</if>
|
||||
<if test="signUpEndTime != null">sign_up_end_time = #{signUpEndTime},</if>
|
||||
<if test="activityStartTime != null">activity_start_time = #{activityStartTime},</if>
|
||||
<if test="activityEndTime != null">activity_end_time = #{activityEndTime},</if>
|
||||
<if test="specificRequirements != null and specificRequirements != ''">specific_requirements = #{specificRequirements},</if>
|
||||
<if test="signUpPrompt != null">sign_up_prompt = #{signUpPrompt},</if>
|
||||
<if test="feedback != null">feedback = #{feedback},</if>
|
||||
<if test="eventPromoter != null">event_promoter = #{eventPromoter},</if>
|
||||
<if test="feedbackImgs != null">feedback_imgs = #{feedbackImgs},</if>
|
||||
<if test="activityImgs != null">activity_imgs = #{activityImgs},</if>
|
||||
<if test="activePackage != null">active_package = #{activePackage},</if>
|
||||
</trim>
|
||||
where activity_id = #{activityId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSrsStaffOneStopCommunityActivitiesByActivityId" parameterType="Long">
|
||||
delete
|
||||
from srs_staff_one_stop_community_activities
|
||||
where activity_id = #{activityId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSrsStaffOneStopCommunityActivitiesByActivityIds" parameterType="String">
|
||||
delete from srs_staff_one_stop_community_activities where activity_id in
|
||||
<foreach item="activityId" collection="array" open="(" separator="," close=")">
|
||||
#{activityId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,119 @@
|
||||
<?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.srs.staff.mapper.SrsStaffOneStopCommunityConstructionMapper">
|
||||
|
||||
<resultMap type="SrsStaffOneStopCommunityConstruction" id="SrsStaffOneStopCommunityConstructionResult">
|
||||
<result property="constructId" column="construct_id" />
|
||||
<result property="activityTheme" column="activity_theme" />
|
||||
<result property="activityProfile" column="activity_profile" />
|
||||
<result property="personnelType" column="personnel_type" />
|
||||
<result property="personnelList" column="personnel_list" />
|
||||
<result property="constructTime" column="construct_time" />
|
||||
<result property="place" column="place" />
|
||||
<result property="stuNumber" column="stu_number" />
|
||||
<result property="activityPhoto" column="activity_photo" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="editOpinion" column="edit_opinion" />
|
||||
<result property="eventPromoter" column="event_promoter" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="activePackage" column="active_package" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSrsStaffOneStopCommunityConstructionVo">
|
||||
select construct_id, activity_theme, activity_profile, personnel_type, personnel_list, construct_time,
|
||||
place, stu_number, activity_photo, audit_status, edit_opinion, event_promoter,user_name,active_package from srs_staff_one_stop_community_construction
|
||||
</sql>
|
||||
|
||||
<select id="selectSrsStaffOneStopCommunityConstructionList" parameterType="SrsStaffOneStopCommunityConstruction" resultMap="SrsStaffOneStopCommunityConstructionResult">
|
||||
<include refid="selectSrsStaffOneStopCommunityConstructionVo"/>
|
||||
<where>
|
||||
<if test="activityTheme != null and activityTheme != ''"> and activity_theme like concat('%', #{activityTheme}, '%')</if>
|
||||
<if test="activityProfile != null and activityProfile != ''"> and activity_profile = #{activityProfile}</if>
|
||||
<if test="personnelType != null and personnelType != ''"> and personnel_type = #{personnelType}</if>
|
||||
<if test="personnelList != null and personnelList != ''"> and personnel_list = #{personnelList}</if>
|
||||
<if test="constructTime != null "> and construct_time = #{constructTime}</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
and construct_time BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
<if test="place != null and place != ''"> and place = #{place}</if>
|
||||
<if test="stuNumber != null "> and stu_number = #{stuNumber}</if>
|
||||
<if test="activityPhoto != null and activityPhoto != ''"> and activity_photo = #{activityPhoto}</if>
|
||||
<if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
|
||||
<if test="editOpinion != null and editOpinion != ''"> and edit_opinion = #{editOpinion}</if>
|
||||
<if test="eventPromoter != null and eventPromoter != ''"> and event_promoter like concat('%', #{eventPromoter}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSrsStaffOneStopCommunityConstructionByConstructId" parameterType="Long" resultMap="SrsStaffOneStopCommunityConstructionResult">
|
||||
<include refid="selectSrsStaffOneStopCommunityConstructionVo"/>
|
||||
where construct_id = #{constructId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSrsStaffOneStopCommunityConstruction" parameterType="SrsStaffOneStopCommunityConstruction" useGeneratedKeys="true" keyProperty="constructId">
|
||||
insert into srs_staff_one_stop_community_construction
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="activityTheme != null and activityTheme != ''">activity_theme,</if>
|
||||
<if test="activityProfile != null">activity_profile,</if>
|
||||
<if test="personnelType != null">personnel_type,</if>
|
||||
<if test="personnelList != null">personnel_list,</if>
|
||||
<if test="constructTime != null">construct_time,</if>
|
||||
<if test="place != null">place,</if>
|
||||
<if test="stuNumber != null">stu_number,</if>
|
||||
<if test="activityPhoto != null">activity_photo,</if>
|
||||
<if test="auditStatus != null">audit_status,</if>
|
||||
<if test="editOpinion != null">edit_opinion,</if>
|
||||
<if test="eventPromoter != null">event_promoter,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="activePackage != null">active_package,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="activityTheme != null and activityTheme != ''">#{activityTheme},</if>
|
||||
<if test="activityProfile != null">#{activityProfile},</if>
|
||||
<if test="personnelType != null">#{personnelType},</if>
|
||||
<if test="personnelList != null">#{personnelList},</if>
|
||||
<if test="constructTime != null">#{constructTime},</if>
|
||||
<if test="place != null">#{place},</if>
|
||||
<if test="stuNumber != null">#{stuNumber},</if>
|
||||
<if test="activityPhoto != null">#{activityPhoto},</if>
|
||||
<if test="auditStatus != null">#{auditStatus},</if>
|
||||
<if test="editOpinion != null">#{editOpinion},</if>
|
||||
<if test="eventPromoter != null">#{eventPromoter},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="activePackage != null">#{activePackage},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSrsStaffOneStopCommunityConstruction" parameterType="SrsStaffOneStopCommunityConstruction">
|
||||
update srs_staff_one_stop_community_construction
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="activityTheme != null and activityTheme != ''">activity_theme = #{activityTheme},</if>
|
||||
<if test="activityProfile != null">activity_profile = #{activityProfile},</if>
|
||||
<if test="personnelType != null">personnel_type = #{personnelType},</if>
|
||||
<if test="personnelList != null">personnel_list = #{personnelList},</if>
|
||||
<if test="constructTime != null">construct_time = #{constructTime},</if>
|
||||
<if test="place != null">place = #{place},</if>
|
||||
<if test="stuNumber != null">stu_number = #{stuNumber},</if>
|
||||
<if test="activityPhoto != null">activity_photo = #{activityPhoto},</if>
|
||||
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||
<if test="editOpinion != null">edit_opinion = #{editOpinion},</if>
|
||||
<if test="eventPromoter != null">event_promoter = #{eventPromoter},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="activePackage != null">active_package = #{activePackage},</if>
|
||||
</trim>
|
||||
where construct_id = #{constructId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSrsStaffOneStopCommunityConstructionByConstructId" parameterType="Long">
|
||||
delete from srs_staff_one_stop_community_construction where construct_id = #{constructId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSrsStaffOneStopCommunityConstructionByConstructIds" parameterType="String">
|
||||
delete from srs_staff_one_stop_community_construction where construct_id in
|
||||
<foreach item="constructId" collection="array" open="(" separator="," close=")">
|
||||
#{constructId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,334 @@
|
||||
<?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.srs.staff.mapper.SrsStaffOneStopRegistrationRecordMapper">
|
||||
|
||||
<resultMap type="SrsStaffOneStopRegistrationRecord" id="SrsStaffOneStopRegistrationRecordResult">
|
||||
<result property="recordId" column="record_id"/>
|
||||
<result property="activityId" column="activity_id"/>
|
||||
<result property="activityTheme" column="activity_theme"/>
|
||||
<result property="initiator" column="initiator"/>
|
||||
<result property="applicant" column="applicant"/>
|
||||
<result property="registrationTime" column="registration_time"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="jobNumber" column="job_number"/>
|
||||
<collection property="communityActivitiesList" column="{activityId = activity_id}"
|
||||
javaType="java.util.ArrayList" select="selectActivitiesByActivityId">
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="SrsStaffOneStopCommunityActivities" id="SrsStaffOneStopCommunityActivitiesResult">
|
||||
<result property="activityId" column="activity_id"/>
|
||||
<result property="activityTheme" column="activity_theme"/>
|
||||
<result property="galleryful" column="galleryful"/>
|
||||
<result property="activityPlace" column="activity_place"/>
|
||||
<result property="publishStatus" column="publish_status"/>
|
||||
<result property="activityStatus" column="activity_status"/>
|
||||
<result property="specificRequirements" column="specific_requirements"/>
|
||||
<result property="signUpPrompt" column="sign_up_prompt"/>
|
||||
<result property="feedback" column="feedback"/>
|
||||
<result property="eventPromoter" column="event_promoter"/>
|
||||
<result property="feedbackImgs" column="feedback_imgs" />
|
||||
</resultMap>
|
||||
|
||||
<!--报名活动父表的数据-->
|
||||
<select id="selectActivitiesByActivityId" resultMap="SrsStaffOneStopCommunityActivitiesResult">
|
||||
select *
|
||||
from srs_staff_one_stop_community_activities
|
||||
<where>
|
||||
<if test="activityId != null">
|
||||
and activity_id = #{activityId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<sql id="selectSrsStaffOneStopRegistrationRecordVo">
|
||||
select record_id, activity_id, activity_theme,initiator, applicant, registration_time, audit_status
|
||||
from srs_staff_one_stop_registration_record
|
||||
</sql>
|
||||
|
||||
<select id="selectRecordByActivityIdAndApplicant" parameterType="String" resultMap="SrsStaffOneStopRegistrationRecordResult">
|
||||
<include refid="selectSrsStaffOneStopRegistrationRecordVo"/>
|
||||
<where>
|
||||
<if test="activityId != null">
|
||||
and activity_id = #{activityId}
|
||||
</if>
|
||||
<if test="jobNumber != null and jobNumber != ''">
|
||||
and job_number = #{jobNumber}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSrsStaffOneStopRegistrationRecordList" parameterType="SrsStaffOneStopRegistrationRecord"
|
||||
resultMap="SrsStaffOneStopRegistrationRecordResult">
|
||||
<include refid="selectSrsStaffOneStopRegistrationRecordVo"/>
|
||||
<where>
|
||||
<if test="activityId != null "> and activity_id = #{activityId}</if>
|
||||
<if test="activityTheme != null and activityTheme != ''"> and activity_theme like concat('%', #{activityTheme}, '%')</if>
|
||||
<if test="initiator != null and initiator != ''"> and initiator = #{initiator}</if>
|
||||
<if test="applicant != null and applicant != ''"> and applicant = #{applicant}</if>
|
||||
<if test="registrationTime != null "> and registration_time = #{registrationTime}</if>
|
||||
<if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
|
||||
<if test="jobNumber != null and jobNumber != ''"> and job_number = #{jobNumber}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSrsStaffOneStopRegistrationRecordByRecordId" parameterType="Long"
|
||||
resultMap="SrsStaffOneStopRegistrationRecordResult">
|
||||
<include refid="selectSrsStaffOneStopRegistrationRecordVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<select id="selectSrsStaffOneStopRegistrationRecordByActivityId" parameterType="Long"
|
||||
resultMap="SrsStaffOneStopRegistrationRecordResult">
|
||||
<include refid="selectSrsStaffOneStopRegistrationRecordVo"/>
|
||||
where activity_id = #{activityId}
|
||||
</select>
|
||||
<select id="selectSrsStaffOneStopRegistrationRecordListexport"
|
||||
resultType="com.srs.staff.domain.vo.SrsStaffOneStopRegistrationRecordExportVo">
|
||||
SELECT
|
||||
activity_theme activityTheme,
|
||||
initiator,
|
||||
applicant,
|
||||
registration_time registrationTime,
|
||||
CASE
|
||||
WHEN audit_status = 0 THEN '待审核'
|
||||
WHEN audit_status = 1 THEN '同意'
|
||||
WHEN audit_status = 2 THEN '不同意'
|
||||
ELSE '未知状态'
|
||||
END AS auditStatusValue,
|
||||
job_number jobNumber
|
||||
FROM
|
||||
srs_staff_one_stop_registration_record
|
||||
<where>
|
||||
<if test="activityId != null "> and activity_id = #{activityId}</if>
|
||||
<if test="activityTheme != null and activityTheme != ''"> and activity_theme like concat('%', #{activityTheme}, '%')</if>
|
||||
<if test="initiator != null and initiator != ''"> and initiator = #{initiator}</if>
|
||||
<if test="applicant != null and applicant != ''"> and applicant = #{applicant}</if>
|
||||
<if test="registrationTime != null "> and registration_time = #{registrationTime}</if>
|
||||
<if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
|
||||
<if test="jobNumber != null and jobNumber != ''"> and job_number = #{jobNumber}</if>
|
||||
<if test="recordIds != null and recordIds != ''">
|
||||
and record_id in
|
||||
<foreach collection="recordIds" item="recordId" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 校属各部门功能房预约的统计 (饼图) -->
|
||||
<select id="getDepartmentUsage" resultType="map">
|
||||
SELECT
|
||||
rt_depar AS department,
|
||||
COUNT(*) AS reservation_count,
|
||||
SUM(CAST(rt_people AS SIGNED)) AS total_visitors
|
||||
FROM
|
||||
staff_one_stop_room_reservation
|
||||
WHERE
|
||||
1 = 1
|
||||
<!-- <if test="roomName != null and roomName != ''">-->
|
||||
<!-- AND room_name = #{roomName}-->
|
||||
<!-- </if>-->
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND rt_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND rt_time <= #{endTime}
|
||||
</if>
|
||||
<if test="role != null and role != ''">
|
||||
AND rt_role = #{role}
|
||||
</if>
|
||||
<if test="borrower != null and borrower != ''">
|
||||
AND rt_creat_role LIKE CONCAT('%', #{borrower}, '%')
|
||||
</if>
|
||||
<if test="auditStatus != null">
|
||||
AND audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="rtDepar != null">
|
||||
AND rt_depar = #{rtDepar}
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
rt_depar
|
||||
ORDER BY
|
||||
reservation_count DESC
|
||||
</select>
|
||||
|
||||
<!-- 校属各功能房预约的统计 (饼图) -->
|
||||
<select id="getRoomReservationCount" resultType="map">
|
||||
SELECT
|
||||
room_name AS roomName,
|
||||
COUNT(*) AS reservation_count,
|
||||
SUM(CAST(rt_people AS SIGNED)) AS total_visitors
|
||||
FROM
|
||||
staff_one_stop_room_reservation
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND rt_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND rt_time <= #{endTime}
|
||||
</if>
|
||||
<if test="role != null and role != ''">
|
||||
AND rt_role = #{role}
|
||||
</if>
|
||||
<if test="borrower != null and borrower != ''">
|
||||
AND rt_creat_role LIKE CONCAT('%', #{borrower}, '%')
|
||||
</if>
|
||||
<if test="auditStatus != null">
|
||||
AND audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="rtDepar != null">
|
||||
AND rt_depar = #{rtDepar}
|
||||
</if>
|
||||
GROUP BY
|
||||
room_name
|
||||
ORDER BY
|
||||
reservation_count DESC
|
||||
</select>
|
||||
|
||||
<!-- 校属各部门功能房使用情况 (表格) -->
|
||||
<select id="getDepartmentUsageStatistics" resultType="map">
|
||||
SELECT
|
||||
rt_depar AS department,
|
||||
COUNT(*) AS reservation_count,
|
||||
SUM(CAST(rt_people AS SIGNED)) AS total_visitors
|
||||
FROM
|
||||
staff_one_stop_room_reservation
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND rt_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND rt_time <= #{endTime}
|
||||
</if>
|
||||
<if test="role != null and role != ''">
|
||||
AND rt_role = #{role}
|
||||
</if>
|
||||
<if test="borrower != null and borrower != ''">
|
||||
AND rt_creat_role LIKE CONCAT('%', #{borrower}, '%')
|
||||
</if>
|
||||
<if test="auditStatus != null">
|
||||
AND audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="rtDepar != null">
|
||||
AND rt_depar = #{rtDepar}
|
||||
</if>
|
||||
GROUP BY
|
||||
rt_depar
|
||||
ORDER BY
|
||||
reservation_count DESC
|
||||
</select>
|
||||
|
||||
<!-- 校属各功能房使用情况 (表格) -->
|
||||
<select id="getRoomUsageStatistics" resultType="map">
|
||||
SELECT
|
||||
room_name AS roomName,
|
||||
COUNT(*) AS reservation_count,
|
||||
SUM(CAST(rt_people AS SIGNED)) AS total_visitors
|
||||
FROM
|
||||
staff_one_stop_room_reservation
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND rt_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND rt_time <= #{endTime}
|
||||
</if>
|
||||
<if test="role != null and role != ''">
|
||||
AND rt_role = #{role}
|
||||
</if>
|
||||
<if test="borrower != null and borrower != ''">
|
||||
AND rt_creat_role LIKE CONCAT('%', #{borrower}, '%')
|
||||
</if>
|
||||
<if test="auditStatus != null">
|
||||
AND audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="rtDepar != null">
|
||||
AND rt_depar = #{rtDepar}
|
||||
</if>
|
||||
GROUP BY
|
||||
room_name
|
||||
ORDER BY
|
||||
reservation_count DESC
|
||||
</select>
|
||||
<insert id="insertSrsStaffOneStopRegistrationRecord" parameterType="SrsStaffOneStopRegistrationRecord"
|
||||
useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into srs_staff_one_stop_registration_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="activityId != null">activity_id,</if>
|
||||
<if test="activityTheme != null">activity_theme,</if>
|
||||
<if test="initiator != null">initiator,</if>
|
||||
<if test="applicant != null">applicant,</if>
|
||||
<if test="registrationTime != null">registration_time,</if>
|
||||
<if test="auditStatus != null">audit_status,</if>
|
||||
<if test="jobNumber != null">job_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="activityId != null">#{activityId},</if>
|
||||
<if test="activityTheme != null">#{activityTheme},</if>
|
||||
<if test="initiator != null">#{initiator},</if>
|
||||
<if test="applicant != null">#{applicant},</if>
|
||||
<if test="registrationTime != null">#{registrationTime},</if>
|
||||
<if test="auditStatus != null">#{auditStatus},</if>
|
||||
<if test="jobNumber != null">#{jobNumber},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSrsStaffOneStopRegistrationRecord" parameterType="SrsStaffOneStopRegistrationRecord">
|
||||
update srs_staff_one_stop_registration_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="activityId != null">activity_id = #{activityId},</if>
|
||||
<if test="activityTheme != null">activity_theme = #{activityTheme},</if>
|
||||
<if test="initiator != null">initiator = #{initiator},</if>
|
||||
<if test="applicant != null">applicant = #{applicant},</if>
|
||||
<if test="registrationTime != null">registration_time = #{registrationTime},</if>
|
||||
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||
<if test="jobNumber != null">job_number = #{jobNumber},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<!--批量修改-->
|
||||
<update id="batchUpdateSysRegistrationRecord" parameterType="SrsStaffOneStopRegistrationRecord">
|
||||
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
||||
update srs_staff_one_stop_registration_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="item.activityId != null">activity_id = #{item.activityId},</if>
|
||||
<if test="item.activityTheme != null">activity_theme = #{item.activityTheme},</if>
|
||||
<if test="item.initiator != null">initiator = #{item.initiator},</if>
|
||||
<if test="item.applicant != null">applicant = #{item.applicant},</if>
|
||||
<if test="item.registrationTime != null">registration_time = #{item.registrationTime},</if>
|
||||
<if test="item.auditStatus != null">audit_status = #{item.auditStatus},</if>
|
||||
<if test="item.jobNumber != null">job_number = #{item.jobNumber},</if>
|
||||
</trim>
|
||||
where record_id = #{item.recordId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateAuditStatusToPending" parameterType="int">
|
||||
UPDATE staff_one_stop_room_reservation
|
||||
SET audit_status = 0,rt_state = 0
|
||||
WHERE rt_id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteSrsStaffOneStopRegistrationRecordByRecordId" parameterType="Long">
|
||||
delete
|
||||
from srs_staff_one_stop_registration_record
|
||||
where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSrsStaffOneStopRegistrationRecordByRecordIds" parameterType="String">
|
||||
delete from srs_staff_one_stop_registration_record where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,237 @@
|
||||
<?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.srs.staff.mapper.StaffOneStopRoomMapper">
|
||||
|
||||
<resultMap type="StaffOneStopRoom" id="StaffOneStopRoomResult">
|
||||
<result property="roomId" column="room_id"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="roomName" column="room_name"/>
|
||||
<result property="roomMatter" column="room_matter"/>
|
||||
<result property="roomRule" column="room_rule"/>
|
||||
<result property="roomInfo" column="room_info"/>
|
||||
<result property="roomPurp" column="room_purp"/>
|
||||
<result property="roomStatus" column="room_status"/>
|
||||
<result property="roomCapacity" column="room_capacity"/>
|
||||
<result property="roomCreatetime" column="room_createTime"/>
|
||||
<result property="roomUptime" column="room_upTime"/>
|
||||
<result property="roomUpuser" column="room_upuser"/>
|
||||
<result property="roomUser" column="room_user"/>
|
||||
<result property="roomDepar" column="room_depar"/>
|
||||
<result property="roomImgs" column="room_imgs"/>
|
||||
<!--查询功能房的预约记录-->
|
||||
<collection property="staffOneStopRoomReservationList" column="{roomNo = room_no}"
|
||||
javaType="java.util.ArrayList" select="selectStaffOneStopRoomReservationByRoomNo">
|
||||
</collection>
|
||||
|
||||
<!--查询功能房的开放时间-->
|
||||
<collection property="staffOneStopRoomOpeningHoursList" column="{roomNo = room_no}"
|
||||
javaType="java.util.ArrayList" select="selectStaffOneStopRoomOpeningHoursByRoomNo">
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<!--预约记录-->
|
||||
<resultMap type="StaffOneStopRoomReservation" id="StaffOneStopRoomReservationResult">
|
||||
<result property="rtId" column="rt_id"/>
|
||||
<result property="rtNo" column="rt_no"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="roomName" column="room_name"/>
|
||||
<result property="rtTheme" column="rt_theme"/>
|
||||
<result property="rtRole" column="rt_role"/>
|
||||
<result property="rtPeople" column="rt_people"/>
|
||||
<result property="rtPurpose" column="rt_purpose"/>
|
||||
<result property="rtTime" column="rt_time"/>
|
||||
<result property="rtTimePeriod" column="rt_time_period"/>
|
||||
<result property="rtState" column="rt_state"/>
|
||||
<result property="rtImgs" column="rt_imgs"/>
|
||||
<result property="rtCreatTime" column="rt_creat_time"/>
|
||||
<result property="rtUpTime" column="rt_up_time"/>
|
||||
<result property="rtCreatRole" column="rt_creat_role"/>
|
||||
<result property="rtDepar" column="rt_depar"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="editOpinion" column="edit_opinion"/>
|
||||
<result property="feedback" column="feedback"/>
|
||||
</resultMap>
|
||||
|
||||
<!--功能房开放时间-->
|
||||
<resultMap type="StaffOneStopRoomOpeningHours" id="StaffOneStopRoomOpeningHoursResult">
|
||||
<result property="ohId" column="oh_id"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="ohWeekday" column="oh_weekday"/>
|
||||
<result property="openingHours" column="opening_hours"/>
|
||||
<result property="isOccupy" column="is_occupy"/>
|
||||
<result property="isDel" column="is_del"/>
|
||||
<result property="rtNo" column="rt_no"/>
|
||||
</resultMap>
|
||||
|
||||
<!--功能房开放时间字段-->
|
||||
<sql id="selectStaffOneStopRoomOpeningHoursVo">
|
||||
select oh_id, room_no, oh_weekday, opening_hours, is_occupy, is_del, rt_no
|
||||
from staff_one_stop_room_opening_hours
|
||||
</sql>
|
||||
|
||||
<!--预约记录字段-->
|
||||
<sql id="selectStaffOneStopRoomReservationVo">
|
||||
select rt_id,
|
||||
rt_no,
|
||||
room_no,
|
||||
room_name,
|
||||
rt_theme,
|
||||
rt_role,
|
||||
rt_people,
|
||||
rt_purpose,
|
||||
rt_time,
|
||||
rt_time_period,
|
||||
rt_state,
|
||||
rt_imgs,
|
||||
rt_creat_time,
|
||||
rt_up_time,
|
||||
rt_creat_role,
|
||||
rt_depar,
|
||||
audit_status,
|
||||
edit_opinion,
|
||||
feedback
|
||||
from staff_one_stop_room_reservation
|
||||
</sql>
|
||||
|
||||
<!--预约记录子表的数据-->
|
||||
<select id="selectStaffOneStopRoomReservationByRoomNo" resultMap="StaffOneStopRoomReservationResult">
|
||||
<include refid="selectStaffOneStopRoomReservationVo"/>
|
||||
<where>
|
||||
<if test="roomNo != null and roomNo != ''">
|
||||
and room_no = #{roomNo}
|
||||
</if>
|
||||
</where>
|
||||
order by rt_creat_time desc
|
||||
</select>
|
||||
|
||||
<!--功能房开放时间子表的数据-->
|
||||
<select id="selectStaffOneStopRoomOpeningHoursByRoomNo" resultMap="StaffOneStopRoomOpeningHoursResult">
|
||||
<include refid="selectStaffOneStopRoomOpeningHoursVo"/>
|
||||
<where>
|
||||
<if test="roomNo != null and roomNo != ''">
|
||||
and room_no = #{roomNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<sql id="selectStaffOneStopRoomVo">
|
||||
select room_id,
|
||||
room_no,
|
||||
room_name,
|
||||
room_matter,
|
||||
room_rule,
|
||||
room_info,
|
||||
room_purp,
|
||||
room_status,
|
||||
room_capacity,
|
||||
room_createTime,
|
||||
room_upTime,
|
||||
room_upuser,
|
||||
room_user,
|
||||
room_depar,
|
||||
room_imgs
|
||||
from staff_one_stop_room
|
||||
</sql>
|
||||
|
||||
<select id="selectStaffOneStopRoomList" parameterType="StaffOneStopRoom" resultMap="StaffOneStopRoomResult">
|
||||
<include refid="selectStaffOneStopRoomVo"/>
|
||||
<where>
|
||||
<if test="roomNo != null and roomNo != ''">and room_no = #{roomNo}</if>
|
||||
<if test="roomName != null and roomName != ''">and room_name like concat('%', #{roomName}, '%')</if>
|
||||
<if test="roomMatter != null and roomMatter != ''">and room_matter = #{roomMatter}</if>
|
||||
<if test="roomRule != null and roomRule != ''">and room_rule = #{roomRule}</if>
|
||||
<if test="roomInfo != null and roomInfo != ''">and room_info = #{roomInfo}</if>
|
||||
<if test="roomPurp != null and roomPurp != ''">and room_purp = #{roomPurp}</if>
|
||||
<if test="roomStatus != null and roomStatus != ''">and room_status = #{roomStatus}</if>
|
||||
<if test="roomCapacity != null and roomCapacity != ''">and room_capacity = #{roomCapacity}</if>
|
||||
<if test="roomCreatetime != null ">and room_createTime = #{roomCreatetime}</if>
|
||||
<if test="roomUptime != null ">and room_upTime = #{roomUptime}</if>
|
||||
<if test="roomUpuser != null and roomUpuser != ''">and room_upuser = #{roomUpuser}</if>
|
||||
<if test="roomUser != null and roomUser != ''">and room_user = #{roomUser}</if>
|
||||
<if test="roomDepar != null and roomDepar != ''">and room_depar = #{roomDepar}</if>
|
||||
<if test="roomImgs != null and roomImgs != ''">and room_imgs = #{roomImgs}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStaffOneStopRoomByRoomId" parameterType="Long" resultMap="StaffOneStopRoomResult">
|
||||
<include refid="selectStaffOneStopRoomVo"/>
|
||||
where room_id = #{roomId}
|
||||
</select>
|
||||
|
||||
<select id="selectStaffOneStopRoomByRoomNo" resultMap="StaffOneStopRoomResult">
|
||||
<include refid="selectStaffOneStopRoomVo"/>
|
||||
where room_no = #{roomNo}
|
||||
</select>
|
||||
|
||||
<insert id="insertStaffOneStopRoom" parameterType="StaffOneStopRoom" useGeneratedKeys="true" keyProperty="roomId">
|
||||
insert into staff_one_stop_room
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roomNo != null">room_no,</if>
|
||||
<if test="roomName != null and roomName != ''">room_name,</if>
|
||||
<if test="roomMatter != null">room_matter,</if>
|
||||
<if test="roomRule != null">room_rule,</if>
|
||||
<if test="roomInfo != null">room_info,</if>
|
||||
<if test="roomPurp != null">room_purp,</if>
|
||||
<if test="roomStatus != null and roomStatus != ''">room_status,</if>
|
||||
<if test="roomCapacity != null and roomCapacity != ''">room_capacity,</if>
|
||||
<if test="roomCreatetime != null">room_createTime,</if>
|
||||
<if test="roomUptime != null">room_upTime,</if>
|
||||
<if test="roomUpuser != null">room_upuser,</if>
|
||||
<if test="roomUser != null">room_user,</if>
|
||||
<if test="roomDepar != null">room_depar,</if>
|
||||
<if test="roomImgs != null">room_imgs,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roomNo != null">#{roomNo},</if>
|
||||
<if test="roomName != null and roomName != ''">#{roomName},</if>
|
||||
<if test="roomMatter != null">#{roomMatter},</if>
|
||||
<if test="roomRule != null">#{roomRule},</if>
|
||||
<if test="roomInfo != null">#{roomInfo},</if>
|
||||
<if test="roomPurp != null">#{roomPurp},</if>
|
||||
<if test="roomStatus != null and roomStatus != ''">#{roomStatus},</if>
|
||||
<if test="roomCapacity != null and roomCapacity != ''">#{roomCapacity},</if>
|
||||
<if test="roomCreatetime != null">#{roomCreatetime},</if>
|
||||
<if test="roomUptime != null">#{roomUptime},</if>
|
||||
<if test="roomUpuser != null">#{roomUpuser},</if>
|
||||
<if test="roomUser != null">#{roomUser},</if>
|
||||
<if test="roomDepar != null">#{roomDepar},</if>
|
||||
<if test="roomImgs != null">#{roomImgs},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStaffOneStopRoom" parameterType="StaffOneStopRoom">
|
||||
update staff_one_stop_room
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="roomNo != null">room_no = #{roomNo},</if>
|
||||
<if test="roomName != null and roomName != ''">room_name = #{roomName},</if>
|
||||
<if test="roomMatter != null">room_matter = #{roomMatter},</if>
|
||||
<if test="roomRule != null">room_rule = #{roomRule},</if>
|
||||
<if test="roomInfo != null">room_info = #{roomInfo},</if>
|
||||
<if test="roomPurp != null">room_purp = #{roomPurp},</if>
|
||||
<if test="roomStatus != null and roomStatus != ''">room_status = #{roomStatus},</if>
|
||||
<if test="roomCapacity != null and roomCapacity != ''">room_capacity = #{roomCapacity},</if>
|
||||
<if test="roomCreatetime != null">room_createTime = #{roomCreatetime},</if>
|
||||
<if test="roomUptime != null">room_upTime = #{roomUptime},</if>
|
||||
<if test="roomUpuser != null">room_upuser = #{roomUpuser},</if>
|
||||
<if test="roomUser != null">room_user = #{roomUser},</if>
|
||||
<if test="roomDepar != null">room_depar = #{roomDepar},</if>
|
||||
<if test="roomImgs != null">room_imgs = #{roomImgs},</if>
|
||||
</trim>
|
||||
where room_id = #{roomId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStaffOneStopRoomByRoomId" parameterType="Long">
|
||||
delete
|
||||
from staff_one_stop_room
|
||||
where room_id = #{roomId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStaffOneStopRoomByRoomIds" parameterType="String">
|
||||
delete from staff_one_stop_room where room_id in
|
||||
<foreach item="roomId" collection="array" open="(" separator="," close=")">
|
||||
#{roomId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,153 @@
|
||||
<?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.srs.staff.mapper.StaffOneStopRoomOpeningHoursMapper">
|
||||
|
||||
<resultMap type="StaffOneStopRoomOpeningHours" id="StaffOneStopRoomOpeningHoursResult">
|
||||
<result property="ohId" column="oh_id"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="ohWeekday" column="oh_weekday"/>
|
||||
<result property="openingHours" column="opening_hours"/>
|
||||
<result property="isOccupy" column="is_occupy"/>
|
||||
<result property="isDel" column="is_del"/>
|
||||
<result property="rtNo" column="rt_no"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStaffOneStopRoomOpeningHoursVo">
|
||||
select oh_id, room_no, oh_weekday, opening_hours, is_occupy, is_del, rt_no
|
||||
from staff_one_stop_room_opening_hours
|
||||
</sql>
|
||||
|
||||
<select id="selectStaffOneStopRoomOpeningHoursList" parameterType="StaffOneStopRoomOpeningHours"
|
||||
resultMap="StaffOneStopRoomOpeningHoursResult">
|
||||
<include refid="selectStaffOneStopRoomOpeningHoursVo"/>
|
||||
<where>
|
||||
<if test="roomNo != null and roomNo != ''">and room_no = #{roomNo}</if>
|
||||
<if test="ohWeekday != null and ohWeekday != ''">and oh_weekday = #{ohWeekday}</if>
|
||||
<if test="openingHours != null and openingHours != ''">and opening_hours = #{openingHours}</if>
|
||||
<if test="isOccupy != null ">and is_occupy = #{isOccupy}</if>
|
||||
<if test="rtNo != null and rtNo != ''">and rt_no = #{rtNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStaffOneStopRoomOpeningHoursByOhId" parameterType="Long"
|
||||
resultMap="StaffOneStopRoomOpeningHoursResult">
|
||||
<include refid="selectStaffOneStopRoomOpeningHoursVo"/>
|
||||
where oh_id = #{ohId}
|
||||
</select>
|
||||
|
||||
<!--根据功能房编号查询-->
|
||||
<select id="selectStaffOneStopRoomOpeningHoursByRoomNo"
|
||||
resultMap="StaffOneStopRoomOpeningHoursResult">
|
||||
<include refid="selectStaffOneStopRoomOpeningHoursVo"/>
|
||||
where room_no = #{roomNo}
|
||||
</select>
|
||||
|
||||
<!--根据功能房预约记录编号查询-->
|
||||
<select id="selectStaffOneStopRoomOpeningHoursByRtNo"
|
||||
resultMap="StaffOneStopRoomOpeningHoursResult">
|
||||
<include refid="selectStaffOneStopRoomOpeningHoursVo"/>
|
||||
where rt_no = #{rtNo}
|
||||
</select>
|
||||
|
||||
<!--根据功能房星期几查询-->
|
||||
<select id="selectStaffOneStopRoomOpeningHoursByOhWeekday" parameterType="String"
|
||||
resultMap="StaffOneStopRoomOpeningHoursResult">
|
||||
<include refid="selectStaffOneStopRoomOpeningHoursVo"/>
|
||||
<where>
|
||||
<if test="roomNo != null and roomNo != ''">
|
||||
and room_no = #{roomNo}
|
||||
</if>
|
||||
<if test="ohWeekday != null and ohWeekday != ''">
|
||||
and oh_weekday = #{ohWeekday}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertStaffOneStopRoomOpeningHours" parameterType="StaffOneStopRoomOpeningHours" useGeneratedKeys="true"
|
||||
keyProperty="ohId">
|
||||
insert into staff_one_stop_room_opening_hours
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roomNo != null">room_no,</if>
|
||||
<if test="ohWeekday != null">oh_weekday,</if>
|
||||
<if test="openingHours != null">opening_hours,</if>
|
||||
<if test="isOccupy != null">is_occupy,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="rtNo != null">rt_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roomNo != null">#{roomNo},</if>
|
||||
<if test="ohWeekday != null">#{ohWeekday},</if>
|
||||
<if test="openingHours != null">#{openingHours},</if>
|
||||
<if test="isOccupy != null">#{isOccupy},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="rtNo != null">#{rtNo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!--批量新增-->
|
||||
<insert id="insertStaffOneStopRoomOpeningHoursBatch" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
insert into staff_one_stop_room_opening_hours
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="item.roomNo != null and item.roomNo != ''">room_no,</if>
|
||||
<if test="item.ohWeekday != null and item.ohWeekday != ''">oh_weekday,</if>
|
||||
<if test="item.openingHours != null and item.openingHours != ''">opening_hours,</if>
|
||||
<if test="item.isOccupy != null and item.isOccupy != ''">is_occupy,</if>
|
||||
<if test="item.isDel != null">is_del,</if>
|
||||
<if test="item.rtNo != null">rt_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="item.roomNo != null and item.roomNo != ''">#{item.roomNo},</if>
|
||||
<if test="item.ohWeekday != null and item.ohWeekday != ''">#{item.ohWeekday},</if>
|
||||
<if test="item.openingHours != null and item.openingHours != ''">#{item.openingHours},</if>
|
||||
<if test="item.isOccupy != null and item.isOccupy != ''">#{item.isOccupy},</if>
|
||||
<if test="item.isDel != null">#{item.isDel},</if>
|
||||
<if test="item.rtNo != null">#{item.rtNo},</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateStaffOneStopRoomOpeningHours" parameterType="StaffOneStopRoomOpeningHours">
|
||||
update staff_one_stop_room_opening_hours
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="roomNo != null">room_no = #{roomNo},</if>
|
||||
<if test="ohWeekday != null">oh_weekday = #{ohWeekday},</if>
|
||||
<if test="openingHours != null">opening_hours = #{openingHours},</if>
|
||||
<if test="isOccupy != null">is_occupy = #{isOccupy},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="rtNo != null">rt_no = #{rtNo},</if>
|
||||
</trim>
|
||||
where oh_id = #{ohId}
|
||||
</update>
|
||||
|
||||
<!--批量修改-->
|
||||
<update id="batchUpdateStaffOneStopRoomOpeningHours" parameterType="java.util.List">
|
||||
<foreach collection="list" item="hours" index="index" separator=";">
|
||||
update staff_one_stop_room_opening_hours
|
||||
<set>
|
||||
<if test="hours.roomNo != null">room_no = #{hours.roomNo},</if>
|
||||
<if test="hours.ohWeekday != null">oh_weekday = #{hours.ohWeekday},</if>
|
||||
<if test="hours.openingHours != null">opening_hours = #{hours.openingHours},</if>
|
||||
<if test="hours.isOccupy != null">is_occupy = #{hours.isOccupy},</if>
|
||||
<if test="hours.isDel != null">is_del = #{hours.isDel},</if>
|
||||
<if test="hours.rtNo != null">rt_no = #{hours.rtNo}</if>
|
||||
</set>
|
||||
where oh_id = #{hours.ohId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteStaffOneStopRoomOpeningHoursByOhId" parameterType="Long">
|
||||
delete
|
||||
from staff_one_stop_room_opening_hours
|
||||
where oh_id = #{ohId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStaffOneStopRoomOpeningHoursByOhIds" parameterType="String">
|
||||
delete from staff_one_stop_room_opening_hours where oh_id in
|
||||
<foreach item="ohId" collection="array" open="(" separator="," close=")">
|
||||
#{ohId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,320 @@
|
||||
<?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.srs.staff.mapper.StaffOneStopRoomReservationMapper">
|
||||
|
||||
<resultMap type="StaffOneStopRoomReservation" id="StaffOneStopRoomReservationResult">
|
||||
<result property="rtId" column="rt_id"/>
|
||||
<result property="rtNo" column="rt_no"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="roomName" column="room_name"/>
|
||||
<result property="rtTheme" column="rt_theme"/>
|
||||
<result property="rtRole" column="rt_role"/>
|
||||
<result property="rtPeople" column="rt_people"/>
|
||||
<result property="rtPurpose" column="rt_purpose"/>
|
||||
<result property="rtTime" column="rt_time"/>
|
||||
<result property="rtTimePeriod" column="rt_time_period"/>
|
||||
<result property="rtState" column="rt_state"/>
|
||||
<result property="rtImgs" column="rt_imgs"/>
|
||||
<result property="rtCreatTime" column="rt_creat_time"/>
|
||||
<result property="rtUpTime" column="rt_up_time"/>
|
||||
<result property="rtCreatRole" column="rt_creat_role"/>
|
||||
<result property="rtDepar" column="rt_depar"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="editOpinion" column="edit_opinion"/>
|
||||
<result property="feedback" column="feedback"/>
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<!--查询功能房的开放时间-->
|
||||
<collection property="staffOneStopRoomOpeningHoursList" column="{rtNo = rt_no}"
|
||||
javaType="java.util.ArrayList" select="selectStaffOneStopRoomOpeningHoursByRoomNo">
|
||||
</collection>
|
||||
<!--查询功能房-->
|
||||
<collection property="staffOneStopRoom" column="{roomNo = room_no}"
|
||||
javaType="java.util.ArrayList" select="selectStaffOneStopRoomByRoomNo">
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!--功能房开放时间-->
|
||||
<resultMap type="StaffOneStopRoomOpeningHours" id="StaffOneStopRoomOpeningHoursResult">
|
||||
<result property="ohId" column="oh_id"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="ohWeekday" column="oh_weekday"/>
|
||||
<result property="openingHours" column="opening_hours"/>
|
||||
<result property="isOccupy" column="is_occupy"/>
|
||||
<result property="isDel" column="is_del"/>
|
||||
<result property="rtNo" column="rt_no"/>
|
||||
</resultMap>
|
||||
|
||||
<!--功能房开放时间字段-->
|
||||
<sql id="selectStaffOneStopRoomOpeningHoursVo">
|
||||
select oh_id, room_no, oh_weekday, opening_hours, is_occupy, is_del, rt_no
|
||||
from staff_one_stop_room_opening_hours
|
||||
</sql>
|
||||
|
||||
<!--功能房开放时间子表的数据-->
|
||||
<select id="selectStaffOneStopRoomOpeningHoursByRoomNo" resultMap="StaffOneStopRoomOpeningHoursResult">
|
||||
<include refid="selectStaffOneStopRoomOpeningHoursVo"/>
|
||||
<where>
|
||||
<if test="rtNo != null and rtNo != ''">
|
||||
and rt_no = #{rtNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--功能房-->
|
||||
<resultMap type="StaffOneStopRoom" id="StaffOneStopRoomResult">
|
||||
<result property="roomId" column="room_id"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="roomName" column="room_name"/>
|
||||
<result property="roomMatter" column="room_matter"/>
|
||||
<result property="roomRule" column="room_rule"/>
|
||||
<result property="roomInfo" column="room_info"/>
|
||||
<result property="roomPurp" column="room_purp"/>
|
||||
<result property="roomStatus" column="room_status"/>
|
||||
<result property="roomCapacity" column="room_capacity"/>
|
||||
<result property="roomCreatetime" column="room_createTime"/>
|
||||
<result property="roomUptime" column="room_upTime"/>
|
||||
<result property="roomUpuser" column="room_upuser"/>
|
||||
<result property="roomUser" column="room_user"/>
|
||||
<result property="roomDepar" column="room_depar"/>
|
||||
<result property="roomImgs" column="room_imgs"/>
|
||||
</resultMap>
|
||||
<!--功能房-->
|
||||
<sql id="selectStaffOneStopRoomVo">
|
||||
select room_id,
|
||||
room_no,
|
||||
room_name,
|
||||
room_matter,
|
||||
room_rule,
|
||||
room_info,
|
||||
room_purp,
|
||||
room_status,
|
||||
room_capacity,
|
||||
room_createTime,
|
||||
room_upTime,
|
||||
room_upuser,
|
||||
room_user,
|
||||
room_depar,
|
||||
room_imgs
|
||||
from staff_one_stop_room
|
||||
</sql>
|
||||
|
||||
<select id="selectStaffOneStopRoomByRoomNo" resultMap="StaffOneStopRoomResult">
|
||||
<include refid="selectStaffOneStopRoomVo"/>
|
||||
<where>
|
||||
<if test="roomNo != null and roomNo != ''">
|
||||
and room_no = #{roomNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="selectStaffOneStopRoomReservationVo">
|
||||
select rt_id,
|
||||
rt_no,
|
||||
room_no,
|
||||
room_name,
|
||||
rt_theme,
|
||||
rt_role,
|
||||
rt_people,
|
||||
rt_purpose,
|
||||
rt_time,
|
||||
rt_time_period,
|
||||
rt_state,
|
||||
rt_imgs,
|
||||
rt_creat_time,
|
||||
rt_up_time,
|
||||
rt_creat_role,
|
||||
rt_depar,
|
||||
audit_status,
|
||||
edit_opinion,
|
||||
feedback
|
||||
from staff_one_stop_room_reservation
|
||||
</sql>
|
||||
|
||||
<select id="selectStaffOneStopRoomReservationList" parameterType="StaffOneStopRoomReservation"
|
||||
resultMap="StaffOneStopRoomReservationResult">
|
||||
<include refid="selectStaffOneStopRoomReservationVo"/>
|
||||
<where>
|
||||
<!-- 原有条件 -->
|
||||
<if test="rtNo != null and rtNo != ''">and rt_no = #{rtNo}</if>
|
||||
<if test="roomNo != null and roomNo != ''">and room_no = #{roomNo}</if>
|
||||
<if test="rtTheme != null and rtTheme != ''">and rt_theme = #{rtTheme}</if>
|
||||
<if test="rtPeople != null and rtPeople != ''">and rt_people = #{rtPeople}</if>
|
||||
<if test="rtPurpose != null and rtPurpose != ''">and rt_purpose = #{rtPurpose}</if>
|
||||
<if test="rtImgs != null and rtImgs != ''">and rt_imgs = #{rtImgs}</if>
|
||||
<if test="rtCreatTime != null ">and rt_creat_time = #{rtCreatTime}</if>
|
||||
<if test="rtUpTime != null ">and rt_up_time = #{rtUpTime}</if>
|
||||
<if test="auditStatus != null ">and audit_status = #{auditStatus}</if>
|
||||
<if test="editOpinion != null and editOpinion != ''">and edit_opinion = #{editOpinion}</if>
|
||||
<if test="feedback != null and feedback != ''">and feedback = #{feedback}</if>
|
||||
<if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
|
||||
<if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
|
||||
<!-- 新增查询条件 -->
|
||||
<!-- 根据功能房名模糊查询 -->
|
||||
<if test="roomName != null and roomName != ''">
|
||||
and room_name like concat('%', #{roomName}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 根据部门模糊查询 -->
|
||||
<if test="rtDepar != null and rtDepar != ''">
|
||||
and rt_depar like concat('%', #{rtDepar}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 根据预约时间段查询 -->
|
||||
<if test="rtTimeStart != null and rtTimeStart != ''">
|
||||
<![CDATA[ and rt_time >= #{rtTimeStart} ]]>
|
||||
</if>
|
||||
<if test="rtTimeEnd != null and rtTimeEnd != ''">
|
||||
<![CDATA[ and rt_time <= #{rtTimeEnd} ]]>
|
||||
</if>
|
||||
|
||||
<!-- 根据参与人员类型查询 -->
|
||||
<if test="rtRole != null and rtRole != ''">
|
||||
and rt_role = #{rtRole}
|
||||
</if>
|
||||
|
||||
<!-- 根据申请人模糊查询 -->
|
||||
<if test="rtCreatRole != null and rtCreatRole != ''">
|
||||
and rt_creat_role like concat('%', #{rtCreatRole}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 根据预约状态查询 -->
|
||||
<if test="rtState != null">
|
||||
and rt_state = #{rtState}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by
|
||||
CASE audit_status
|
||||
WHEN 0 THEN 0
|
||||
WHEN 1 THEN 1
|
||||
WHEN 2 THEN 2
|
||||
ELSE 99
|
||||
END,
|
||||
rt_creat_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectStaffOneStopRoomReservationByRtTime"
|
||||
resultMap="StaffOneStopRoomReservationResult">
|
||||
<include refid="selectStaffOneStopRoomReservationVo"/>
|
||||
<where>
|
||||
<if test="roomNo != null and roomNo != ''">
|
||||
and room_no = #{roomNo}
|
||||
</if>
|
||||
<if test="rtTime != null and rtTime != ''">
|
||||
and rt_time = #{rtTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStaffOneStopRoomReservationByRtId" parameterType="Long"
|
||||
resultMap="StaffOneStopRoomReservationResult">
|
||||
<include refid="selectStaffOneStopRoomReservationVo"/>
|
||||
where rt_id = #{rtId}
|
||||
</select>
|
||||
|
||||
<insert id="insertStaffOneStopRoomReservation" parameterType="StaffOneStopRoomReservation" useGeneratedKeys="true"
|
||||
keyProperty="rtId">
|
||||
insert into staff_one_stop_room_reservation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rtNo != null">rt_no,</if>
|
||||
<if test="roomNo != null">room_no,</if>
|
||||
<if test="roomName != null">room_name,</if>
|
||||
<if test="rtTheme != null">rt_theme,</if>
|
||||
<if test="rtRole != null">rt_role,</if>
|
||||
<if test="rtPeople != null">rt_people,</if>
|
||||
<if test="rtPurpose != null">rt_purpose,</if>
|
||||
<if test="rtTime != null">rt_time,</if>
|
||||
<if test="rtTimePeriod != null">rt_time_period,</if>
|
||||
<if test="rtState != null">rt_state,</if>
|
||||
<if test="rtImgs != null">rt_imgs,</if>
|
||||
<if test="rtCreatTime != null">rt_creat_time,</if>
|
||||
<if test="rtUpTime != null">rt_up_time,</if>
|
||||
<if test="rtCreatRole != null">rt_creat_role,</if>
|
||||
<if test="rtDepar != null">rt_depar,</if>
|
||||
<if test="auditStatus != null">audit_status,</if>
|
||||
<if test="editOpinion != null">edit_opinion,</if>
|
||||
<if test="feedback != null">feedback,</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>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rtNo != null">#{rtNo},</if>
|
||||
<if test="roomNo != null">#{roomNo},</if>
|
||||
<if test="roomName != null">#{roomName},</if>
|
||||
<if test="rtTheme != null">#{rtTheme},</if>
|
||||
<if test="rtRole != null">#{rtRole},</if>
|
||||
<if test="rtPeople != null">#{rtPeople},</if>
|
||||
<if test="rtPurpose != null">#{rtPurpose},</if>
|
||||
<if test="rtTime != null">#{rtTime},</if>
|
||||
<if test="rtTimePeriod != null">#{rtTimePeriod},</if>
|
||||
<if test="rtState != null">#{rtState},</if>
|
||||
<if test="rtImgs != null">#{rtImgs},</if>
|
||||
<if test="rtCreatTime != null">#{rtCreatTime},</if>
|
||||
<if test="rtUpTime != null">#{rtUpTime},</if>
|
||||
<if test="rtCreatRole != null">#{rtCreatRole},</if>
|
||||
<if test="rtDepar != null">#{rtDepar},</if>
|
||||
<if test="auditStatus != null">#{auditStatus},</if>
|
||||
<if test="editOpinion != null">#{editOpinion},</if>
|
||||
<if test="feedback != null">#{feedback},</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>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStaffOneStopRoomReservation" parameterType="StaffOneStopRoomReservation">
|
||||
update staff_one_stop_room_reservation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="rtNo != null">rt_no = #{rtNo},</if>
|
||||
<if test="roomNo != null">room_no = #{roomNo},</if>
|
||||
<if test="roomName != null">room_name = #{roomName},</if>
|
||||
<if test="rtTheme != null">rt_theme = #{rtTheme},</if>
|
||||
<if test="rtRole != null">rt_role = #{rtRole},</if>
|
||||
<if test="rtPeople != null">rt_people = #{rtPeople},</if>
|
||||
<if test="rtPurpose != null">rt_purpose = #{rtPurpose},</if>
|
||||
<if test="rtTime != null">rt_time = #{rtTime},</if>
|
||||
<if test="rtTimePeriod != null">rt_time_period = #{rtTimePeriod},</if>
|
||||
<if test="rtState != null">rt_state = #{rtState},</if>
|
||||
<if test="rtImgs != null">rt_imgs = #{rtImgs},</if>
|
||||
<if test="rtCreatTime != null">rt_creat_time = #{rtCreatTime},</if>
|
||||
<if test="rtUpTime != null">rt_up_time = #{rtUpTime},</if>
|
||||
<if test="rtCreatRole != null">rt_creat_role = #{rtCreatRole},</if>
|
||||
<if test="rtDepar != null">rt_depar = #{rtDepar},</if>
|
||||
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||
<if test="editOpinion != null">edit_opinion = #{editOpinion},</if>
|
||||
<if test="feedback != null">feedback = #{feedback},</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>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where rt_id = #{rtId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStaffOneStopRoomReservationByRtId" parameterType="Long">
|
||||
delete
|
||||
from staff_one_stop_room_reservation
|
||||
where rt_id = #{rtId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStaffOneStopRoomReservationByRtIds" parameterType="String">
|
||||
delete from staff_one_stop_room_reservation where rt_id in
|
||||
<foreach item="rtId" collection="array" open="(" separator="," close=")">
|
||||
#{rtId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
73
srs-staff/src/main/resources/mapper/staff/SysRfileMapper.xml
Normal file
73
srs-staff/src/main/resources/mapper/staff/SysRfileMapper.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?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.srs.staff.mapper.SysRfileMapper">
|
||||
|
||||
<resultMap type="SysRfile" id="SysRfileResult">
|
||||
<result property="rfileId" column="rfile_id" />
|
||||
<result property="rfileTitle" column="rfile_title" />
|
||||
<result property="rfilePath" column="rfile_path" />
|
||||
<result property="rfileType" column="rfile_type" />
|
||||
<result property="rfileDate" column="rfile_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysRfileVo">
|
||||
select rfile_id, rfile_title, rfile_path, rfile_type, rfile_date from sys_rfile
|
||||
</sql>
|
||||
|
||||
<select id="selectSysRfileList" parameterType="SysRfile" resultMap="SysRfileResult">
|
||||
<include refid="selectSysRfileVo"/>
|
||||
<where>
|
||||
<if test="rfileTitle != null and rfileTitle != ''"> and rfile_title like concat('%', #{rfileTitle}, '%')</if>
|
||||
<if test="rfilePath != null and rfilePath != ''"> and rfile_path like concat('%', #{rfilePath}, '%')</if>
|
||||
<if test="rfileType != null and rfileType != ''"> and rfile_type like concat('%', #{rfileType}, '%')</if>
|
||||
<if test="rfileDate != null "> and rfile_date = #{rfileDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysRfileByRfileId" parameterType="Long" resultMap="SysRfileResult">
|
||||
<include refid="selectSysRfileVo"/>
|
||||
where rfile_id = #{rfileId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysRfile" parameterType="SysRfile">
|
||||
insert into sys_rfile
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rfileId != null">rfile_id,</if>
|
||||
<if test="rfileTitle != null and rfileTitle != ''">rfile_title,</if>
|
||||
<if test="rfilePath != null and rfilePath != ''">rfile_path,</if>
|
||||
<if test="rfileType != null and rfileType != ''">rfile_type,</if>
|
||||
<if test="rfileDate != null">rfile_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rfileId != null">#{rfileId},</if>
|
||||
<if test="rfileTitle != null and rfileTitle != ''">#{rfileTitle},</if>
|
||||
<if test="rfilePath != null and rfilePath != ''">#{rfilePath},</if>
|
||||
<if test="rfileType != null and rfileType != ''">#{rfileType},</if>
|
||||
<if test="rfileDate != null">#{rfileDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysRfile" parameterType="SysRfile">
|
||||
update sys_rfile
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="rfileTitle != null and rfileTitle != ''">rfile_title = #{rfileTitle},</if>
|
||||
<if test="rfilePath != null and rfilePath != ''">rfile_path = #{rfilePath},</if>
|
||||
<if test="rfileType != null and rfileType != ''">rfile_type = #{rfileType},</if>
|
||||
<if test="rfileDate != null">rfile_date = #{rfileDate},</if>
|
||||
</trim>
|
||||
where rfile_id = #{rfileId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysRfileByRfileId" parameterType="Long">
|
||||
delete from sys_rfile where rfile_id = #{rfileId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysRfileByRfileIds" parameterType="String">
|
||||
delete from sys_rfile where rfile_id in
|
||||
<foreach item="rfileId" collection="array" open="(" separator="," close=")">
|
||||
#{rfileId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user