//package com.jxy.marketall.Therad;
//
//import com.alibaba.fastjson.JSONObject;
//import com.jxy.common.core.utils.DateUtils;
//import com.jxy.common.core.utils.SpringUtils;
//import com.jxy.common.core.web.Result.AjaxResult;
//import com.jxy.marketall.entity.BiAn;
//import com.jxy.marketall.enums.SymbolType;
//import com.jxy.marketall.service.impl.BiAnServiceImpl;
//import com.jxy.marketall.utils.EnumUtils;
//import com.jxy.marketall.utils.MyWebSocketClient;
//import com.jxy.marketall.utils.Test;
//import com.jxy.marketall.utils.TestTask;
//import com.jxy.marketall.vo.BiAnVo;
//import com.jxy.marketall.websocket.WebSocketService;
//import org.java_websocket.client.WebSocketClient;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.BeanUtils;
//
//import java.util.Calendar;
//import java.util.Date;
//import java.util.GregorianCalendar;
//import java.util.List;
//import java.util.concurrent.atomic.AtomicBoolean;
//
///**
// * @Description TODO
// * @Date 2022/6/30 18:49
// * @Author 杜懿
// */
//public class TestThread implements Runnable {
//
//    private Logger log = LoggerFactory.getLogger(TestThread.class);
//
//    private TestTask testTask;
//    private String message;
//
//    public TestThread(TestTask testTask, String msg) {
//        this.testTask = testTask;
//        this.message = msg;
//    }
//
//    @Override
//    public void run() {
//        try {
//            while (!Thread.currentThread().isInterrupted()){
//                System.out.println(Thread.currentThread().getName() + "正常执行中,msg:"+message);
//                Thread.sleep(1000);
//            }
//
//        }catch (InterruptedException e){
//            System.out.println(Thread.currentThread().getName() + "成功捕获中断异常");
//            //断开币安提供的websocket
//            Thread curr = Thread.currentThread();
//            //再次调用interrupt方法中断自己，将中断状态设置为“中断”
//            try {
//                Thread.sleep(1000);
//            } catch (InterruptedException interruptedException) {
//                interruptedException.printStackTrace();
//            }
//            curr.interrupt();
//        }
//    }
//}
