| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="filePath" column="file_path" /> |
| | | <result property="fileName" column="file_name" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="publishDate" column="publish_date" /> |
| | | <result property="companyId" column="company_id" /> |
| | | </resultMap> |
| | | <resultMap type="com.gkhy.exam.system.domain.SysNotice" id="SysNoticeVoResult"> |
| | | <result property="deptName" column="dept_name" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectNoticeVo"> |
| | | select id, title, type, cast(content as char) as content, status, create_by, create_time, update_by, update_time, remark |
| | | select id, title, type, cast(content as char) as content,company_id, status, create_by, create_time, update_by, update_time, remark, file_path, file_name, dept_id, publish_date |
| | | from sys_notice |
| | | </sql> |
| | | |
| | |
| | | where id = #{noticeId} |
| | | </select> |
| | | |
| | | <select id="selectNoticeList" resultMap="SysNoticeResult"> |
| | | <include refid="selectNoticeVo"/> |
| | | <where> |
| | | <if test="title != null and title != ''"> |
| | | AND title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="type != null and type != ''"> |
| | | AND type = #{type} |
| | | </if> |
| | | <if test="createBy != null and createBy != ''"> |
| | | AND create_by like concat('%', #{createBy}, '%') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | <select id="selectNoticeList" resultMap="SysNoticeVoResult"> |
| | | select a.id, a.title, a.type, cast(a.content as char) as content, a.status, a.create_by, a.create_time, a.update_by, |
| | | a.update_time, a.remark, a.file_path, a.file_name, a.dept_id, a.publish_date,b.dept_name,a.company_id |
| | | from sys_notice a |
| | | left join sys_dept b on a.dept_id = b.dept_id |
| | | where a.del_flag = 0 |
| | | <if test="companyId != null"> |
| | | AND a.company_id = #{companyId} |
| | | </if> |
| | | <if test="title != null and title != ''"> |
| | | AND a.title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="type != null and type != ''"> |
| | | AND a.type = #{type} |
| | | </if> |
| | | <if test="deptId != null"> |
| | | AND a.deptId = #{dept_id} |
| | | </if> |
| | | <if test="createBy != null and createBy != ''"> |
| | | AND a.create_by like concat('%', #{createBy}, '%') |
| | | </if> |
| | | |
| | | order by a.create_time desc |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteNoticeByIds" parameterType="Long"> |
| | | delete from sys_notice where notice_id in |
| | | update sys_notice set del_flag = 1 where id in |
| | | <foreach item="noticeId" collection="array" open="(" separator="," close=")"> |
| | | #{noticeId} |
| | | </foreach> |