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.framework.tenant.core.job.TenantJob;
import com.yc.ship.module.trade.service.smsSendconfig.SmsSendconfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 上水开航前1天短信通知
 */
@Component
@Slf4j
public class OrderUpSmsOneJob implements JobHandler {
    @Resource
    private SmsSendconfigService smsSendconfigService;

    @Override
    @TenantIgnore
    public String execute(String s){
        log.info(">>>>>>>>>>>>>>>>>>>>>> OrderUpSmsOneJob Begin <<<<<<<<<<<<<<<<<<<<<<");
        try {
            smsSendconfigService.upSmsSendMsg(1,"SMS_505090361",1);
        } catch (Exception e) {
            log.error(">>>>>>>>>>>>>>>>>>>>>> OrderUpSmsOneJob Error <<<<<<<<<<<<<<<<<<<<<<");
            log.error(e.getMessage(), e);
        }
        log.info(">>>>>>>>>>>>>>>>>>>>>>  OrderUpSmsOneJob End  <<<<<<<<<<<<<<<<<<<<<<");
        return "成功";
    }
}
