Commit 3adc44bf by dingkai

商城统一saasmall

parent c8cc1b85
...@@ -369,8 +369,8 @@ public class OrderSdkAdapter { ...@@ -369,8 +369,8 @@ public class OrderSdkAdapter {
if ("meals".equals(queryOrdersRequest.getSource()[i])) { if ("meals".equals(queryOrdersRequest.getSource()[i])) {
orderClients.add(OrderClientType.WAI_MEAL.getIndex()); orderClients.add(OrderClientType.WAI_MEAL.getIndex());
} }
if ("mall".equals(queryOrdersRequest.getSource()[i])) { if ("saasmall".equals(queryOrdersRequest.getSource()[i])) {
orderClients.add(OrderClientType.MALL.getIndex()); orderClients.add(OrderClientType.SAASMALL.getIndex());
} }
} }
orderConditionsReq.setOrderClients(orderClients); orderConditionsReq.setOrderClients(orderClients);
...@@ -1136,7 +1136,7 @@ public class OrderSdkAdapter { ...@@ -1136,7 +1136,7 @@ public class OrderSdkAdapter {
case "meal": case "meal":
orderClientType = 19; orderClientType = 19;
break; break;
case "mall": case "saasmall":
orderClientType = 23; orderClientType = 23;
break; break;
default: default:
...@@ -1177,7 +1177,7 @@ public class OrderSdkAdapter { ...@@ -1177,7 +1177,7 @@ public class OrderSdkAdapter {
name = "meals"; name = "meals";
break; break;
case 23: case 23:
name = "mall"; name = "saasmall";
break; break;
default: default:
name = orderClientType.toString(); name = orderClientType.toString();
...@@ -2612,6 +2612,7 @@ public class OrderSdkAdapter { ...@@ -2612,6 +2612,7 @@ public class OrderSdkAdapter {
/** /**
* 计算所有商品的重量 单位g * 计算所有商品的重量 单位g
* 称重菜的重量单位是斤
*/ */
private Double sumOrderWeight(List<CreateOrderProductRequest> products) { private Double sumOrderWeight(List<CreateOrderProductRequest> products) {
Double totalWeight = 0D; Double totalWeight = 0D;
...@@ -2621,11 +2622,22 @@ public class OrderSdkAdapter { ...@@ -2621,11 +2622,22 @@ public class OrderSdkAdapter {
for (CreateOrderProductRequest productRequest : products) { for (CreateOrderProductRequest productRequest : products) {
if (ObjectUtils.equals(ProductTypeEnum.SETMEAL_PRODUCT.getCode(), productRequest.getProductType()) || ObjectUtils.equals(ProductTypeEnum.SETMEAL_UPPRICE_PRODUCT.getCode(), productRequest.getProductType())) { if (ObjectUtils.equals(ProductTypeEnum.SETMEAL_PRODUCT.getCode(), productRequest.getProductType()) || ObjectUtils.equals(ProductTypeEnum.SETMEAL_UPPRICE_PRODUCT.getCode(), productRequest.getProductType())) {
if (CollectionUtils.isNotEmpty(productRequest.getComboProduct())) { if (CollectionUtils.isNotEmpty(productRequest.getComboProduct())) {
productRequest.getComboProduct().stream().map(t -> {
Double productWeight = t.getWeight() == null ? 0D : t.getWeight();
if (ProductTypeEnum.WEIGHT_PRODUCT.getCode().equals(t.getProductType())) {
productWeight = productWeight * 500;
}
return productWeight;
}).reduce(0D, Double::sum);
Double comboProductTotalWeight = productRequest.getComboProduct().stream().map(t -> t.getWeight() == null ? 0D : t.getWeight()).reduce(0D, Double::sum); Double comboProductTotalWeight = productRequest.getComboProduct().stream().map(t -> t.getWeight() == null ? 0D : t.getWeight()).reduce(0D, Double::sum);
totalWeight += comboProductTotalWeight; totalWeight += comboProductTotalWeight;
} }
} else { } else {
Double productWeight = productRequest.getWeight() == null ? 0D : productRequest.getWeight(); Double productWeight = productRequest.getWeight() == null ? 0D : productRequest.getWeight();
if (ProductTypeEnum.WEIGHT_PRODUCT.getCode().equals(productRequest.getProductType())) {
productWeight = productWeight * 500;
}
totalWeight += productWeight; totalWeight += productWeight;
} }
} }
......
...@@ -32,7 +32,10 @@ public enum OrderSourceType { ...@@ -32,7 +32,10 @@ public enum OrderSourceType {
POS("pos_order", "线下 POS"), POS("pos_order", "线下 POS"),
MEAL("meal", "i围餐"); MEAL("meal", "i围餐"),
SAASMALL("saasmall", "微商城"),
;
private String code; private String code;
......
...@@ -61,12 +61,12 @@ public class RedisKeyConstant { ...@@ -61,12 +61,12 @@ public class RedisKeyConstant {
/** /**
* 用户购物车在redis的key前缀(商城购物车) * 用户购物车在redis的key前缀(商城购物车)
*/ */
public final static String SAAS_MALL_SHOPPINGCART_KEY_PREFIX = "saas:user:info:mall:cart:goods:"; public final static String SAAS_MALL_SHOPPINGCART_KEY_PREFIX = "saas:user:info:saasmall:cart:goods:";
/** /**
* 用户购物车总价在redis的key前缀(商城购物车) * 用户购物车总价在redis的key前缀(商城购物车)
*/ */
public final static String SAAS_MALL_SHOPPINGCART_AMOUNT_PREFIX = "saas:user:info:mall:cart:amount:goods:"; public final static String SAAS_MALL_SHOPPINGCART_AMOUNT_PREFIX = "saas:user:info:saasmall:cart:amount:goods:";
/** /**
* 点餐门店绑定的商城门店redis的key前缀 * 点餐门店绑定的商城门店redis的key前缀
......
...@@ -128,9 +128,9 @@ public class MallOrderAdapter { ...@@ -128,9 +128,9 @@ public class MallOrderAdapter {
createOrderDto.setLongitude(userDeliveryInfoDto.getUserLongitude()); createOrderDto.setLongitude(userDeliveryInfoDto.getUserLongitude());
createOrderDto.setOrderType(QueryOrderType.TAKE_OUT); createOrderDto.setOrderType(QueryOrderType.TAKE_OUT);
createOrderDto.setPayType(QueryPayType.ONLINE_PAY); createOrderDto.setPayType(QueryPayType.ONLINE_PAY);
createOrderDto.setSource(OrderSourceType.MALL.getCode()); createOrderDto.setSource(OrderSourceType.SAASMALL.getCode());
createOrderDto.setSourceName(OrderSourceType.MALL.getDesc()); createOrderDto.setSourceName(OrderSourceType.SAASMALL.getDesc());
createOrderDto.setOrderClientType(OrderClientType.MALL); createOrderDto.setOrderClientType(OrderClientType.SAASMALL);
createOrderDto.setRemark(remark); createOrderDto.setRemark(remark);
createOrderDto.setGmtExpect(null); createOrderDto.setGmtExpect(null);
BaseCreateOrderRequest.DeliveryTypeInfo deliveryTypeInfo = new BaseCreateOrderRequest.DeliveryTypeInfo(); BaseCreateOrderRequest.DeliveryTypeInfo deliveryTypeInfo = new BaseCreateOrderRequest.DeliveryTypeInfo();
......
...@@ -16,7 +16,6 @@ import cn.freemud.base.log.LogTreadLocal; ...@@ -16,7 +16,6 @@ import cn.freemud.base.log.LogTreadLocal;
import cn.freemud.base.util.DateUtil; import cn.freemud.base.util.DateUtil;
import cn.freemud.constant.CustomerScoreConstant; import cn.freemud.constant.CustomerScoreConstant;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import cn.freemud.entities.dto.QueryOrdersResponseDto.DataBean.OrderBean.ProductBean;
import cn.freemud.entities.dto.activity.ShareDiscountActivityDto; import cn.freemud.entities.dto.activity.ShareDiscountActivityDto;
import cn.freemud.entities.dto.order.*; import cn.freemud.entities.dto.order.*;
import cn.freemud.entities.dto.order.CreateOrderAccountDto; import cn.freemud.entities.dto.order.CreateOrderAccountDto;
...@@ -749,8 +748,8 @@ public class OrderAdapter { ...@@ -749,8 +748,8 @@ public class OrderAdapter {
if(OrderChannelType.IWC.getCode().equals(channelType)) { if(OrderChannelType.IWC.getCode().equals(channelType)) {
queryOrdersDto.setSource(new String[]{"meals"}); queryOrdersDto.setSource(new String[]{"meals"});
} else if(OrderChannelType.MALL.getCode().equals(channelType)) { } else if(OrderChannelType.SAASMALL.getCode().equals(channelType)) {
queryOrdersDto.setSource(new String[]{"mall"}); queryOrdersDto.setSource(new String[]{"saasmall"});
} else { } else {
queryOrdersDto.setSource(new String[]{"saas"}); queryOrdersDto.setSource(new String[]{"saas"});
} }
...@@ -790,7 +789,7 @@ public class OrderAdapter { ...@@ -790,7 +789,7 @@ public class OrderAdapter {
queryOrdersDto.setStatus(statuses); queryOrdersDto.setStatus(statuses);
} }
if (OrderChannelType.MALL.getCode().equals(channelType)) { if (OrderChannelType.SAASMALL.getCode().equals(channelType)) {
Integer[] statuses = new Integer[]{OrderStatus.COMPLETE.getCode(), OrderStatus.CALCEL.getCode()}; Integer[] statuses = new Integer[]{OrderStatus.COMPLETE.getCode(), OrderStatus.CALCEL.getCode()};
queryOrdersDto.setStatus(statuses); queryOrdersDto.setStatus(statuses);
queryOrdersDto.setType(new Integer[]{}); queryOrdersDto.setType(new Integer[]{});
......
...@@ -55,7 +55,7 @@ public class QueryOrderVo { ...@@ -55,7 +55,7 @@ public class QueryOrderVo {
private String endDate; private String endDate;
/** /**
* 渠道信息 1:saas 2:img 3:iwc;4:mall * 渠道信息 saas; img; iwc; saasmall
*/ */
private String channelType; private String channelType;
......
...@@ -20,7 +20,7 @@ public enum OrderChannelType { ...@@ -20,7 +20,7 @@ public enum OrderChannelType {
IWC("iwc","i围餐"), IWC("iwc","i围餐"),
MALL("mall", "商城"); SAASMALL("saasmall", "微商城");
private String code; private String code;
......
...@@ -28,7 +28,10 @@ public enum OrderSourceType { ...@@ -28,7 +28,10 @@ public enum OrderSourceType {
MALL("mall", "非码Mall"), MALL("mall", "非码Mall"),
SAAS("saas", "saas 点餐"); SAAS("saas", "saas 点餐"),
SAASMALL("saasmall", "微商城"),
;
private String code; private String code;
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
package cn.freemud.service.impl; package cn.freemud.service.impl;
import cn.freemud.constant.ResponseCodeConstant; import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.entities.db.OpenPlatformIappWxappConfig;
import cn.freemud.entities.db.OpenPlatformPartnerStoreDeliveryConfig;
import cn.freemud.entities.dto.StoreDeliveryInfoDto; import cn.freemud.entities.dto.StoreDeliveryInfoDto;
import cn.freemud.entities.dto.UserDeliveryInfoDto; import cn.freemud.entities.dto.UserDeliveryInfoDto;
import cn.freemud.entities.dto.UserLoginInfoDto; import cn.freemud.entities.dto.UserLoginInfoDto;
...@@ -28,15 +26,8 @@ import cn.freemud.enums.CouponFlag; ...@@ -28,15 +26,8 @@ import cn.freemud.enums.CouponFlag;
import cn.freemud.enums.OrderChannelType; import cn.freemud.enums.OrderChannelType;
import cn.freemud.enums.ResponseResult; import cn.freemud.enums.ResponseResult;
import cn.freemud.interceptor.ServiceException; import cn.freemud.interceptor.ServiceException;
import cn.freemud.service.ThirdDeliveryService;
import cn.freemud.service.delivery.ThirdDeliveryServiceImpl; import cn.freemud.service.delivery.ThirdDeliveryServiceImpl;
import cn.freemud.service.thirdparty.ShoppingCartClient; import cn.freemud.service.thirdparty.ShoppingCartClient;
import com.alibaba.fastjson.JSONObject;
import com.freemud.application.sdk.api.base.BaseResponse;
import com.freemud.application.sdk.api.log.LogThreadLocal;
import com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest;
import com.freemud.application.sdk.api.membercenter.response.QueryReceiveAddressResponse;
import com.freemud.application.sdk.api.membercenter.service.MemberCenterService;
import com.freemud.application.sdk.api.storecenter.response.StoreResponse; import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.ObjectUtils;
...@@ -98,7 +89,7 @@ public class CheckMallOrder { ...@@ -98,7 +89,7 @@ public class CheckMallOrder {
.reachStoreType(createOrderVo.getReachStoreType()) .reachStoreType(createOrderVo.getReachStoreType())
.flag(CouponFlag.NO.getCode()) .flag(CouponFlag.NO.getCode())
.useCustomerScore(createOrderVo.getUseCustomerScore()) .useCustomerScore(createOrderVo.getUseCustomerScore())
.channelType(OrderChannelType.MALL.getCode()) .channelType(OrderChannelType.SAASMALL.getCode())
.build(); .build();
// 通过购物车获取优惠信息 // 通过购物车获取优惠信息
GetShoppingCartGoodsApportionDto requestDto = new GetShoppingCartGoodsApportionDto(); GetShoppingCartGoodsApportionDto requestDto = new GetShoppingCartGoodsApportionDto();
......
...@@ -41,12 +41,10 @@ import com.freemud.application.sdk.api.deliverycenter.service.DeliveryService; ...@@ -41,12 +41,10 @@ import com.freemud.application.sdk.api.deliverycenter.service.DeliveryService;
import com.freemud.application.sdk.api.log.ErrorLog; import com.freemud.application.sdk.api.log.ErrorLog;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import com.freemud.application.sdk.api.ordercenter.enums.AfterSalesType; import com.freemud.application.sdk.api.ordercenter.enums.AfterSalesType;
import com.freemud.application.sdk.api.ordercenter.enums.OrderType;
import com.freemud.application.sdk.api.ordercenter.request.OrderExtendedReq; import com.freemud.application.sdk.api.ordercenter.request.OrderExtendedReq;
import com.freemud.application.sdk.api.ordercenter.request.POSOrderOperationBaseReq; import com.freemud.application.sdk.api.ordercenter.request.POSOrderOperationBaseReq;
import com.freemud.application.sdk.api.ordercenter.service.OrderSdkService; import com.freemud.application.sdk.api.ordercenter.service.OrderSdkService;
import com.freemud.application.sdk.api.storecenter.response.StoreResponse; import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
import com.freemud.application.sdk.api.structure.request.PushMessageNoticeDto;
import com.freemud.sdk.api.assortment.order.entities.OrderExtInfoDTO; import com.freemud.sdk.api.assortment.order.entities.OrderExtInfoDTO;
import com.freemud.sdk.api.assortment.order.request.order.*; import com.freemud.sdk.api.assortment.order.request.order.*;
import com.freemud.sdk.api.assortment.order.response.order.*; import com.freemud.sdk.api.assortment.order.response.order.*;
...@@ -167,7 +165,7 @@ public class MallOrderServiceImpl implements MallOrderService { ...@@ -167,7 +165,7 @@ public class MallOrderServiceImpl implements MallOrderService {
return ResponseUtil.error(ResponseResult.ORDER_HAS_CANCELED); return ResponseUtil.error(ResponseResult.ORDER_HAS_CANCELED);
} }
//非商城订单不允许操作 //非商城订单不允许操作
if(!OrderSourceType.MALL.getCode().equals(orderBean.getSource())) { if(!OrderSourceType.SAASMALL.getCode().equals(orderBean.getSource())) {
return ResponseUtil.error(ResponseResult.ORDER_MALL_NOT_MATCH); return ResponseUtil.error(ResponseResult.ORDER_MALL_NOT_MATCH);
} }
...@@ -446,7 +444,7 @@ public class MallOrderServiceImpl implements MallOrderService { ...@@ -446,7 +444,7 @@ public class MallOrderServiceImpl implements MallOrderService {
newShoppingCartClearDto.setAppId(wxappid); newShoppingCartClearDto.setAppId(wxappid);
newShoppingCartClearDto.setSessionId(sessionId); newShoppingCartClearDto.setSessionId(sessionId);
newShoppingCartClearDto.setOperationType(1); newShoppingCartClearDto.setOperationType(1);
newShoppingCartClearDto.setChannelType(OrderChannelType.MALL.getCode()); newShoppingCartClearDto.setChannelType(OrderChannelType.SAASMALL.getCode());
shoppingCartClient.clearShoppingCart(newShoppingCartClearDto); shoppingCartClient.clearShoppingCart(newShoppingCartClearDto);
// 埋点支付行为 // 埋点支付行为
......
...@@ -75,7 +75,7 @@ public class OrderAdapterServiceImpl implements OrderAdapterService { ...@@ -75,7 +75,7 @@ public class OrderAdapterServiceImpl implements OrderAdapterService {
/** /**
* 商城订单 * 商城订单
*/ */
if(OrderChannelType.MALL.getCode().equals(createOrderVo.getChannelType())) { if(OrderChannelType.SAASMALL.getCode().equals(createOrderVo.getChannelType())) {
return mallOrderService.createOrder(createOrderVo); return mallOrderService.createOrder(createOrderVo);
} }
......
...@@ -307,7 +307,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -307,7 +307,7 @@ public class OrderServiceImpl implements Orderservice {
return orderCommonService.paySuccessCallback(message); return orderCommonService.paySuccessCallback(message);
} }
// 商城订单处理 // 商城订单处理
if(OrderSourceType.MALL.getCode().equals(orderBean.getSource())) { if(OrderSourceType.SAASMALL.getCode().equals(orderBean.getSource())) {
return mallOrderService.paySuccessCallback(message, confirmOrderDto, orderBeans); return mallOrderService.paySuccessCallback(message, confirmOrderDto, orderBeans);
} }
String oid = StringUtils.isNotEmpty(orderBean.getParentCode()) && !"0".equals(orderBean.getParentCode()) ? orderBean.getParentCode() : orderBean.getOid(); String oid = StringUtils.isNotEmpty(orderBean.getParentCode()) && !"0".equals(orderBean.getParentCode()) ? orderBean.getParentCode() : orderBean.getOid();
...@@ -2073,8 +2073,8 @@ public class OrderServiceImpl implements Orderservice { ...@@ -2073,8 +2073,8 @@ public class OrderServiceImpl implements Orderservice {
String channelType = OrderChannelType.SAAS.getCode(); String channelType = OrderChannelType.SAAS.getCode();
if(IappIdType.WC_XCX.getCode().equals(userLoginInfoDto.getIappId())) { if(IappIdType.WC_XCX.getCode().equals(userLoginInfoDto.getIappId())) {
channelType = OrderChannelType.IWC.getCode(); channelType = OrderChannelType.IWC.getCode();
} else if(OrderChannelType.MALL.getCode().equals(queryOrderVo.getChannelType())) { } else if(OrderChannelType.SAASMALL.getCode().equals(queryOrderVo.getChannelType())) {
channelType = OrderChannelType.MALL.getCode(); channelType = OrderChannelType.SAASMALL.getCode();
} }
return channelType; return channelType;
} }
......
...@@ -55,7 +55,7 @@ public class MallOrderServiceImplTest { ...@@ -55,7 +55,7 @@ public class MallOrderServiceImplTest {
requestVO.setPartnerId("1864"); requestVO.setPartnerId("1864");
requestVO.setShopId("8899"); requestVO.setShopId("8899");
requestVO.setSessionId("123123"); requestVO.setSessionId("123123");
requestVO.setChannelType("mall"); requestVO.setChannelType("saasmall");
requestVO.setOid("16303606485084241800003"); requestVO.setOid("16303606485084241800003");
mallOrderService.orderAffirm(requestVO); mallOrderService.orderAffirm(requestVO);
} }
......
...@@ -33,7 +33,7 @@ public enum OrderClientType { ...@@ -33,7 +33,7 @@ public enum OrderClientType {
JUBAOPEN(20, "美团聚宝盆"), JUBAOPEN(20, "美团聚宝盆"),
DIANPING(21, "美团点评"), DIANPING(21, "美团点评"),
KOUBEI(22, "口碑"), KOUBEI(22, "口碑"),
MALL(23, "商城"), SAASMALL(23, "微商城"),
; ;
......
...@@ -141,7 +141,7 @@ public class ShoppingCartController { ...@@ -141,7 +141,7 @@ public class ShoppingCartController {
private ShoppingCartNewService getInstanceByRequest(BaseRequestVo requestVo) { private ShoppingCartNewService getInstanceByRequest(BaseRequestVo requestVo) {
if(requestVo.getChannelType() != null && OrderChannelType.MALL.getCode().equals(requestVo.getChannelType())) { if(requestVo.getChannelType() != null && OrderChannelType.SAASMALL.getCode().equals(requestVo.getChannelType())) {
return SDKCommonBaseContextWare.getBean(ShoppingCartMallServiceImpl.class); return SDKCommonBaseContextWare.getBean(ShoppingCartMallServiceImpl.class);
} else { } else {
return getInstanceBySessionId(requestVo.getSessionId()); return getInstanceBySessionId(requestVo.getSessionId());
......
...@@ -18,7 +18,7 @@ public enum OrderChannelType { ...@@ -18,7 +18,7 @@ public enum OrderChannelType {
IMG("img", "爱马哥小程序"), IMG("img", "爱马哥小程序"),
MALL("mall", "商城"); SAASMALL("saasmall", "商城");
private String code; private String code;
......
...@@ -28,7 +28,10 @@ public enum OrderSourceType { ...@@ -28,7 +28,10 @@ public enum OrderSourceType {
MALL("mall", "非码Mall"), MALL("mall", "非码Mall"),
SAAS("saas", "saas 点餐"); SAAS("saas", "saas 点餐"),
SAASMALL("saasmall", "微商城"),
;
private String code; private String code;
......
...@@ -55,7 +55,7 @@ public class ShoppingCartControllerMallTest { ...@@ -55,7 +55,7 @@ public class ShoppingCartControllerMallTest {
public void addGoods() { public void addGoods() {
String str = "{\"spuId\":\"154916516745371156\",\"skuId\":\"\",\"qty\":10,\"categoryId\":\"0101\",\"categoryName\":\"1分钱\"," + String str = "{\"spuId\":\"154916516745371156\",\"skuId\":\"\",\"qty\":10,\"categoryId\":\"0101\",\"categoryName\":\"1分钱\"," +
"\"productComboList\":[],\"productGroupList\":[],\"channelType\":\"mall\",\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\"," + "\"productComboList\":[],\"productGroupList\":[],\"channelType\":\"saasmall\",\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\"," +
"\"sessionId\":\"testMallUser\",\"orderType\":\"\",\"shopId\":\"0000622\"}"; "\"sessionId\":\"testMallUser\",\"orderType\":\"\",\"shopId\":\"0000622\"}";
try { try {
mockMvc.perform(post("/shoppingCart/addGoods").content(str). mockMvc.perform(post("/shoppingCart/addGoods").content(str).
...@@ -71,7 +71,7 @@ public class ShoppingCartControllerMallTest { ...@@ -71,7 +71,7 @@ public class ShoppingCartControllerMallTest {
*/ */
@Test @Test
public void updateGoodsQty() { public void updateGoodsQty() {
String requestJson = "{\"shopId\":\"0000622\",\"cartGoodsUid\":\"3c6c126b-ce1a-4489-930d-28940c4edb0a\",\"qty\":3,\"channelType\":\"mall\"," + String requestJson = "{\"shopId\":\"0000622\",\"cartGoodsUid\":\"3c6c126b-ce1a-4489-930d-28940c4edb0a\",\"qty\":3,\"channelType\":\"saasmall\"," +
"\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\",\"sessionId\":\"testMallUser\",\"orderType\":\"\"}"; "\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\",\"sessionId\":\"testMallUser\",\"orderType\":\"\"}";
try { try {
mockMvc.perform(post("/shoppingCart/updateGoodsQty").content(requestJson). mockMvc.perform(post("/shoppingCart/updateGoodsQty").content(requestJson).
...@@ -85,7 +85,7 @@ public class ShoppingCartControllerMallTest { ...@@ -85,7 +85,7 @@ public class ShoppingCartControllerMallTest {
@Test @Test
public void listCartGoods() { public void listCartGoods() {
String requestJson = "{\"shopId\":\"0000622\",\"useCustomerScore\":0,\"couponCode\":\"\",\"activityCode\":\"\",\"flag\":\"\",\"sendGoods\":[]," + String requestJson = "{\"shopId\":\"0000622\",\"useCustomerScore\":0,\"couponCode\":\"\",\"activityCode\":\"\",\"flag\":\"\",\"sendGoods\":[]," +
"\"buyMemberCard\":null,\"channelType\":\"mall\",\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\",\"sessionId\":\"testMallUser\",\"orderType\":\"\"}"; "\"buyMemberCard\":null,\"channelType\":\"saasmall\",\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\",\"sessionId\":\"testMallUser\",\"orderType\":\"\"}";
try { try {
mockMvc.perform(post("/shoppingCart/listCartGoods").content(requestJson). mockMvc.perform(post("/shoppingCart/listCartGoods").content(requestJson).
contentType(MediaType.APPLICATION_JSON_UTF8).accept(MediaType.APPLICATION_JSON_UTF8)).andDo(print()). contentType(MediaType.APPLICATION_JSON_UTF8).accept(MediaType.APPLICATION_JSON_UTF8)).andDo(print()).
...@@ -102,7 +102,7 @@ public class ShoppingCartControllerMallTest { ...@@ -102,7 +102,7 @@ public class ShoppingCartControllerMallTest {
*/ */
@Test @Test
public void clearCartGoods() { public void clearCartGoods() {
String str = "{\"channelType\":\"mall\",\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\",\"sessionId\":\"testMallUser\",\"orderType\":\"\",\"shopId\":\"0000622\"}"; String str = "{\"channelType\":\"saasmall\",\"partnerId\":\"1864\",\"appId\":\"wxb78fb7c6218cb52c\",\"sessionId\":\"testMallUser\",\"orderType\":\"\",\"shopId\":\"0000622\"}";
try { try {
mockMvc.perform(post("/shoppingCart/clearCartGoods").content(str). mockMvc.perform(post("/shoppingCart/clearCartGoods").content(str).
contentType(MediaType.APPLICATION_JSON_UTF8).accept(MediaType.APPLICATION_JSON_UTF8)).andDo(print()). contentType(MediaType.APPLICATION_JSON_UTF8).accept(MediaType.APPLICATION_JSON_UTF8)).andDo(print()).
......
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