package com.hai.goods.service;

import com.alibaba.fastjson.JSONObject;
import com.hai.entity.GoodsRegionFreight;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @serviceName GoodsRegionFreightService.java
 * @author Sum1Dream
 * @version 1.0.0
 * @Description // 区域运费业务
 * @createTime 15:11 2023/4/14
 **/
public interface GoodsRegionFreightService {

    /**
     * @Author Sum1Dream
     * @Name insertRegionFreight
     * @Description // 新增
     * @Date 15:08 2023/4/11
     * @Param [RegionFreight]
     * @Return void
     */
    void insertRegionFreight(GoodsRegionFreight regionFreight);

    /**
     * @Author Sum1Dream
     * @Name updateRegionFreight
     * @Description // 更新
     * @Date 15:14 2023/4/11
     * @Param [RegionFreight]
     * @Return void
     */
    void updateRegionFreight(GoodsRegionFreight regionFreight);

    /**
     * @Author Sum1Dream
     * @Name getRegionFreightList
     * @Description // 查询列表
     * @Date 15:17 2023/4/11
     * @Param [map]
     * @Return java.util.List<com.hai.entity.GoodsDetail>
     */
    List<GoodsRegionFreight> getRegionFreightList(Map<String , Object> map);

    /**
     * @Author Sum1Dream
     * @Name findGoodsDetailById
     * @Description // 查询详情
     * @Date 16:19 2023/4/11
     * @Param [id]
     * @Return com.hai.entity.GoodsDetail
     */
    GoodsRegionFreight findRegionFreightById(Long id);

    /**
     * @Author Sum1Dream
     * @Name findRegionFreightByRegionId
     * @Description // 获取区域运费根据区域编码
     * @Date 19:08 2023/4/14
     * @Param [regionId]
     * @Return com.hai.entity.GoodsRegionFreight
     */
    GoodsRegionFreight findRegionFreightByRegionId(String regionId);

    /**
     * @Author Sum1Dream
     * @Name DeleteRegionFreight
     * @Description // 删除
     * @Date 15:09 2023/4/13
     * @Param [id]
     * @Return void
     */
    void deleteRegionFreight(Long id);

    /**
     * @Author Sum1Dream
     * @Name getRegionFreight
     * @Description // 获取运费
     * @Date 19:03 2023/4/14
     * @Param [regionId]
     * @Return java.math.BigDecimal
     */
    JSONObject getRegionFreight(String regionId) throws Exception;

}
