摘要:
List.stream().collect(Collectors.toMap(Emp::getId, a->a,(k1,k2)->k2))的意义是:将链表里的元素转成Map,Map的键取元素的id,值就取元素本身,当键同值不同时取后来者。 例程: Emp类: public class Emp { p 阅读全文
摘要:
需求: 界面上有四个输入框,分别对应查询语句的四个参数,查询语句是: select * from a=:av and b=:bv and c=:cv and d = : dv 当输入框没有用户输入时,该项条件即不存在,比如bv没有输入,那么真实的sql应该是 select * from a=:av 阅读全文