admin
2020-05-06 24a8d17e007545f7426c48352109aa1a9c6587ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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.yeshi.fanli.dao.mybatis.user.MaskKeyMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.recommend.MaskKey">
    <id column="id" property="id" jdbcType="VARCHAR"/>
    <result column="content" property="content" jdbcType="VARCHAR"/>
  </resultMap>
  <sql id="Base_Column_List">id,content</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_mask_key where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_mask_key where id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.recommend.MaskKey" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_mask_key (id,content) values (#{id,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.recommend.MaskKey" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_mask_key
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">id,</if>
      <if test="content != null">content,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=VARCHAR},</if>
      <if test="content != null">#{content,jdbcType=VARCHAR},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.recommend.MaskKey">update yeshi_ec_mask_key set content = #{content,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.recommend.MaskKey">update yeshi_ec_mask_key
    <set>
      <if test="content != null">content=#{content,jdbcType=VARCHAR},</if>
    </set> where id = #{id,jdbcType=VARCHAR}
  </update>
  
  <select id="examineContent" resultType="Integer">
    SELECT COUNT(t.id) FROM `yeshi_ec_mask_key` t
    WHERE  INSTR(#{content},t.`content`) <![CDATA[>]]> 0
  </select>
  
</mapper>