实现敏感词检测后,失败发生邮箱
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?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="org.xyzh.sensitive.mapper.SensitiveMapper">
|
||||
<resultMap id="BaseMap" resultType="org.xyzh.common.dto.sensitive.TbSensitive">
|
||||
<resultMap id="BaseMap" type="org.xyzh.common.dto.sensitive.TbSensitive">
|
||||
<id column="id" property="id"/>
|
||||
<result column="word" property="word"/>
|
||||
<result column="type" property="type"/>
|
||||
@@ -14,20 +14,65 @@
|
||||
<select id="selectAll" resultMap="BaseMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM tb_sensitive
|
||||
FROM tb_sensitive_word
|
||||
</select>
|
||||
|
||||
<insert id="addSensitiveWord" parameterType="org.xyzh.common.dto.sensitive.TbSensitive" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
INSERT INTO tb_sensitive (word, type)
|
||||
INSERT INTO tb_sensitive_word (word, type)
|
||||
VALUES (#{word}, #{type})
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- updateSensitiveWord -->
|
||||
|
||||
<update id="changeWordType">
|
||||
UPDATE tb_sensitive_word
|
||||
SET type = #{type}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSensitiveWord" parameterType="org.xyzh.common.dto.sensitive.TbSensitive">
|
||||
DELETE FROM tb_sensitive
|
||||
DELETE FROM tb_sensitive_word
|
||||
WHERE word = #{word}
|
||||
<if test="type != null and type != ''">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- selectTbSensitivePage -->
|
||||
|
||||
<select id="selectTbSensitivePage" resultMap="BaseMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM tb_sensitive_word
|
||||
WHERE 1=1
|
||||
<if test="filter.id != null and filter.id != ''">
|
||||
AND id = #{filter.id}
|
||||
</if>
|
||||
<if test="filter.word != null and filter.word != ''">
|
||||
AND word LIKE CONCAT('%', #{filter.word}, '%')
|
||||
</if>
|
||||
<if test="filter.type != null and filter.type != ''">
|
||||
AND type = #{filter.type}
|
||||
</if>
|
||||
LIMIT #{pageParam.offset}, #{pageParam.pageSize}
|
||||
</select>
|
||||
|
||||
<!-- countByFilter -->
|
||||
|
||||
<select id="countByFilter" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM tb_sensitive_word
|
||||
WHERE 1=1
|
||||
<if test="filter.id != null and filter.id != ''">
|
||||
AND id = #{filter.id}
|
||||
</if>
|
||||
<if test="filter.word != null and filter.word != ''">
|
||||
AND word LIKE CONCAT('%', #{filter.word}, '%')
|
||||
</if>
|
||||
<if test="filter.type != null and filter.type != ''">
|
||||
AND type = #{filter.type}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user