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