Commit e5b37925 by yu.sun

sunyu::update::fix bug about store info check toast msg

parent d0f1aa9e
......@@ -60,6 +60,9 @@ public enum ResponseResult {
STORE_NOT_ENABLE_COLLECT_GOODS("43011", "门店不支持到店"),
STORE_MALL_NOT_FOUND("43012", "商城门店不存在"),
STORE_DELIVERY_AMOUNT_ERROR("43013", "配送费错误"),
//麦咖啡专用提示
CART_STORE_CLOSE("43014","您选择的【$storeName】门店已关闭,请选择其他门店。"),
CART_STORE_REST("43015","您选择的【$storeName】门店已打烊,请选择其他门店。"),
/**
* 购物车状态码
......
......@@ -629,7 +629,9 @@ public class ShoppingCartMCoffeeServiceImpl {
}
BaseResponse storeCheckResponse = checkOrderByStore(orderInfo.getResult().getPartnerId(), storeId, LogThreadLocal.getTrackingNo());
if(!ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(storeCheckResponse.getCode())) {
return storeCheckResponse;
shoppingCartGoodsResponseVo.setChanged(true);
shoppingCartGoodsResponseVo.setToastMsg(storeCheckResponse.getMessage());
// return storeCheckResponse;
}
List<CartGoods> cartGoodsList = getOrderGoods(orderInfo.getResult());
......@@ -665,13 +667,18 @@ public class ShoppingCartMCoffeeServiceImpl {
return ResponseUtil.error(ResponseResult.STORE_NOT_FOUND);
}
StoreResponse.BizVO storeResponseDto = storeResponse.getBizVO();
String storeName = storeResponseDto.getStoreName();
// 校验门店是否营业
if (storeResponseDto.getActiveFlag() == null || storeResponseDto.getActiveFlag() != 1
|| storeResponseDto.getState() == null || storeResponseDto.getState().equals("3")) {
return ResponseUtil.error(ResponseResult.STORE_ITEM_STOP_BUSINESS);
ResponseResult storeClose = ResponseResult.CART_STORE_CLOSE;
storeClose.getMessage().replace("$storeName",storeName);
return ResponseUtil.error(storeClose);
}
if (storeResponseDto.getActiveFlag() == 1 && storeResponseDto.getState().equals("2")) {
return ResponseUtil.error(ResponseResult.STORE_ITEM_CHECK_CLOSE);
ResponseResult storeRest = ResponseResult.CART_STORE_REST;
storeRest.getMessage().replace("$storeName",storeName);
return ResponseUtil.error(ResponseResult.CART_STORE_REST);
}
return ResponseUtil.success();
}
......
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