1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?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.caimei.modules.sys.dao.NotificationDao">
- <select id="notification" resultType="com.caimei.modules.sys.entity.Notification">
- SELECT * FROM `notification`
- <where>
- <if test="theme!=null and theme!=''">
- and theme LIKE CONCAT('%',#{theme},'%')
- </if>
- </where>
- ORDER BY newTime desc
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
- <select id="notificationId" resultType="java.lang.String">
- SELECT shopContent
- FROM `notification`
- where id = #{id}
- </select>
- <update id="Upnotification">
- UPDATE notification SET saved=1
- <where>
- <if test="id!=null">
- and id=#{id}
- </if>
- </where>
- </update>
- <update id="hide">
- UPDATE notification
- SET hide=#{hide},
- saved=1
- where id = #{Id}
- </update>
- <update id="hides">
- UPDATE notification
- SET hide=0
- </update>
- </mapper>
|