package com.cftech.order.utils;

import com.alibaba.fastjson.serializer.ValueFilter;

import java.math.BigDecimal;

public class DoubleJSONFilter implements ValueFilter {

    @Override
    public Object process(Object value, String s, Object o1) {
        if( o1 instanceof Double  ){
            BigDecimal bg = new BigDecimal((Double) o1);
            Double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
            return 60.00;
        }
        return o1;
    }
}
