zhanghua
2025-06-11 2ca169c85f61256fb5185c078dba1bfef2be5066
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package cn.lili.modules.store.service;
 
import cn.lili.common.vo.PageVO;
import cn.lili.modules.store.entity.dos.FreightTemplate;
import cn.lili.modules.store.entity.vos.FreightTemplateVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
 
import java.util.List;
 
/**
 * 店铺地址(自提点)详细业务层
 *
 * @author Bulbasaur
 * @since 2020-03-07 09:24:33
 */
@CacheConfig(cacheNames = "{freightTemplate}")
public interface FreightTemplateService extends IService<FreightTemplate> {
 
    /**
     * 获取当前商家的运费模板列表
     *
     * @param pageVO 分页
     * @return 运费模板列表
     */
    IPage<FreightTemplate> getFreightTemplate(PageVO pageVO);
 
    /**
     * 获取商家的运费模板
     *
     * @param storeId
     * @return 运费模板列表
     */
    List<FreightTemplateVO> getFreightTemplateList(String storeId);
 
    /**
     * 获取运费模板详细信息
     *
     * @param id 运费模板ID
     * @return 运费模板
     */
    @Cacheable(key = "#id")
    FreightTemplateVO getFreightTemplate(String id);
 
    /**
     * 添加商家运费模板
     * 运费模板分为卖家包邮、运费计算两种类型
     *
     * @param freightTemplateVO 运费模板
     * @return 运费模板
     */
    FreightTemplateVO addFreightTemplate(FreightTemplateVO freightTemplateVO);
 
    /**
     * 修改商家运费模板
     *
     * @param freightTemplateVO 运费模板
     * @return 运费模板
     */
    @CacheEvict(key = "#freightTemplateVO.id")
    FreightTemplateVO editFreightTemplate(FreightTemplateVO freightTemplateVO);
 
    /**
     * 删除商家运费模板
     * 删除模板并删除模板的配置内容
     *
     * @param id 运费模板ID
     * @return 操作状态
     */
    @CacheEvict(key = "#id")
    boolean removeFreightTemplate(String id);
 
}