74 lines
3.7 KiB
XML
74 lines
3.7 KiB
XML
|
|
<?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.sercurityControl.proteam.mapper.SysProblemMapper">
|
||
|
|
|
||
|
|
<!--分页查询-->
|
||
|
|
<select id="getProblemPage" resultType="com.sercurityControl.proteam.domain.vo.SysProblemVo" parameterType="com.sercurityControl.proteam.domain.vo.SysProblemVo">
|
||
|
|
select tsp.id,user_id userId,model,content,image,create_time createTime,su.login_name userName,
|
||
|
|
tsp.`status`,hf,update_time updateTime
|
||
|
|
from t_system_problem tsp
|
||
|
|
left join sys_user su on su.id=tsp.user_id
|
||
|
|
where tsp.`status`!='00'
|
||
|
|
<if test="keyWord!=null and keyWord!=''">
|
||
|
|
AND (su.login_name like concat('%',#{keyWord},'%') or
|
||
|
|
tsp.update_time like concat('%',#{keyWord},'%') or
|
||
|
|
tsp.content like concat('%',#{keyWord},'%') or
|
||
|
|
tsp.create_time like concat('%',#{keyWord},'%') or
|
||
|
|
tsp.model like concat('%',#{keyWord},'%')
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
<if test="status!=null and status!=''">
|
||
|
|
AND tsp.`status`=#{status}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--分页查询-->
|
||
|
|
<insert id="addProblem" parameterType="com.sercurityControl.proteam.domain.vo.SysProblemVo">
|
||
|
|
insert into t_system_problem(id,user_id ,model,content,image,create_time ,status ) values (
|
||
|
|
#{id},#{userId},#{model},#{content},#{image},#{createTime},0
|
||
|
|
)
|
||
|
|
</insert>
|
||
|
|
<update id="updateProblem" parameterType="com.sercurityControl.proteam.domain.vo.SysProblemVo">
|
||
|
|
update t_system_problem set model=#{model} ,content=#{content}
|
||
|
|
where id=#{id} and status='0'
|
||
|
|
</update>
|
||
|
|
<update id="updateProblemHf" parameterType="com.sercurityControl.proteam.domain.vo.SysProblemVo">
|
||
|
|
update t_system_problem set status=#{status},hf=#{hf},update_time=#{updateTime}
|
||
|
|
where id=#{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="delete" parameterType="com.sercurityControl.proteam.domain.vo.JobApplication">
|
||
|
|
update t_system_problem set status='00' where id=#{id}
|
||
|
|
</update>
|
||
|
|
<!--报岗统计-->
|
||
|
|
<select id="getApplicationPage" parameterType="com.sercurityControl.proteam.domain.vo.JobApplication" resultType="com.sercurityControl.proteam.domain.vo.JobApplication">
|
||
|
|
select city_name cityName,create_time createTime,tja.user_id userId,su.login_name loginName,tja.curry_day curryDay
|
||
|
|
from t_job_application tja
|
||
|
|
left join sys_org so on so.org_id=tja.org_id
|
||
|
|
LEFT JOIN sys_user su on su.id=tja.user_id
|
||
|
|
<where>
|
||
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||
|
|
AND DATE_FORMAT(tja.curry_day,'%Y-%m-%d') between #{startTime} and #{endTime}
|
||
|
|
</if>
|
||
|
|
<if test="isSup=='3'">
|
||
|
|
<if test="orgId!=null and orgId!=''">
|
||
|
|
and so.org_id=#{orgId}
|
||
|
|
</if>
|
||
|
|
</if>
|
||
|
|
<if test="status!=null and status!=null">
|
||
|
|
<if test='status=="1"'>
|
||
|
|
and tja.user_id is not null
|
||
|
|
</if>
|
||
|
|
<if test='status=="0"'>
|
||
|
|
and tja.user_id is null
|
||
|
|
</if>
|
||
|
|
</if>
|
||
|
|
</where>
|
||
|
|
order by tja.create_time desc
|
||
|
|
</select>
|
||
|
|
<insert id="addBgData" parameterType="com.sercurityControl.proteam.domain.vo.JobApplication">
|
||
|
|
insert into t_job_application( id,curry_day,user_id,user_name,create_time,org_id) values (
|
||
|
|
#{id},#{curryDay},#{userId},#{loginName},#{createTime},#{orgId}
|
||
|
|
)
|
||
|
|
</insert>
|
||
|
|
</mapper>
|