From 9e65fbeb8fc4871b9d33e267596ba0a8c1c70b9d Mon Sep 17 00:00:00 2001 From: qi_liang Date: Fri, 10 May 2019 17:26:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=85=AC=E4=BC=97=E5=8F=B7?= =?UTF-8?q?=E6=B6=88=E6=81=AFmapper=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/mapping/WechatMessageDao.xml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/main/resources/mybatis/mapping/WechatMessageDao.xml diff --git a/src/main/resources/mybatis/mapping/WechatMessageDao.xml b/src/main/resources/mybatis/mapping/WechatMessageDao.xml new file mode 100644 index 0000000..16f95c2 --- /dev/null +++ b/src/main/resources/mybatis/mapping/WechatMessageDao.xml @@ -0,0 +1,82 @@ + + + + + + + + to_url,message_type,create_time,image_url,update_time,id,title,media_id,user_id,content,status + + + + + + + + + + + + SELECT LAST_INSERT_ID() + + INSERT INTO + wechat_message(to_url,message_type,create_time,image_url,update_time,id,title,media_id,user_id,content,status) + VALUES + ( + #{toUrl},#{messageType},#{createTime},#{imageUrl},#{updateTime},#{id},#{title},#{mediaId},#{userId},#{content},#{status} + ) + + + + + UPDATE + wechat_message + + + to_url=#{toUrl}, + message_type=#{messageType}, + create_time=#{createTime}, + image_url=#{imageUrl}, + update_time=#{updateTime}, + id=#{id}, + title=#{title}, + media_id=#{mediaId}, + user_id=#{userId}, + content=#{content}, + status=#{status}, + + WHERE + id=#{id} + + + + UPDATE + FROM wechat_message + SET + status = 0 + WHERE + id=#{id} + + + + + + \ No newline at end of file