package com.fs.qw.qwTask;

import com.fs.FSApplication;
import com.fs.wxwork.dto.*;
import com.fs.wxwork.enums.DeverTypeEnum;
import com.fs.wxwork.service.WxWorkService;
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;

@RunWith(value = SpringRunner.class)
@SpringBootTest(classes = FSApplication.class)
@Slf4j
public class QwTaskTest {
    @Autowired
    private WxWorkService wxWorkService;
    @Test
    public void test() {
//        WxWorkInitDTO wxWorkInitDTO = new WxWorkInitDTO();
//        wxWorkInitDTO.setDeverType(DeverTypeEnum.IPAD.getValue());
//        WxWorkResponseDTO<WxWorkInitRespDTO> initResp = wxWorkService.init(wxWorkInitDTO);
//        log.info("initResp:{}", initResp);

        // uuid: 486cd174a7bc7a81e94915df22958827
        //登录企业微信
        WxWorkGetQrCodeDTO wxWorkGetQrCodeDTO = new WxWorkGetQrCodeDTO();
        wxWorkGetQrCodeDTO.setUuid("bf94b22b34e75317f6e3ff5065a46104");

        WxWorkResponseDTO<WxWorkGetQrCodeRespDTO> qrCode = wxWorkService.getQrCode(wxWorkGetQrCodeDTO);
        log.info("qrCode:{}", qrCode);
//        WxWorkSendTextMsgDTO wxWorkSendTextMsgDTO = new WxWorkSendTextMsgDTO();
//        wxWorkSendTextMsgDTO.setUuid(initResp.getData().getUuid());

//        wxWorkService.SendTextMsg()

    }
}
