MrShi
8 小时以前 e50954f0708ecbbc672352102ae3b24279d40cc1
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
package com.doumee.service.business;
 
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.PricingRule;
import com.doumee.dao.dto.LocalStoragePricingSaveDTO;
import com.doumee.dao.dto.RemoteDeliveryPricingSaveDTO;
import com.doumee.dao.dto.EstimatedDeliverySaveDTO;
import com.doumee.dao.dto.StoreDepositSaveDTO;
import com.doumee.dao.dto.RevenueShareSaveDTO;
import com.doumee.dao.vo.LocalStoragePricingVO;
import com.doumee.dao.vo.RemoteDeliveryPricingVO;
import com.doumee.dao.vo.EstimatedDeliveryVO;
import com.doumee.dao.vo.StoreDepositVO;
import com.doumee.dao.vo.RevenueShareVO;
 
import java.math.BigDecimal;
import java.util.List;
 
/**
 * 计价规则配置Service定义
 * @author rk
 * @date 2026/04/08
 */
public interface PricingRuleService {
 
    /**
     * 创建
     *
     * @param pricingRule 实体对象
     * @return Integer
     */
    Integer create(PricingRule pricingRule);
 
    /**
     * 主键删除
     *
     * @param id 主键
     */
    void deleteById(Integer id);
 
    /**
     * 删除
     *
     * @param pricingRule 实体对象
     */
    void delete(PricingRule pricingRule);
 
    /**
     * 批量主键删除
     *
     * @param ids 主键集
     */
    void deleteByIdInBatch(List<Integer> ids);
 
    /**
     * 主键更新
     *
     * @param pricingRule 实体对象
     */
    void updateById(PricingRule pricingRule);
 
    /**
     * 批量主键更新
     *
     * @param pricingRules 实体集
     */
    void updateByIdInBatch(List<PricingRule> pricingRules);
 
    /**
     * 主键查询
     *
     * @param id 主键
     * @return PricingRule
     */
    PricingRule findById(Integer id);
 
    /**
     * 条件查询单条记录
     *
     * @param pricingRule 实体对象
     * @return PricingRule
     */
    PricingRule findOne(PricingRule pricingRule);
 
    /**
     * 条件查询
     *
     * @param pricingRule 实体对象
     * @return List<PricingRule>
     */
    List<PricingRule> findList(PricingRule pricingRule);
 
    /**
     * 分页查询
     *
     * @param pageWrap 分页对象
     * @return PageData<PricingRule>
     */
    PageData<PricingRule> findPage(PageWrap<PricingRule> pageWrap);
 
    /**
     * 条件统计
     *
     * @param pricingRule 实体对象
     * @return long
     */
    long count(PricingRule pricingRule);
 
    /**
     * 批量保存就地存取规则
     * @param request 批量保存请求
     */
    void batchSaveLocalStoragePricing(LocalStoragePricingSaveDTO request);
 
    /**
     * 查询就地存取规则列表
     * @param cityId 城市主键
     * @return 就地存取规则列表
     */
    List<LocalStoragePricingVO> listLocalStoragePricing(Integer cityId);
 
    /**
     * 批量保存异地寄送规则
     * @param request 批量保存请求
     */
    void batchSaveRemoteDeliveryPricing(RemoteDeliveryPricingSaveDTO request);
 
    /**
     * 查询异地寄送规则列表
     * @param cityId 城市主键
     * @return 异地寄送规则列表
     */
    List<RemoteDeliveryPricingVO> listRemoteDeliveryPricing(Integer cityId);
 
    /**
     * 保存预计时效配置(标速达fieldA=1 + 极速达fieldA=2,有则更新无则新增)
     * @param request 保存请求
     */
    void saveEstimatedDelivery(EstimatedDeliverySaveDTO request);
 
    /**
     * 查询预计时效配置列表(标速达fieldA=1 + 极速达fieldA=2)
     * @param cityId 城市主键
     * @return 预计时效配置列表
     */
    List<EstimatedDeliveryVO> getEstimatedDelivery(Integer cityId);
 
    /**
     * 根据城市、类型、距离计算预计时效时长
     * @param cityId 城市主键
     * @param fieldA 类型:1=标速达;2=极速达
     * @param distance 距离(公里)
     * @return 预计时长(小时),未找到配置返回null
     */
    BigDecimal calculateEstimatedTime(Integer cityId, Integer fieldA, BigDecimal distance);
 
    /**
     * 批量保存门店注册押金
     * @param request 批量保存请求
     */
    void batchSaveStoreDeposit(StoreDepositSaveDTO request);
 
    /**
     * 查询门店注册押金列表(固定返回2条)
     * @param cityId 城市主键
     * @return 门店注册押金列表
     */
    List<StoreDepositVO> listStoreDeposit(Integer cityId);
 
    /**
     * 批量保存分成比例
     * @param request 批量保存请求
     */
    void batchSaveRevenueShare(RevenueShareSaveDTO request);
 
    /**
     * 查询分成比例列表(固定返回5条)
     * @param cityId 城市主键
     * @return 分成比例列表
     */
    List<RevenueShareVO> listRevenueShare(Integer cityId);
 
}