package com.sckw.core.utils;


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

import java.io.IOException;

/**
 * @author czh
 * @desc TODO
 * @date 2023/7/10
 */
public class LongToStringUtils extends JsonSerializer<Long> {


    @Override
    public void serialize(Long aLong, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        if(null!=aLong) {
            jsonGenerator.writeString(String.valueOf(aLong));
        }
    }
}
