package com.jianshui.invoiceall.utils;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;

import java.util.Map;

/**
 * Vo生成
 * @author kk
 * @date 2022年12月09日 17:41
 */
public class GenVoCodeTest {


    public static void main(String[] args) {

        String json  = "{\n" +
                "        \"qrlx\": \"确认类型\",\n" +
                "        \"hzfpxxqrdid\": \"红字发票信息确认单id\",\n" +
                "        \"xsfnsrsbh\": \"销方纳税人识别号\"\n" +
                "    }";

        JSONObject jsonObject = JSONUtil.parseObj(json);

        String result = "";

        for (Map.Entry<String, Object> objectEntry : jsonObject) {
            result = result + " @NotEmpty\n@ApiModelProperty(value = \""+objectEntry.getValue()+"\") \n private String "+objectEntry.getKey()+";\n\n";
        }

        System.out.println(result);
    }


}
