id, content, book_id, agent_id, wx_id, wechat_user_id, hot_book_id, user_delete, search_count, create_time, update_time
SELECT FROM search_record_dis_sale WHERE id = #{id}
SELECT FROM search_record_dis_sale
INSERT INTO search_record_dis_sale( content, book_id, agent_id, wx_id, wechat_user_id, hot_book_id, create_time, update_time ) VALUES ( #{content, jdbcType=VARCHAR}, #{bookId, jdbcType=INTEGER}, #{agentId, jdbcType=INTEGER}, #{wxId, jdbcType=VARCHAR}, #{wechatUserId, jdbcType=INTEGER}, #{hotBookId, jdbcType=INTEGER}, now(), now() )
INSERT INTO search_record_dis_sale ( content, book_id, agent_id, wx_id, wechat_user_id, hot_book_id, create_time, update_time ) VALUES ( #{item.content, jdbcType=VARCHAR}, #{item.bookId, jdbcType=INTEGER}, #{item.agentId, jdbcType=INTEGER}, #{item.wxId, jdbcType=VARCHAR}, #{item.wechatUserId, jdbcType=INTEGER}, #{item.hotBookId, jdbcType=INTEGER}, now(), now() )
UPDATE search_record_dis_sale content = #{content}, book_id = #{bookId}, agent_id = #{agentId}, wx_id = #{wxId}, wechat_user_id = #{wechatUserId}, hot_book_id = #{hotBookId}, user_delete = #{userDelete}, create_time = #{createTime}, search_count=search_count+1, update_time = now(), WHERE id = #{id}
DELETE FROM search_record_dis_sale where id = #{id}
select from search_record_dis_sale where user_delete=0 and content=#{content} and wechat_user_id=#{wechatUserId} and wx_id=#{wxId} limit 1
update search_record_dis_sale set user_delete=#{userDelete},update_time = now() where wx_id=#{wxId}
update search_record_dis_sale set user_delete=#{userDelete}, update_time = now() where wechat_user_id=#{wechatUserId}
select FROM search_record_dis_sale WHERE user_delete = 0 and wx_id = #{wxId} and wechat_user_id = #{wechatUserId} ORDER by update_time DESC
select count(1) FROM search_record_dis_sale WHERE user_delete = 0 and wx_id = #{wxId} and wechat_user_id = #{wechatUserId}