admin
2020-04-13 dd5b15229cb15459fa7c31ccea77dac28cbfafbd
fanli/src/main/java/com/yeshi/fanli/mapping/help/AppPageNotificationMapper.xml
@@ -14,8 +14,10 @@
      <result column="an_md5" property="md5" jdbcType="VARCHAR" />
      <result column="an_createtime" property="createTime" jdbcType="TIMESTAMP" />
      <result column="an_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
      <result column="an_begin_time" property="beginTime" jdbcType="TIMESTAMP"/>
         <result column="an_end_time" property="endTime" jdbcType="TIMESTAMP"/>
   </resultMap>
   <sql id="Base_Column_List">an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_updatetime
   <sql id="Base_Column_List">an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_begin_time,an_end_time,an_updatetime
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
@@ -31,7 +33,12 @@
      from yeshi_ec_apppage_notification where an_type = #{0}
   </select>
   <select id="listValidByType" resultMap="BaseResultMap" parameterType="java.lang.String">
      SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_apppage_notification
      WHERE an_type = #{0} AND an_show = 1
          AND IF(an_begin_time IS NULL,TRUE, an_begin_time<![CDATA[<=]]> NOW())
           AND IF(an_end_time IS NULL,TRUE, an_end_time <![CDATA[>=]]> NOW())
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
@@ -40,9 +47,9 @@
   <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.help.AppPageNotification"
      useGeneratedKeys="true" keyProperty="id">insert into
      yeshi_ec_apppage_notification
      (an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_updatetime)
      (an_id,an_type,an_show,an_can_close,an_content,an_content_url,an_md5,an_createtime,an_begin_time,an_end_time,an_updatetime)
      values
      (#{id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{show,jdbcType=BOOLEAN},#{canClose,jdbcType=BOOLEAN},#{content,jdbcType=VARCHAR},#{contentUrl,jdbcType=VARCHAR},#{md5,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
      (#{id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{show,jdbcType=BOOLEAN},#{canClose,jdbcType=BOOLEAN},#{content,jdbcType=VARCHAR},#{contentUrl,jdbcType=VARCHAR},#{md5,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{beginTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.help.AppPageNotification"
      useGeneratedKeys="true" keyProperty="id">
@@ -56,6 +63,8 @@
         <if test="contentUrl != null">an_content_url,</if>
         <if test="md5 != null">an_md5,</if>
         <if test="createTime != null">an_createtime,</if>
          <if test="beginTime != null">an_begin_time,</if>
           <if test="endTime != null">an_end_time,</if>
         <if test="updateTime != null">an_updatetime,</if>
      </trim>
      values
@@ -68,6 +77,8 @@
         <if test="contentUrl != null">#{contentUrl,jdbcType=VARCHAR},</if>
         <if test="md5 != null">#{md5,jdbcType=VARCHAR},</if>
         <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="beginTime != null">#{beginTime,jdbcType=TIMESTAMP},</if>
           <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
      </trim>
   </insert>
@@ -79,7 +90,7 @@
      #{content,jdbcType=VARCHAR},an_content_url =
      #{contentUrl,jdbcType=VARCHAR},an_md5 =
      #{md5,jdbcType=VARCHAR},an_createtime =
      #{createTime,jdbcType=TIMESTAMP},an_updatetime =
      #{createTime,jdbcType=TIMESTAMP},an_begin_time = #{beginTime,jdbcType=TIMESTAMP},an_end_time = #{endTime,jdbcType=TIMESTAMP},an_updatetime =
      #{updateTime,jdbcType=TIMESTAMP} where an_id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.help.AppPageNotification">
@@ -92,6 +103,8 @@
         <if test="contentUrl != null">an_content_url=#{contentUrl,jdbcType=VARCHAR},</if>
         <if test="md5 != null">an_md5=#{md5,jdbcType=VARCHAR},</if>
         <if test="createTime != null">an_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="beginTime != null">an_begin_time=#{beginTime,jdbcType=TIMESTAMP},</if>
           <if test="endTime != null">an_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">an_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
      </set>
      where an_id = #{id,jdbcType=BIGINT}