| | |
| | | |
| | | import com.alibaba.fastjson.serializer.ValueFilter; |
| | | import org.springframework.stereotype.Component; |
| | | import java.math.BigDecimal; |
| | | |
| | | @Component |
| | | public class BooleanValueFilter implements ValueFilter{ |
| | | @Override |
| | | public Object process(Object object, String propertyName, Object propertyValue) { |
| | | if(propertyValue!=null&&propertyValue instanceof Boolean){ |
| | | return (Boolean)propertyValue?1:0; |
| | | if(propertyValue!=null){ |
| | | if(propertyValue instanceof Boolean){ |
| | | return (Boolean)propertyValue?1:0; |
| | | } |
| | | } |
| | | return propertyValue; |
| | | } |