package com.tofly.base.handler.zscb;

import com.tofly.base.service.handler.MessageRemind;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @author FlashWJL
 * @date 2021/5/31 16:29
 */
@Component
@AllArgsConstructor
public class RemindMessageHandler {

    private final MessageRemind messageRemind;

    @XxlJob("monthPriceHandler")
    public ReturnT<String> monthPrice(String param) throws Exception{
//        System.out.println("执行----");
        messageRemind.monthMessagePrice();
        return ReturnT.SUCCESS;
    }

    @XxlJob("dayPodWater")
    public ReturnT<String> dayPodWater(String param) throws Exception{
//        System.out.println("执行----");
        messageRemind.dayMessagePodWater();
        return ReturnT.SUCCESS;
    }

    /**
     * 每月财务填报提醒
     */
    @XxlJob("financeIsAllowed")
    public ReturnT<String> financeIsAllowed(String param) throws Exception{
//        System.out.println("执行----");
        messageRemind.financeIsAllowed();
        return ReturnT.SUCCESS;
    }


    /**
     * 每日推送水表周检个数
     * @param param
     * @return
     * @throws Exception
     */
    @XxlJob("shouldZjCount")
    public ReturnT<String> getShouldZjCount(String param) throws Exception{
//        System.out.println("执行");
        messageRemind.getShouldZjCount();
        return ReturnT.SUCCESS;
    }
}
