摘要:
1、ThreadLocal的使用场景 ThreadLocal主要用来存储线程的本地数据,做到线程数据的隔离。常用的方法有:set()、get()、remove()分别对应存储、获取和删除。下面看几个使用场景: 场景1:在拦截器中的使用 //将其封装在工具类中 public class Context 阅读全文
摘要:
1、分页查询优化 分页查询徒弟列表: select * from user_friends where master_id = #{masterId} and status = #{status} order by create_time desc limit #{start},#{pageSize 阅读全文