package com.hzs.activity.other.provider;

import com.hzs.activity.other.IAcOtherServiceApi;
import com.hzs.activity.other.service.IAcOtherPriceService;
import com.hzs.common.core.domain.R;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 其它活动dubbo接口
 */
@Slf4j
@DubboService
public class AcOtherServiceApi implements IAcOtherServiceApi {

    @Autowired
    private IAcOtherPriceService iAcOtherPriceService;

    @Override
    public R<?> acOtherPriceHandle() {
        try {
            String str = iAcOtherPriceService.acOtherPriceHandle();
            if (null == str) {
                return R.ok();
            }
            return R.fail(str);
        } catch (Exception e) {
            log.error("车奖、旅游奖等定时任务 处理异常: {}", e.getMessage(), e);
            return R.fail(e.getMessage());
        }
    }

}
