package com.api.test;

import com.alibaba.fastjson.JSON;
import com.heyu.api.alibaba.request.mm.VvPropertyInsertOrUpdateRequest;
import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity;

import java.util.ArrayList;
import java.util.List;

public class AdminCaTest {


    public static void main(String[] args) {
        VvPropertyInsertOrUpdateRequest vvCategoryPropertyEntity1 = new VvPropertyInsertOrUpdateRequest();

        vvCategoryPropertyEntity1.setCategoryId(17L);
        vvCategoryPropertyEntity1.setCategoryName("项圈");
        vvCategoryPropertyEntity1.setCategoryPropertyName("珍珠直径");
        vvCategoryPropertyEntity1.setDefaultSort(1);


        VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity11 = new VvCategoryPropertyValueEntity();
        vvCategoryPropertyValueEntity11.setCategoryPropertyValue("5-5.5mm");

        VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity12 = new VvCategoryPropertyValueEntity();
        vvCategoryPropertyValueEntity12.setCategoryPropertyValue("5.5-6mm");


        List<VvCategoryPropertyValueEntity> vvCategoryPropertyValueEntities1 = new ArrayList<>();
        vvCategoryPropertyValueEntities1.add(vvCategoryPropertyValueEntity11);
        vvCategoryPropertyValueEntities1.add(vvCategoryPropertyValueEntity12);
        vvCategoryPropertyEntity1.setVvCategoryPropertyValueEntities(vvCategoryPropertyValueEntities1);




        VvPropertyInsertOrUpdateRequest vvCategoryPropertyEntity2 = new VvPropertyInsertOrUpdateRequest();
        vvCategoryPropertyEntity2.setCategoryId(17L);
        vvCategoryPropertyEntity2.setCategoryName("项圈");
        vvCategoryPropertyEntity2.setCategoryPropertyName("颜色分类");
        vvCategoryPropertyEntity2.setDefaultSort(2);



        VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity21 = new VvCategoryPropertyValueEntity();
        vvCategoryPropertyValueEntity21.setCategoryPropertyValue("【臻藏】极光镜面AKOYA/ S925银扣");

        VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity22 = new VvCategoryPropertyValueEntity();
        vvCategoryPropertyValueEntity22.setCategoryPropertyValue("【臻品】GUILD极光大证 / 18K金扣");

        List<VvCategoryPropertyValueEntity> vvCategoryPropertyValueEntities2 = new ArrayList<>();
        vvCategoryPropertyValueEntities2.add(vvCategoryPropertyValueEntity21);
        vvCategoryPropertyValueEntities2.add(vvCategoryPropertyValueEntity22);

        vvCategoryPropertyEntity2.setVvCategoryPropertyValueEntities(vvCategoryPropertyValueEntities2);


        List<VvPropertyInsertOrUpdateRequest> vvPropertyInsertOrUpdateRequestList = new ArrayList<>();
        vvPropertyInsertOrUpdateRequestList.add(vvCategoryPropertyEntity1);
        vvPropertyInsertOrUpdateRequestList.add(vvCategoryPropertyEntity2);

        System.out.println(JSON.toJSONString(vvPropertyInsertOrUpdateRequestList));


    }
}
