package cn.com.countrygarden.bi.main.util.entity;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

/**
 * <pre>
 *  该类可以将Long转换成String类型
 * </pre>
 *  
 * @author ferren  liao-r@neusoft.com
 * @version 1.00.00
 * <p>
 * <p>
 * <pre>
 * 修改记录
 *    修改后版本:     修改人：  修改日期:     修改内容:
 * </pre>
 */
public class ToStringSerializerJackJson extends JsonSerializer<Long> {

    @Override
    public void serialize(Long object, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        //变成long型数据返回
        jsonGenerator.writeString(object.toString());
    }


}
