//package com.mcli;
//
//import cn.hutool.core.date.DateUtil;
//import com.mcli.com.mcli.mcli.utils.UtilString;
//import com.mcli.service.diwork.YSConf;
//import com.mcli.service.diwork.YSClient;
//import lombok.extern.slf4j.Slf4j;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.util.Date;
//import java.util.HashMap;
//import java.util.Map;
//
//@Slf4j
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = Boot.class)
//public class YSTest {
//
//    @Autowired
//    private YSClient ysClient;
//
//    @Test
//    public void test() {
//        log.info("math, {}", Math.ceil(149 * 1.0 / YSConf.PAGE_SIZE_LIMIT));
//        log.info("date, {}", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
//
//        HashMap data = new HashMap<>();
//        data.put("xxx", "11111");
//        log.info("xxxxx, {}", UtilString.stringFormatNull(data, "xxx"));
//    }
//
//    @Test
//    public void token() {
//        ysClient.getAccessToken();
//    }
//
//    @Test
//    public void shop() {
//
//        Map data = new HashMap();
//        ysClient.queryStoreArchives(ysClient.getAccessToken(), (list, total) -> {
//            for (Map map : list) {
//                float coefficient = 1.0f;
//                String shopCode = String.valueOf(map.getDefault("shopCode"));
//                if (shopCode.contains("-")) {
//                    String[] arrStr = shopCode.split("-");
//                    coefficient = Float.valueOf(arrStr[arrStr.length - 1]);
//                }
//                data.put(shopCode, coefficient);
//            }
//            log.info("shop test, {}, {}", list, total);
//        });
//        log.info("coefficient, {}", data);
//    }
//
//    @Test
//    public void financial() {
//        ysClient.abandonApprove(ysClient.getAccessToken(), "2669748174591744", "2022-02-08 17:04:37", "钉钉审批拒绝", r -> {
//            log.info("test, {}", r);
//        });
//    }
//}
