package com.hzs.member.account.provider;

import com.hzs.common.core.domain.R;
import com.hzs.member.account.IMemberJobServiceApi;
import com.hzs.member.account.service.ICuMemberAccountDetailService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 会员模块定时任务服务提供
 */
@Slf4j
@DubboService
public class IMemberJobServiceProvider implements IMemberJobServiceApi {

    @Autowired
    private ICuMemberAccountDetailService memberAccountDetailService;

    @Override
    public R insertAccountDetail() {
        try {
            memberAccountDetailService.insertAccountDetail();
        } catch (Exception e) {
            log.info("定时插入账户详情数据失败：", e);
            return R.fail(e.getMessage());
        }
        return R.ok();
    }

}
