bug解决方案基于pgsql数据库
开发过程中遇到一个奇葩业务,in条件过多导致sql长度超过postgresql限制的最大参数字节,将long集合修改为数组类型,使用Join替代in条件查询得以解决
@Data
public class BussinessApplicationFormSearchDto {
private Integer status;
private String statusName;
private Long startTime;
private Long endTime;
private String code;
private String appName;
// private List<Long> formIdList;
private Long[] formIds = {
};
private int pageIndex;
private int pageSize;
public void setFormIds(Set<Long> keys) {
this.formIds = keys.toArray(new Long[0]);