为返回给界面的bean中的字段添加@JsonInclude(value=Include.NON_NULL)注解,当值为null时隐藏字段
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class NtcLwhhReport extends NtcReportEntity<NtcLwhhReport>{
|
||||
public class NtcLwhhReport extends NtcReportEntity<NtcLwhhReport> {
|
||||
|
||||
private static final long serialVersionUID = -5980925900825684234L;
|
||||
@JsonInclude(value = Include.NON_NULL)
|
||||
@ApiModelProperty(value = "性质", required = true)
|
||||
protected Integer lwhh;
|
||||
|
||||
@ApiModelProperty(value="性质", required=true)
|
||||
protected Integer lwhh ;
|
||||
|
||||
protected String searchLwhh;
|
||||
|
||||
|
||||
/**
|
||||
* @param lwhh the lwhh to set
|
||||
*/
|
||||
public void setLwhh(Integer lwhh) {
|
||||
this.lwhh = lwhh;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the lwhh
|
||||
*/
|
||||
public Integer getLwhh() {
|
||||
return lwhh;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the searchLwhh
|
||||
*/
|
||||
@@ -32,7 +35,7 @@ public class NtcLwhhReport extends NtcReportEntity<NtcLwhhReport>{
|
||||
public String getSearchLwhh() {
|
||||
return searchLwhh;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param searchLwhh the searchLwhh to set
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user