| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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.xjrsoft.module.oa.mapper.NewsMapper">
- <select id="manageBox" parameterType="com.xjrsoft.module.oa.dto.NewsPageDto"
- resultType="com.xjrsoft.module.oa.vo.NewsPageVo">
- select
- t.*
- from xjr_oa_news t
- where t.delete_mark = 0
- <if test="dto.type != null">
- and t.type_id = #{dto.type}
- </if>
- <if test="dto.typeId != null">
- and t.type_id = #{dto.typeId}
- </if>
- <if test="dto.type != null and dto.type = 1">
- and t.wf_status = 1
- </if>
- <if test="dto.fullHead != null and dto.fullHead != ''">
- and t.full_head LIKE CONCAT('%',#{dto.fullHead},'%')
- </if>
- <if test="dto.loginId != null and dto.loginId > 0">
- and t.create_user_id = #{dto.loginId}
- </if>
- <if test="dto.keyword != null and dto.keyword != ''">
- and (t.full_head LIKE CONCAT('%',#{dto.keyword},'%')
- or t.news_content LIKE CONCAT('%',#{dto.keyword},'%'))
- </if>
- <if test="dto.guideShowRange != null and dto.guideShowRange != ''">
- and t.guide_show_range LIKE CONCAT('%',#{dto.guideShowRange},'%')
- </if>
- order by t.release_time desc
- </select>
- <select id="receiptBox" parameterType="com.xjrsoft.module.oa.dto.NewsPageDto"
- resultType="com.xjrsoft.module.oa.vo.NewsPageVo">
- select t.*,t2.name as create_user_name from xjr_oa_news t
- left join xjr_user t2 on t.create_user_id = t2.id
- left join xjr_oa_news_relation t3 on t.id = t3.news_id
- where t.delete_mark = 0 and t.enabled_mark = 1
- and (t.send_end_date > now() or t.send_end_date is null)
- and t.status = 2 and t3.user_id = #{dto.loginId}
- <if test="dto.type != null and dto.type == 1">
- and t.wf_status = 1
- </if>
- <if test="dto.type != null and dto.type > 0">
- and t.type_id = #{dto.type}
- </if>
- <if test="dto.typeId != null">
- and t.type_id = #{dto.typeId}
- </if>
- <if test="dto.fullHead != null and dto.fullHead != ''">
- and t.full_head LIKE CONCAT('%',#{dto.fullHead},'%')
- </if>
- <if test="dto.keyword != null and dto.keyword != ''">
- and (t.full_head LIKE CONCAT('%',#{dto.keyword},'%')
- or t.news_content LIKE CONCAT('%',#{dto.keyword},'%'))
- </if>
- <if test="dto.loginId != null and dto.readMark != null">
- and t3.read_mark = #{dto.readMark}
- </if>
- <if test="dto.guideShowRange != null and dto.guideShowRange != ''">
- and t.guide_show_range LIKE CONCAT('%',#{dto.guideShowRange},'%')
- </if>
- order by
- t.release_time desc
- </select>
- <select id="getDeptIdOrClassId" parameterType="java.util.List"
- resultType="com.xjrsoft.module.oa.vo.DeptIdOrClassIdVo">
- select
- t.id as userId,
- t2.id as deptId,
- t3.id as classId
- from xjr_user t
- left join xjr_user_dept_relation t1 on t1.user_id = t.id
- LEFT JOIN xjr_department t2 ON t2.id = t1.dept_id
- left join base_student_school_roll t3 on t3.user_id = t.id
- left join base_class t4 on t4.id = t3.class_id
- where t.delete_mark = 0
- <if test="personalIdList != null and personalIdList.size() > 0">
- and t.id in
- <foreach item="userId" index="index" collection="personalIdList" open="(" close=")"
- separator=",">
- #{userId}
- </foreach>
- </if>
- </select>
- </mapper>
|