package com.prolog.cs.base.gsp.resource;

import com.prolog.cs.basic.chain.model.dict.BaseCommonDictType;
import com.prolog.cs.basic.common.model.BaseCommonDict;
import com.prolog.framework.common.message.RestMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

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

@FeignClient(value = "${prolog.service.common}")
public interface CommonClient {

	/**
	 * 服务调用，查询养护类型关联商品大类
	 */
	@GetMapping("/dict/findUpKeepDict")
	public RestMessage<Map<String,String>> findUpKeepDict(@RequestParam("isProtected") Integer isProtected);

	/**
	 * 服务调用，查询养护类型关联商品大类
	 */
	@GetMapping("/dicttype")
	public RestMessage<BaseCommonDictType> getDictTypeById(@RequestParam("id") String id);
	
	/**
	 * 服务调用，查询养护类型关联商品大类
	 */
	@GetMapping("/dicttype/getDictTypeByCode")
	public RestMessage<BaseCommonDictType> getDictTypeByCode(@RequestParam("code") String code);


	@GetMapping("/dict/basic/type-list")
	public RestMessage<List<BaseCommonDict>> getDictBasicListByCodes(@RequestParam("typeCode") String typeCode, @RequestParam("dictCodes") String[] dictCodes);

}
