package com.tanpu.feo.feojob.controller;

import cn.hutool.json.JSONUtil;
import com.tanpu.common.api.CommonResp;
import com.tanpu.feo.feojob.dto.OrgSyncDto;
import com.tanpu.feo.feojob.jobs.DaySubJob;
import com.tanpu.feo.feojob.jobs.OrgSyncByWxcpJob;
import com.tanpu.feo.feojob.service.OrgSyncByJyzyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(tags = "手动执行 早报推送")
@RequestMapping(value = "v1/daySubJob")
@Slf4j
public class DaySubjectController {

    @Resource
    private DaySubJob daySubJob;

    @RequestMapping(value = "/sendDaySubjectMessage", method = RequestMethod.GET)
    @ApiOperation(value = "早报推送")
    public CommonResp<String> executeSyneFromWxCp() {
        daySubJob.sendDaySubjectMessage();
        return CommonResp.success("执行完成");
    }

}