Commit 79dcf745 by ping.wu

优化建议

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