Commit 79dcf745 by ping.wu

优化建议

parent 0c99d23b
...@@ -188,7 +188,8 @@ public class OrderAdapter { ...@@ -188,7 +188,8 @@ public class OrderAdapter {
boolean isUseFreightCoupon = false; boolean isUseFreightCoupon = false;
List<ActivityDiscountsDto> activityDiscountsDtos = shoppingCartGoodsDto.getActivityDiscountsDtos(); List<ActivityDiscountsDto> activityDiscountsDtos = shoppingCartGoodsDto.getActivityDiscountsDtos();
if (CollectionUtils.isNotEmpty(activityDiscountsDtos)) { if (CollectionUtils.isNotEmpty(activityDiscountsDtos)) {
ActivityDiscountsDto activityDiscountsDto = activityDiscountsDtos.stream().filter(a -> a.getActivityType() != null && a.getActivityType().equals(ActivityTypeEnum.TYPE_34.getCode())).findFirst().orElse(null); ActivityDiscountsDto activityDiscountsDto = activityDiscountsDtos.stream().filter(a -> a.getActivityType() != null
&& a.getActivityType().equals(ActivityTypeEnum.TYPE_34.getCode())).findFirst().orElse(null);
if (activityDiscountsDto != null) { if (activityDiscountsDto != null) {
isUseFreightCoupon = true; isUseFreightCoupon = true;
} }
......
...@@ -288,6 +288,7 @@ public class CheckOrder { ...@@ -288,6 +288,7 @@ public class CheckOrder {
//获取门店配送信息 //获取门店配送信息
StoreDeliveryInfoDto storeDeliveryInfoDto = null; StoreDeliveryInfoDto storeDeliveryInfoDto = null;
if (storeDeliveryUseOld) { if (storeDeliveryUseOld) {
//todo storeDeliveryUseOld 配置删除,老逻辑删除
storeDeliveryInfoDto = getStoreDeliveryInfo(storeResponseDto, config, appId); storeDeliveryInfoDto = getStoreDeliveryInfo(storeResponseDto, config, appId);
} else { } else {
storeDeliveryInfoDto = getNewStoreDeliveryInfo(storeResponseDto, config, appId, trackingNo); storeDeliveryInfoDto = getNewStoreDeliveryInfo(storeResponseDto, config, appId, trackingNo);
...@@ -821,6 +822,7 @@ public class CheckOrder { ...@@ -821,6 +822,7 @@ public class CheckOrder {
storeDeliveryInfoDto.setDeliveryRadius(0); storeDeliveryInfoDto.setDeliveryRadius(0);
} }
// 只有小程序设置了外卖,并且开通了第三方配送账户,才是第三方配送单 // 只有小程序设置了外卖,并且开通了第三方配送账户,才是第三方配送单
//todo 判断多余
if (openPlatformIappWxappConfig == null) { if (openPlatformIappWxappConfig == null) {
openPlatformIappWxappConfig = openPlatformIappWxappConfigManager.selectIappWxappConfigByWxAppId(wxAppid); openPlatformIappWxappConfig = openPlatformIappWxappConfigManager.selectIappWxappConfigByWxAppId(wxAppid);
} }
...@@ -931,6 +933,7 @@ public class CheckOrder { ...@@ -931,6 +933,7 @@ public class CheckOrder {
* @param storeCode 门店号 * @param storeCode 门店号
* @return * @return
*/ */
//todo 预计送达时间购物车接口返回,免去多调用一次接口
private Date getEstimateDeliveryCompleteTime(String userLat, private Date getEstimateDeliveryCompleteTime(String userLat,
String userLong, String userLong,
String partnerId, String partnerId,
......
...@@ -2956,6 +2956,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -2956,6 +2956,7 @@ public class OrderServiceImpl implements Orderservice {
orderExtInfoDto.setDeliveryHoursDayStart(deliveryHoursDayStart); orderExtInfoDto.setDeliveryHoursDayStart(deliveryHoursDayStart);
orderExtInfoDto.setDeliveryHoursDayEnd(deliveryHoursDayEnd); orderExtInfoDto.setDeliveryHoursDayEnd(deliveryHoursDayEnd);
orderExtInfoDto.setOpenid(userLoginInfoDto.getOpenId()); orderExtInfoDto.setOpenid(userLoginInfoDto.getOpenId());
//todo 字段多余,订单对象已有该字段
orderExtInfoDto.setAppid(userLoginInfoDto.getWxAppId()); orderExtInfoDto.setAppid(userLoginInfoDto.getWxAppId());
orderExtInfoDto.setSessionId(sessionId); orderExtInfoDto.setSessionId(sessionId);
if (Objects.equals(serviceTime, null)) { if (Objects.equals(serviceTime, null)) {
...@@ -2970,6 +2971,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -2970,6 +2971,7 @@ public class OrderServiceImpl implements Orderservice {
// 扩展字段中存储 sessionKey // 扩展字段中存储 sessionKey
orderExtInfoDto.setSessionKey(createOrderVo.getSessionKey()); orderExtInfoDto.setSessionKey(createOrderVo.getSessionKey());
orderExtInfoDto.setFormId(createOrderVo.getFormId()); orderExtInfoDto.setFormId(createOrderVo.getFormId());
//todo 多余字段
orderExtInfoDto.setFromAppId(userLoginInfoDto.getWxAppId()); orderExtInfoDto.setFromAppId(userLoginInfoDto.getWxAppId());
if (StringUtils.isNotBlank(createOrderVo.getScene())) { if (StringUtils.isNotBlank(createOrderVo.getScene())) {
orderExtInfoDto.setScene(createOrderVo.getScene()); orderExtInfoDto.setScene(createOrderVo.getScene());
......
...@@ -83,6 +83,7 @@ public class StoreServiceImpl implements StoreService { ...@@ -83,6 +83,7 @@ public class StoreServiceImpl implements StoreService {
* @param userLatitude 用户配送地址维度 * @param userLatitude 用户配送地址维度
* @return * @return
*/ */
// TODO: 21-7-22 可去掉
public UserDeliveryInfoDto getUserDeliveryInfo(StoreDeliveryInfoDto storeDeliveryInfoDto, String userLongitude, String userLatitude) { public UserDeliveryInfoDto getUserDeliveryInfo(StoreDeliveryInfoDto storeDeliveryInfoDto, String userLongitude, String userLatitude) {
UserDeliveryInfoDto userDeliveryInfoDto = UserDeliveryInfoDto.builder() UserDeliveryInfoDto userDeliveryInfoDto = UserDeliveryInfoDto.builder()
.userLongitude(userLongitude) .userLongitude(userLongitude)
...@@ -105,6 +106,7 @@ public class StoreServiceImpl implements StoreService { ...@@ -105,6 +106,7 @@ public class StoreServiceImpl implements StoreService {
* @param userLatitude 用户维度 * @param userLatitude 用户维度
* @return * @return
*/ */
//todo 可去掉
public boolean checkUserEnableDelivery(StoreDeliveryInfoDto storeDeliveryInfoDto, String userLongitude, String userLatitude) { public boolean checkUserEnableDelivery(StoreDeliveryInfoDto storeDeliveryInfoDto, String userLongitude, String userLatitude) {
if (!storeDeliveryInfoDto.getEnableTakeaway()) { if (!storeDeliveryInfoDto.getEnableTakeaway()) {
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment