package com.hzs.third.express.provider;

import com.hzs.common.core.domain.R;
import com.hzs.common.core.utils.StringUtils;
import com.hzs.third.express.IExpressTrackService;
import com.hzs.third.express.dto.ExpressDTO;
import com.hzs.third.express.service.IExpressService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 快递服务提供类
 */
@DubboService
public class ExpressProvider implements IExpressTrackService {

    @Autowired
    private IExpressService iExpressService;

    @Override
    public R<ExpressDTO> expressTrackInfo(String trackingNumber, String mobile) {
        if (StringUtils.isEmpty(trackingNumber) || StringUtils.isEmpty(mobile)) {
            return R.fail("快递调用参数不能为空");
        }
        return iExpressService.expressTrackInfo(trackingNumber, mobile);

    }
}
