package com.yc.ship.module.trade.job;

import com.xxl.job.core.handler.annotation.XxlJob;
import com.yc.ship.framework.quartz.core.handler.JobHandler;
import com.yc.ship.framework.tenant.core.aop.TenantIgnore;
import com.yc.ship.module.trade.service.smsSendconfig.SmsSendconfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class OrderSmsJob implements JobHandler {
    @Resource
    private SmsSendconfigService smsSendconfigService;

    @Override
    public String execute(String param) {
        return "成功";
    }


    /***
     * @author qsl
     * 2026/3/6 17:38
     */
    @XxlJob("smsSendMsg1")
    @TenantIgnore
    public void execute() {
        log.info(">>>>>>>>>>>>>>>>>>>>>> smsSendMsg1 Begin <<<<<<<<<<<<<<<<<<<<<<");
        try {
            smsSendconfigService.smsSendMsg(0,null);
        } catch (Exception e) {
            log.error(">>>>>>>>>>>>>>>>>>>>>> smsSendMsg Error <<<<<<<<<<<<<<<<<<<<<<");
            log.error(e.getMessage(), e);
        }
        log.info(">>>>>>>>>>>>>>>>>>>>>>  OverCheckJob End  <<<<<<<<<<<<<<<<<<<<<<");
    }

}
