package com.hzs.third.job;

import com.hzs.member.account.IMemberJobServiceApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

/**
 * 会员模块定时任务
 */
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
@Component
@Slf4j
public class CuMemberJob {

    @DubboReference
    IMemberJobServiceApi iMemberJobServiceApi;

    /**
     * 定时插入账户详情数据
     */
    @XxlJob("insertAccountDetail")
    public void insertAccountDetail() {
        iMemberJobServiceApi.insertAccountDetail();
    }

}
