package cn.superdesk.uniorder.dubbo.consumer.unified;

import cn.superdesk.uniorder.dto.vo.unified.UnifiedOrderAppraiseAdd;
import cn.superdesk.uniorder.dto.vo.unified.UnifiedOrderAppraiseSMAdd;
import cn.superdesk.uniorder.dto.vo.unified.UnifiedOrderGoodsAppraiseAdd;
import cn.superdesk.uniorder.dubbo.facade.unified.DubboUnifiedOrderAppraiseService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;


@Slf4j
@Component
public class UnifiedOrderAppraiseDubboConsumerService {

	@Reference(version = "1.0.0", timeout = 30000, retries = -1)
	private DubboUnifiedOrderAppraiseService dubboUnifiedOrderAppraiseService;

	public Map<String, Object> addObj(UnifiedOrderAppraiseAdd appraiseAdd) {

		return dubboUnifiedOrderAppraiseService.addObj(appraiseAdd);
	}

	public Map<String, Object> addObjSM(UnifiedOrderAppraiseSMAdd appraiseAdd,
	                                    List<UnifiedOrderGoodsAppraiseAdd> goodsLs) {

		return dubboUnifiedOrderAppraiseService.addObjSM(appraiseAdd, goodsLs);
	}
}
