送货地址bug修复
This commit is contained in:
parent
978a4beb24
commit
eb6bec7e04
@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.suisung.mall.common.api.CommonResult;
|
import com.suisung.mall.common.api.CommonResult;
|
||||||
import com.suisung.mall.common.api.ResultCode;
|
import com.suisung.mall.common.api.ResultCode;
|
||||||
import com.suisung.mall.common.api.StateCode;
|
import com.suisung.mall.common.api.StateCode;
|
||||||
|
import com.suisung.mall.common.constant.CommonConstant;
|
||||||
import com.suisung.mall.common.domain.UserDto;
|
import com.suisung.mall.common.domain.UserDto;
|
||||||
import com.suisung.mall.common.exception.ApiException;
|
import com.suisung.mall.common.exception.ApiException;
|
||||||
import com.suisung.mall.common.exception.ApiUserException;
|
import com.suisung.mall.common.exception.ApiUserException;
|
||||||
@ -536,6 +537,14 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
Integer is_delivery = getParameter("is_delivery", 1);
|
Integer is_delivery = getParameter("is_delivery", 1);
|
||||||
Integer if_virtual = getParameter("if_virtual", 1);
|
Integer if_virtual = getParameter("if_virtual", 1);
|
||||||
String code = getParameter("code");
|
String code = getParameter("code");
|
||||||
|
|
||||||
|
// 配送方式:5-上门自提; 10-普通快递; 16-同城配送;
|
||||||
|
Integer delivery_type_id = getParameter("delivery_type_id", Integer.class);
|
||||||
|
if (delivery_type_id == null || delivery_type_id <= 0) {
|
||||||
|
// 默认同城配送
|
||||||
|
delivery_type_id = StateCode.DELIVERY_TYPE_SAME_CITY;
|
||||||
|
}
|
||||||
|
|
||||||
if_chain = chain_id != null && chain_id != 0;
|
if_chain = chain_id != null && chain_id != 0;
|
||||||
Long product_id = null;
|
Long product_id = null;
|
||||||
|
|
||||||
@ -547,7 +556,6 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
activity_rows = shopStoreActivityBaseService.getActivityFormatOne(activity_id, quantity);
|
activity_rows = shopStoreActivityBaseService.getActivityFormatOne(activity_id, quantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (StrUtil.isBlank(cart_id) || (ifcart != null && ifcart != 0)) {
|
if (StrUtil.isBlank(cart_id) || (ifcart != null && ifcart != 0)) {
|
||||||
// 从购物车进来
|
// 从购物车进来
|
||||||
QueryWrapper<ShopUserCart> cartQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopUserCart> cartQueryWrapper = new QueryWrapper<>();
|
||||||
@ -726,7 +734,7 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 收货人收货地址
|
// 选中一个收货人的收货地址
|
||||||
deliveryAddressService.fixAddressData(address_row);
|
deliveryAddressService.fixAddressData(address_row);
|
||||||
if (CollUtil.isNotEmpty(address_row)) {
|
if (CollUtil.isNotEmpty(address_row)) {
|
||||||
Optional<Map> defaultOpl = address_row.stream().filter(s -> Convert.toBool(s.get("ud_is_default"), false)).findFirst();
|
Optional<Map> defaultOpl = address_row.stream().filter(s -> Convert.toBool(s.get("ud_is_default"), false)).findFirst();
|
||||||
@ -737,6 +745,7 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 城市id
|
||||||
Integer district_id = Convert.toInt(delivery_address_row.get("ud_city_id"));
|
Integer district_id = Convert.toInt(delivery_address_row.get("ud_city_id"));
|
||||||
if (CollUtil.isNotEmpty(delivery_address_row) && CheckUtil.isNotEmpty(district_id)) {
|
if (CollUtil.isNotEmpty(delivery_address_row) && CheckUtil.isNotEmpty(district_id)) {
|
||||||
// 计算邮费情况
|
// 计算邮费情况
|
||||||
@ -1032,7 +1041,6 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// 赠品只能选一个SKU
|
// 赠品只能选一个SKU
|
||||||
|
|
||||||
if (Objects.equals(cart_type, CART_TYPE_GIFT)) {
|
if (Objects.equals(cart_type, CART_TYPE_GIFT)) {
|
||||||
cart.setItem_id(item_id);
|
cart.setItem_id(item_id);
|
||||||
if (CheckUtil.isNotEmpty(cart_quantity)) {
|
if (CheckUtil.isNotEmpty(cart_quantity)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user