|
@@ -180,7 +180,7 @@ public class ProductService {
|
|
|
*/
|
|
|
public Map<String, Object> computePostage(Integer userId, Integer townId, List<String> productIdList) {
|
|
|
// 返回数据初始化
|
|
|
- Map<String, Object> postageMap = new HashMap<>(2);
|
|
|
+ Map<String, Object> postageMap = new HashMap<>(3);
|
|
|
// 运费标志:0包邮 -1到付 1遵循运费规则
|
|
|
int postageFlag = 0;
|
|
|
// 运费
|
|
@@ -188,6 +188,14 @@ public class ProductService {
|
|
|
// 可用采美豆
|
|
|
Integer userBeans = baseMapper.getUserBeans(userId);
|
|
|
postageMap.put("userBeans", userBeans);
|
|
|
+ // 超级会员标识
|
|
|
+ Integer superVipUserId = baseMapper.getSvipUserIdByUserId(userId);
|
|
|
+ if (null != superVipUserId) {
|
|
|
+ // 超级VIP包邮
|
|
|
+ postageMap.put("postageFlag", 0);
|
|
|
+ postageMap.put("postage", 0.00d);
|
|
|
+ return postageMap;
|
|
|
+ }
|
|
|
// 获取商品运费 (商品数据库 0包邮 1到付 2默认(遵循运费规则))
|
|
|
List<ProductPostageVo> postageFlagList = baseMapper.getPostageFlagList(productIdList);
|
|
|
if (null != postageFlagList && postageFlagList.size() > 0) {
|