package com.fs.app.controller;
import com.alibaba.fastjson.JSON;
import com.fs.common.core.domain.R;
import com.fs.common.core.redis.RedisCache;
import com.fs.company.service.ICompanyConfigService;
import com.fs.course.mapper.FsCourseSopLogsMapper;
import com.fs.course.mapper.FsCourseSopMapper;
import com.fs.course.mapper.FsCourseWatchLogMapper;
import com.fs.course.service.IFsCourseLinkService;
import com.fs.crm.mapper.CrmCustomerMapper;
import com.fs.store.mapper.FsUserMapper;
import com.fs.qw.domain.QwExternalContact;
import com.fs.qw.domain.QwUser;
import com.fs.qw.mapper.*;
import com.fs.qw.param.QwAutoSopTimeParam;
import com.fs.qw.service.IQwContactWayService;
import com.fs.qw.service.IQwExternalContactCrmService;
import com.fs.qw.service.IQwExternalErrRetryService;
import com.fs.qw.service.impl.AsyncSopService;
import com.fs.qw.vo.QwSopRuleTimeVO;
import com.fs.qwApi.service.QwApiService;
import com.fs.sop.domain.SopUserLogs;
import com.fs.sop.domain.SopUserLogsInfo;
import com.fs.sop.mapper.QwSopLogsMapper;
import com.fs.sop.mapper.QwSopMapper;
import com.fs.sop.mapper.SopUserLogsInfoMapper;
import com.fs.sop.params.QwSopAutoByTags;
import com.fs.sop.params.SopUserLogsParamByDate;
import com.fs.sop.service.IQwSopService;
import com.fs.sop.service.ISopUserLogsService;
import com.fs.voice.utils.StringUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import shade.okhttp3.Cache;

import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.TimeUnit;

@RestController
@RequestMapping(value="/app/test")
public class testController {

    @Autowired
    QwUserMapper qwUserMapper;
    @Autowired
    QwExternalContactMapper qwExternalContactMapper;
    @Autowired
    testService testService;
    @Autowired
    private RedisCache redisCache;

    @GetMapping("/qwHookNotify")
    public R qwHookNotify() {

//        redisCache.setCacheObject("qwUserRd:"+12313+":"+12313 ,JSON.toJSONString(null),1, TimeUnit.HOURS);

//
//        List<QwUser> qwUserAllKey = qwUserMapper.getQwUserAllKey();
//
//
//        int i=1;
//
//        for (QwUser qwUser : qwUserAllKey) {
//            System.out.println(qwUser);
//            i++;
//            System.out.println("执行到第:"+i);
//            testService.add(qwUser);
//
//        }


        return  R.ok();
    }





}
