package com.sunda.spmsorder.service;

import com.alibaba.fastjson.JSONObject;
import com.sunda.spmscommon.ResponseResult;
import com.sunda.spmsorder.entity.OrderKeyValueConfig;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 订单请购码值配置信息表 服务类
 * </p>
 *
 * @author Wayne
 * @since 2020-12-22
 */
public interface IOrderKeyValueConfigService extends IService<OrderKeyValueConfig> {

    /** 获取订单全部键值对配置信息表 */
    List<OrderKeyValueConfig> getAllKVConfig ();

    /** 根据码值信息的码，查询值 */
    List<OrderKeyValueConfig> getByFieldKey(String fieldKey);

    /** 根据码值信息的码与备注，查询值 */
    List<OrderKeyValueConfig> getByRemark(String fieldKey,String remark);

    /** 新增或修改键值对配置信息 - uuid 不为空则更新指定数据；uuid 为空则新建数据； */
    ResponseResult createKVConfig(JSONObject doc);

    /** 删除一个键值对配置数据 */
    ResponseResult deleteKCConfig(String uuid);

    /** 根据码值对照代码获取键值对配置信息*/
    List<OrderKeyValueConfig> getKeyValueByKeyCode(String keyCode,String fieldKey);

}
