0
点赞
收藏
分享

微信扫一扫

工作中后台总结整理(二)


postgresql:字符串拼接使用 ||

postgresql多行换为一行 分组:string_agg(distinct su.nick_name ,',') 

查看字符串包含 position(su.nick_name in string_agg(distinct su.nick_name ,','))> 0

list的大小为1 里边的元素都是null :all element are null  处理:removeAll(Collection.singlen(null))

list直接排序

list.stream().sorted(Comparing(CLASS::getA().reversed().thenComparaing(CLASS::getB())).collect(Collection.toList()));

或者是:

implements Comparable<AAA>

@Override

public int compareTo(McoSystemArchiveFile o){

int flag = o.getCreateTime().compareTo(this.getCreateTime());

return flag;

}

postgresql:字符串以,隔开 变为多行  select regexp_split_to_table(ancestors,',')

 

举报

相关推荐

0 条评论