id,content,book_id,agent_id,wx_id,wechat_user_id,hot_book_id,user_delete,search_count,create_time,update_time
insert into search_record_dis content, book_id, agent_id, wx_id, wechat_user_id, hot_book_id, create_time, update_time #{content,jdbcType=VARCHAR}, #{bookId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, #{wxId,jdbcType=VARCHAR}, #{wechatUserId,jdbcType=BIGINT}, #{hotBookId,jdbcType=BIGINT}, NOW(), NOW()
select from search_record_dis where user_delete=0 and content=#{content} and wechat_user_id=#{wechatUserId} and wx_id=#{wxId} limit 1
update search_record_dis content = #{content}, book_id = #{bookId}, agent_id = #{agentId}, wx_id = #{wxId}, wechat_user_id = #{wechatUserId}, hot_book_id = #{hotBookId}, user_delete = #{userDelete}, search_count=search_count+1, update_time=now() where id = #{id,jdbcType=BIGINT}
update search_record_dis set user_delete=#{userDelete} where wx_id=#{wxId}
update search_record_dis set user_delete=#{userDelete} where wechat_user_id=#{wechatUserId}
select FROM search_record_dis 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 WHERE user_delete = 0 and wx_id = #{wxId} and wechat_user_id = #{wechatUserId}
select content, sum(search_count) search_count FROM search_record_dis where content in #{item} group by content