1
0
Fork 0
management/back/dkha-sz-main/dkha-admin/dkha-admin-server/target/classes/mapper/SysNoticeUserDao.xml

15 lines
564 B
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.dkha.dao.SysNoticeUserDao">
<insert id="insertAllUser">
insert into sys_notice_user(notice_id, receiver_id, read_status)
select #{noticeId}, t1.id, #{readStatus} from sys_user t1
</insert>
<select id="getUnReadNoticeCount" resultType="int">
select count(*) from sys_notice_user where receiver_id = #{value} and read_status = 0
</select>
</mapper>