43 lines
1.6 KiB
XML
43 lines
1.6 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.sczx.sync.mapper.NoticeMapper">
|
|
|
|
|
|
<insert id="insertNotice" parameterType="com.sczx.sync.dto.NoticeReq" useGeneratedKeys="true" keyProperty="noticeId">
|
|
insert into sys_notice (
|
|
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
|
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
|
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
|
|
<if test="status != null and status != '' ">status, </if>
|
|
<if test="userId != null">user_id, </if>
|
|
create_time,
|
|
update_time
|
|
)values(
|
|
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
|
|
<if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
|
|
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
|
|
<if test="status != null and status != ''">#{status}, </if>
|
|
<if test="userId != null ">#{userId}, </if>
|
|
sysdate(),
|
|
sysdate()
|
|
)
|
|
</insert>
|
|
|
|
<select id="selectIdsByGroupId" parameterType="java.lang.Long" resultType="java.lang.Long">
|
|
SELECT
|
|
user_id
|
|
FROM sys_user
|
|
WHERE group_id = #{opretion_id}
|
|
</select>
|
|
|
|
|
|
<select id="selectOpIds" resultType="java.lang.Long">
|
|
SELECT
|
|
user_id
|
|
FROM sys_user
|
|
WHERE user_type in ("00","01")
|
|
</select>
|
|
|
|
|
|
</mapper>
|