package cn.freemud.utils;

import com.alibaba.fastjson.JSON;
import com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter;
import com.freemud.application.sdk.api.ordercenter.entities.v1.OrderBeanV1;
import com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderInfoReqs;

/**
 * @author : xh.Z
 * @email : fisherman0510@163.com
 * @Date : 2022/5/17 19:50
 * @description :
 */
public class DemoMain {
    public static void main(String[] args) {
        String str = "{\"abnormalDesc\":\"配送异常\",\"abnormalState\":2,\"acceptTime\":1652777254000,\"actualPayAmount\":14.0,\"afterSalesOrderList\":[],\"appId\":\"wxa1f272347828dae8\",\"barCounter\":\"\",\"bizType\":1,\"businessDay\":1652716800000,\"canRefund\":true,\"cancelReason\":\"\",\"companySelfCode\":\"\",\"createTime\":1652777243000,\"daySeq\":2,\"deliveryContactInfoList\":[{\"addressDetail\":\"学清嘉创大厦A座,15层\",\"city\":\"\",\"contactsName\":\"\",\"expressNo\":\"0\",\"extInfo\":\"{\\\"receiveId\\\": \\\"3652769118829672465\\\"}\",\"infoType\":1,\"latitude\":40.0149600,\"longitude\":116.3530960,\"mobile\":\"18017275431\",\"province\":\"\",\"region\":\"\",\"relateObjectType\":1,\"street\":\"\",\"telephone\":\"\",\"thirdDeliveryId\":\"0\",\"tripDist\":0},{\"addressDetail\":\"third\",\"city\":\"\",\"contactsName\":\"\",\"expressNo\":\"3466125376617650177\",\"extInfo\":\"\",\"infoType\":0,\"latitude\":0E-7,\"longitude\":0E-7,\"mobile\":\"\",\"province\":\"\",\"region\":\"\",\"relateObjectType\":3,\"street\":\"\",\"telephone\":\"\",\"thirdDeliveryId\":\"241151056102441476\",\"tripDist\":0}],\"deliveryPromise\":0,\"deliveryState\":7,\"deliveryTime\":1652788054300,\"dinersNumber\":0,\"downstreamPosCode\":\"0\",\"downstreamThirdOrderCode\":\"0\",\"estimateDeliveryCompleteTime\":1652777721000,\"evaluationState\":0,\"expressChannelCode\":\"ShunFeng\",\"expressChannelName\":\"顺丰\",\"expressNo\":\"3466125376617650177\",\"expressType\":0,\"extInfo\":\"{\\\"fmId\\\": \\\"7702690244041010218497840\\\", \\\"appid\\\": \\\"wxa1f272347828dae8\\\", \\\"openid\\\": \\\"o0wG94khi0lKFhJgkOzD-H9EhhQ8\\\", \\\"payDate\\\": \\\"2022-05-17 16:47:32\\\", \\\"version\\\": \\\"2.0.78.2\\\", \\\"prepayId\\\": \\\"wx17164724038003103e5a4b8f7e315d0000\\\", \\\"fromAppId\\\": \\\"wxa1f272347828dae8\\\", \\\"sessionId\\\": \\\"6217f84eecca5aa97f7d0a38766c2627d16362c3\\\", \\\"endTransId\\\": \\\"181675384721622051716472326626\\\", \\\"paidMember\\\": false, \\\"payTransId\\\": \\\"7702690244041010218497840\\\", \\\"sessionKey\\\": \\\"BARlgtppIx/IN8sbAnQLiQ==\\\", \\\"totalScore\\\": 0, \\\"exceptionId\\\": null, \\\"memberLevel\\\": \\\"\\\", \\\"serviceTime\\\": 50, \\\"dispatchType\\\": \\\"1\\\", \\\"exceptionDesc\\\": null, \\\"pushOrderTime\\\": 0, \\\"dispatchTimeout\\\": 2, \\\"deliveryHoursDayEnd\\\": \\\"\\\", \\\"deliveryHoursDayStart\\\": \\\"2022-05-17 00:00:00\\\", \\\"packageAmountCollectType\\\": 1}\",\"immediately\":true,\"isParent\":false,\"localTableKey\":\"\",\"marketingCode\":\"\",\"marketingType\":0,\"needInvoice\":false,\"note\":\"\",\"operator\":\"\",\"orderArea\":\"0\",\"orderClient\":2,\"orderCode\":\"24404100911116957400003\",\"orderCostDetailList\":[{\"actualCostAmount\":2.0,\"billType\":1,\"costAmount\":2.0,\"costName\":\"配送费\",\"costType\":2,\"createTime\":1652777242000,\"note\":\"\",\"orderCode\":\"24404100911116957400003\",\"orderItemId\":0,\"partnerId\":\"2690\",\"productId\":\"0\",\"productSeq\":1,\"updateTime\":1652777242000}],\"orderExtended\":{\"agentPayerId\":\"\",\"agentPayerName\":\"\",\"createTime\":1652777243000,\"id\":244041009111169574,\"isDeleted\":false,\"orderClientGroup\":\"北京\",\"orderClientGroupCode\":\"beijin\",\"orderCode\":\"24404100911116957400003\",\"orderId\":244041009111169574,\"partnerId\":\"2690\",\"sendWord\":\"\",\"spellGroupCode\":\"\",\"storeId\":\"202104120\",\"storeNameEn\":\"\",\"updateTime\":1652777242000,\"userPhone\":\"\",\"version\":0},\"orderInvoice\":{\"address\":\"\",\"bankCardNo\":\"\",\"content\":\"\",\"invoiceBank\":\"\",\"invoiceNo\":\"\",\"invoiceUrl\":\"\",\"itemId\":\"\",\"partnerId\":\"\",\"phoneNo\":\"\",\"pickUpNo\":\"\",\"taxNo\":\"\",\"title\":\"\",\"userId\":\"\"},\"orderItemList\":[{\"canRefund\":true,\"categoryId\":\"0\",\"categoryName\":\"0\",\"extInfo\":\"{\\\"tax\\\": 0.01, \\\"stapleFood\\\": 0, \\\"isMonthCard\\\": 0, \\\"isSendGoods\\\": false, \\\"cartGoodsUid\\\": \\\"2691e445-6261-42c4-9a2b-dfbe1428d7d7\\\", \\\"isB3S1Coupon\\\": 0, \\\"spuProductCode\\\": \\\"1wewe\\\"}\",\"id\":244041009154161192,\"ignoreInOrderClose\":false,\"marketingCode\":\"0\",\"marketingType\":0,\"nickName\":\"\",\"note\":\"\",\"openId\":\"\",\"originalProductType\":1,\"parentProductId\":\"0\",\"photoUrl\":\"\",\"productCode\":\"1wewe\",\"productForeignName\":\"\",\"productForeignProperty\":\"\",\"productForeignSpecName\":\"\",\"productId\":\"232353430150208040\",\"productName\":\"molly五花肉\",\"productPicUrl\":\"https://picture.sandload.cn/1644373516221.jpg\",\"productPrice\":2.0,\"productProperty\":\"\",\"productQuantity\":2,\"productSeq\":1,\"productSharePrice\":0.0,\"productSpec\":\"232353430150208040\",\"productSpecName\":\"molly五花肉\",\"productType\":0,\"productUnit\":\"g\",\"productUpc\":\"\",\"productWeightUnit\":0,\"salePrice\":2.0,\"settlementPrice\":4.0,\"thirdProductId\":\"230wejdal\",\"userId\":\"\",\"weight\":500.00},{\"canRefund\":true,\"categoryId\":\"0\",\"categoryName\":\"0\",\"extInfo\":\"{\\\"tax\\\": 0.01, \\\"stapleFood\\\": 0, \\\"isMonthCard\\\": 0, \\\"isSendGoods\\\": false, \\\"cartGoodsUid\\\": \\\"ed4a6465-560f-4f89-a481-d014b12b3f89\\\", \\\"isB3S1Coupon\\\": 0, \\\"spuProductCode\\\": \\\"141312\\\", \\\"thirdProductSpecId\\\": \\\"H00401\\\", \\\"thirdProductPropertyId\\\": \\\"H00301,H00101\\\"}\",\"id\":244041009169889834,\"ignoreInOrderClose\":false,\"marketingCode\":\"0\",\"marketingType\":0,\"nickName\":\"\",\"note\":\"\",\"openId\":\"\",\"originalProductType\":10,\"parentProductId\":\"0\",\"photoUrl\":\"\",\"productCode\":\"\",\"productForeignName\":\"\",\"productForeignProperty\":\"\",\"productForeignSpecName\":\"\",\"productId\":\"215806350346786828\",\"productName\":\"柚子的多规格奶茶\",\"productPicUrl\":\"https://picture.sandload.cn/1628583411565.jpg\",\"productPrice\":2.0,\"productProperty\":\"常温/正常糖\",\"productQuantity\":2,\"productSeq\":2,\"productSharePrice\":0.0,\"productSpec\":\"215806350349932557\",\"productSpecName\":\"柚子的多规格奶茶/小杯\",\"productType\":0,\"productUnit\":\"gk\",\"productUpc\":\"\",\"productWeightUnit\":0,\"salePrice\":2.0,\"settlementPrice\":4.0,\"thirdProductId\":\"215806350349932557\",\"userId\":\"\",\"weight\":100.00},{\"canRefund\":true,\"categoryId\":\"0\",\"categoryName\":\"0\",\"extInfo\":\"{\\\"tax\\\": 0.01, \\\"stapleFood\\\": 0, \\\"isMonthCard\\\": 0, \\\"isSendGoods\\\": false, \\\"cartGoodsUid\\\": \\\"8e82b58d-3a64-44b6-b620-1a4528e4cff5\\\", \\\"isB3S1Coupon\\\": 0, \\\"spuProductCode\\\": \\\"klop\\\", \\\"productGroupList\\\": [{\\\"groupId\\\": \\\"238558978198673156\\\", \\\"groupName\\\": \\\"molly\\\", \\\"thirdGroupId\\\": \\\"2345\\\"}]}\",\"id\":244041009199249964,\"ignoreInOrderClose\":false,\"marketingCode\":\"0\",\"marketingType\":0,\"nickName\":\"\",\"note\":\"\",\"openId\":\"\",\"originalProductType\":7,\"parentProductId\":\"0\",\"photoUrl\":\"\",\"productCode\":\"klop\",\"productForeignName\":\"\",\"productForeignProperty\":\"\",\"productForeignSpecName\":\"\",\"productId\":\"238612382540306184\",\"productName\":\"molly套餐\",\"productPicUrl\":\"https://picture.sandload.cn/1650333699582.png\",\"productPrice\":104.0,\"productProperty\":\"\",\"productQuantity\":1,\"productSeq\":3,\"productSharePrice\":100.0,\"productSpec\":\"238612382540306184\",\"productSpecName\":\"molly套餐\",\"productType\":6,\"productUnit\":\"\",\"productUpc\":\"\",\"productWeightUnit\":0,\"salePrice\":4.0,\"settlementPrice\":4.0,\"thirdProductId\":\"lop0\",\"userId\":\"\",\"weight\":0.00},{\"canRefund\":true,\"categoryId\":\"0\",\"categoryName\":\"0\",\"extInfo\":\"{\\\"tax\\\": 0.01, \\\"isMonthCard\\\": 0, \\\"isB3S1Coupon\\\": 0, \\\"isFixedProduct\\\": true, \\\"spuProductCode\\\": \\\"1wewe\\\"}\",\"id\":244041009216027182,\"ignoreInOrderClose\":false,\"marketingCode\":\"0\",\"marketingType\":0,\"nickName\":\"\",\"note\":\"\",\"openId\":\"\",\"originalProductType\":1,\"parentProductId\":\"238612382540306184_3\",\"photoUrl\":\"\",\"productCode\":\"1wewe\",\"productForeignName\":\"\",\"productForeignProperty\":\"\",\"productForeignSpecName\":\"\",\"productId\":\"232353430150208040\",\"productName\":\"molly五花肉\",\"productPicUrl\":\"https://picture.sandload.cn/1644373516221.jpg\",\"productPrice\":2.0,\"productProperty\":\"\",\"productQuantity\":1,\"productSeq\":0,\"productSharePrice\":1.0,\"productSpec\":\"232353430150208040\",\"productSpecName\":\"molly五花肉\",\"productType\":6,\"productUnit\":\"g\",\"productUpc\":\"\",\"productWeightUnit\":0,\"salePrice\":1.0,\"settlementPrice\":1.0,\"thirdProductId\":\"230wejdal\",\"userId\":\"\",\"weight\":500.00},{\"canRefund\":true,\"categoryId\":\"0\",\"categoryName\":\"0\",\"extInfo\":\"{\\\"tax\\\": 0.01, \\\"isMonthCard\\\": 0, \\\"isB3S1Coupon\\\": 0, \\\"isFixedProduct\\\": false, \\\"spuProductCode\\\": \\\"wwerxvv23\\\", \\\"productGroupList\\\": [{\\\"groupId\\\": \\\"238558978198673156\\\", \\\"groupName\\\": \\\"molly\\\", \\\"thirdGroupId\\\": \\\"2345\\\"}]}\",\"id\":244041009234901552,\"ignoreInOrderClose\":false,\"marketingCode\":\"0\",\"marketingType\":0,\"nickName\":\"\",\"note\":\"\",\"openId\":\"\",\"originalProductType\":1,\"parentProductId\":\"238612382540306184_3\",\"photoUrl\":\"\",\"productCode\":\"wwerxvv23\",\"productForeignName\":\"\",\"productForeignProperty\":\"\",\"productForeignSpecName\":\"\",\"productId\":\"232588513865984526\",\"productName\":\"molly蒜蓉生蚝\",\"productPicUrl\":\"https://picture.sandload.cn/1644572711294.jpg\",\"productPrice\":1.0,\"productProperty\":\"\",\"productQuantity\":2,\"productSeq\":0,\"productSharePrice\":0.0,\"productSpec\":\"232588513865984526\",\"productSpecName\":\"molly蒜蓉生蚝\",\"productType\":6,\"productUnit\":\"g\",\"productUpc\":\"\",\"productWeightUnit\":0,\"salePrice\":1.0,\"settlementPrice\":2.0,\"thirdProductId\":\"5346tfrg\",\"userId\":\"\",\"weight\":500.00},{\"canRefund\":true,\"categoryId\":\"0\",\"categoryName\":\"0\",\"extInfo\":\"{\\\"tax\\\": 0.01, \\\"isMonthCard\\\": 0, \\\"isB3S1Coupon\\\": 0, \\\"isFixedProduct\\\": false, \\\"spuProductCode\\\": \\\"0096l\\\", \\\"productGroupList\\\": [{\\\"groupId\\\": \\\"238558978198673156\\\", \\\"groupName\\\": \\\"molly\\\", \\\"thirdGroupId\\\": \\\"2345\\\"}]}\",\"id\":244041009242241586,\"ignoreInOrderClose\":false,\"marketingCode\":\"0\",\"marketingType\":0,\"nickName\":\"\",\"note\":\"\",\"openId\":\"\",\"originalProductType\":1,\"parentProductId\":\"238612382540306184_3\",\"photoUrl\":\"\",\"productCode\":\"0096l\",\"productForeignName\":\"\",\"productForeignProperty\":\"\",\"productForeignSpecName\":\"\",\"productId\":\"238551407440107265\",\"productName\":\"molly单规格\",\"productPicUrl\":\"https://picture.sandload.cn/1650275658378.jpg\",\"productPrice\":100.0,\"productProperty\":\"\",\"productQuantity\":1,\"productSeq\":0,\"productSharePrice\":99.0,\"productSpec\":\"238551407440107265\",\"productSpecName\":\"molly单规格\",\"productType\":6,\"productUnit\":\"g\",\"productUpc\":\"\",\"productWeightUnit\":0,\"salePrice\":1.0,\"settlementPrice\":1.0,\"thirdProductId\":\"24gh\",\"userId\":\"\",\"weight\":500.00}],\"orderSendCouponRespList\":[],\"orderSettlementDetailList\":[{\"agentDiscountAmount\":0.0,\"carrierDiscountAmount\":0.0,\"extInfo\":\"\",\"externalObjectId\":\"setMeal\",\"externalObjectName\":\"\",\"externalObjectSubId\":\"\",\"ignoreInDiscountAmount\":false,\"isOnline\":true,\"note\":\"套餐商品优惠\",\"number\":1,\"platformDiscountAmount\":0.0,\"platformServiceAmount\":0.0,\"productId\":\"0\",\"productSeq\":0,\"prospectiveAmount\":0.0,\"settlementAmount\":-100.0,\"settlementType\":211,\"shopAmount\":0.0,\"shopDiscountAmount\":-100.0},{\"agentDiscountAmount\":0.0,\"carrierDiscountAmount\":0.0,\"extInfo\":\"\",\"externalObjectId\":\"setMeal\",\"externalObjectName\":\"\",\"externalObjectSubId\":\"\",\"ignoreInDiscountAmount\":false,\"isOnline\":true,\"note\":\"套餐商品优惠\",\"number\":1,\"platformDiscountAmount\":0.0,\"platformServiceAmount\":0.0,\"productId\":\"238612382540306184\",\"productSeq\":3,\"prospectiveAmount\":0.0,\"settlementAmount\":100.0,\"settlementType\":211,\"shopAmount\":0.0,\"shopDiscountAmount\":100.0},{\"agentDiscountAmount\":0.0,\"carrierDiscountAmount\":0.0,\"extInfo\":\"\",\"externalObjectId\":\"\",\"externalObjectName\":\"\",\"externalObjectSubId\":\"\",\"ignoreInDiscountAmount\":false,\"isOnline\":true,\"note\":\"\",\"number\":1,\"platformDiscountAmount\":0.0,\"platformServiceAmount\":0.0,\"productId\":\"238612382540306184\",\"productSeq\":3,\"prospectiveAmount\":0.0,\"settlementAmount\":100.0,\"settlementType\":0,\"shopAmount\":0.0,\"shopDiscountAmount\":100.0},{\"agentDiscountAmount\":0.0,\"carrierDiscountAmount\":0.0,\"extInfo\":\"\",\"externalObjectId\":\"\",\"externalObjectName\":\"\",\"externalObjectSubId\":\"\",\"ignoreInDiscountAmount\":false,\"isOnline\":true,\"note\":\"\",\"number\":1,\"platformDiscountAmount\":0.0,\"platformServiceAmount\":0.0,\"productId\":\"232353430150208040\",\"productSeq\":0,\"prospectiveAmount\":0.0,\"settlementAmount\":1.0,\"settlementType\":0,\"shopAmount\":0.0,\"shopDiscountAmount\":1.0},{\"agentDiscountAmount\":0.0,\"carrierDiscountAmount\":0.0,\"extInfo\":\"\",\"externalObjectId\":\"\",\"externalObjectName\":\"\",\"externalObjectSubId\":\"\",\"ignoreInDiscountAmount\":false,\"isOnline\":true,\"note\":\"\",\"number\":1,\"platformDiscountAmount\":0.0,\"platformServiceAmount\":0.0,\"productId\":\"238551407440107265\",\"productSeq\":0,\"prospectiveAmount\":0.0,\"settlementAmount\":99.0,\"settlementType\":0,\"shopAmount\":0.0,\"shopDiscountAmount\":99.0},{\"agentDiscountAmount\":0.0,\"carrierDiscountAmount\":0.0,\"extInfo\":\"\",\"externalObjectId\":\"\",\"externalObjectName\":\"优惠总金额\",\"externalObjectSubId\":\"\",\"ignoreInDiscountAmount\":false,\"isOnline\":true,\"note\":\"\",\"number\":0,\"platformDiscountAmount\":0.0,\"platformServiceAmount\":0.0,\"productId\":\"0\",\"productSeq\":0,\"prospectiveAmount\":0.0,\"settlementAmount\":14.0,\"settlementType\":205,\"shopAmount\":0.0,\"shopDiscountAmount\":100.0}],\"orderState\":5,\"orderSubState\":0,\"orderType\":3,\"originalAmount\":114.0,\"parentCode\":\"0\",\"partnerId\":\"2690\",\"partnerName\":\"\",\"payChannel\":\"10211\",\"payChannelName\":\"微信\",\"payChannelType\":1,\"payRequestNo\":\"7702690244041010218497840\",\"payState\":2,\"payTime\":1652777254000,\"payType\":1,\"pickUpGoodsNo\":\"2930\",\"posCode\":\"\",\"posTableKey\":\"\",\"printNum\":0,\"settlementAmount\":14.0,\"sourceType\":0,\"storeId\":\"202104120\",\"storeName\":\"molly的小店\",\"storeUnifyId\":\"0\",\"suspendDesc\":\"\",\"suspendState\":0,\"thirdOrderCode\":\"24404100911116957400003\",\"thirdStoreId\":\"202104120\",\"toStoreId\":\"0\",\"updateTime\":1652779175000,\"userId\":\"3652749342485672432\",\"userName\":\"雪玉\",\"weight\":3200.00}";
        OrderInfoReqs orderInfoReqs = JSON.parseObject(str, OrderInfoReqs.class);
        OrderBeanV1 orderBeanV1 = new OrderCenterSdkAdapter().convent2NEWOrderInfo(orderInfoReqs);
        System.out.println(JSON.toJSONString(orderBeanV1));
    }
}
