1.实体类上加注解(全局)或者某个字段上加注解(针对某个字段null属性去除)
*/
@SuppressWarnings("serial")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class KhMjYkb extends Model<KhMjYkb> {
private Integer id;
private Date 日期;
private Integer 总分;
private String 公安局;
2.对于返回前端的Map去除值为null的键值对:工具列是Hutool的.
MapUtil.removeNullValue(map);