Commit 791cf76f by 周晓航

spock自测

parent c9aaa87b
...@@ -42,7 +42,7 @@ class OrderAdapterServiceImplTest extends Specification { ...@@ -42,7 +42,7 @@ class OrderAdapterServiceImplTest extends Specification {
given: "参数设置" given: "参数设置"
def createOrderBO = new CreateOrderBONew() def createOrderBO = new CreateOrderBONew()
// 接口请求信息 // 接口请求信息
String createVOStr = "{\"buyType\":0,\"channel\":\"1\",\"channelType\":\"saas\",\"couponCode\":\"88709227085491207040\",\"couponCodes\":[{\"couponCode\":\"88709227085491207040\",\"couponType\":7}],\"expectTime\":\"\",\"latitude\":\"31.293401421440972\",\"longitude\":\"121.30461995442708\",\"menuType\":\"saas\",\"mobile\":\"17327190802\",\"orderRemark\":\"测试单,请勿制作出餐,谢谢!\",\"orderType\":1,\"partnerId\":\"2581\",\"payChannelType\":1,\"reachStoreType\":5,\"sessionId\":\"cef46527f632a961af7a84209bdb8fcd0997c936\",\"sessionKey\":\"hZtQ1Usx/NhEUyoyduF+FQ==\",\"shopId\":\"229830\",\"storeAddress\":\"河南省驻马店市西平县经贸路步行街西段小广场华莱士\",\"storeName\":\"华莱士(西平步行街店)\",\"storeNameEn\":\"\",\"tableNumber\":\"\",\"takeMealFlag\":\"0\",\"takeMealTime\":\"\",\"thirdShopId\":\"EA23\",\"useCustomerScore\":2,\"userId\":\"3614319825989629832\",\"userName\":\"SWEET SUGA\",\"version\":\"2.0.60.6\"}"; String createVOStr = "{\"buyType\":0,\"channel\":\"1\",\"channelType\":\"saas\",\"couponCode\":\"\",\"couponCodes\":[],\"expectTime\":\"\",\"latitude\":\"29.984989691840276\",\"longitude\":\"120.57954399956597\",\"menuType\":\"saas\",\"mobile\":\"17681529088\",\"orderRemark\":\"\",\"orderType\":1,\"partnerId\":\"2209\",\"payChannelType\":1,\"reachStoreType\":4,\"sessionId\":\"e7a870f14f237d181b464e8a4a46d6b72e3d4a53\",\"sessionKey\":\"jTe2egiG9AWlk8SpixS+AA==\",\"shopId\":\"810428538\",\"storeAddress\":\"浙江省绍兴市越城区塔山街道解放南路777号金帝银泰城1幢4F002-1号\",\"storeName\":\"如创于茶(绍兴银泰店)\",\"storeNameEn\":\"\",\"tableNumber\":\"\",\"takeMealFlag\":\"0\",\"takeMealTime\":\"\",\"thirdShopId\":\"810428538\",\"useCustomerScore\":2,\"userId\":\"3645274120780529080\",\"userName\":\"\",\"version\":\"2.0.62.1\"}";
def createOrderVo = JSON.parseObject(createVOStr, CreateOrderVo.class) def createOrderVo = JSON.parseObject(createVOStr, CreateOrderVo.class)
createOrderBO.setCreateOrderVo(createOrderVo) createOrderBO.setCreateOrderVo(createOrderVo)
// 登录信息 // 登录信息
...@@ -50,7 +50,7 @@ class OrderAdapterServiceImplTest extends Specification { ...@@ -50,7 +50,7 @@ class OrderAdapterServiceImplTest extends Specification {
, AssortmentCustomerInfoVo.class) , AssortmentCustomerInfoVo.class)
createOrderBO.setUserLoginInfoDto(userLoginInfoDto) createOrderBO.setUserLoginInfoDto(userLoginInfoDto)
// 购物车信息 // 购物车信息
def shoppingCartGoodsDto = JSON.parseObject("{\"activityDiscountsDtos\":[{\"activityCode\":\"88709227085491207040\",\"activityName\":\"鸡米花买一送一券\",\"activityType\":32,\"discountAmount\":-800,\"priority\":0}],\"isDiscountDelivery\":false,\"originalTotalAmount\":2400,\"products\":[{\"activityDiscountsDtos\":[{\"activityCode\":\"88709227085491207040\",\"activityName\":\"鸡米花买一送一券\",\"activityType\":32,\"actualActivityGoodsNumber\":1,\"cartGoodsUid\":\"09b125d6-603d-4783-ba01-287073d08e2b\",\"discountAmount\":800}],\"cartGoodsUid\":\"09b125d6-603d-4783-ba01-287073d08e2b\",\"couponCode\":\"88709227085491207040\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isSendGoods\":false,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":800,\"originalProductType\":1,\"packPrice\":0,\"picture\":\"https://picture.sandload.cn/1619081297921.jpg\",\"qty\":2,\"salePrice\":800,\"skuId\":\"201889966261817090\",\"skuName\":\"鸡米花T\",\"spuId\":\"201889966261817090\",\"spuName\":\"鸡米花T\",\"stockLimit\":false,\"totalDiscountAmount\":-800,\"unit\":\"\",\"weight\":0.0},{\"activityDiscountsDtos\":[],\"cartGoodsUid\":\"02537906-b09d-4a76-b5b7-2a5842a31a6c\",\"categoryName\":\"缤纷小食\",\"classificationId\":\"0102\",\"classificationName\":\"正价单品\",\"customerCode\":\"hn80017\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isSendGoods\":false,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":800,\"originalProductType\":1,\"packPrice\":0,\"picture\":\"https://picture.sandload.cn/1619080995048.jpg\",\"productCode\":\"hn80017\",\"qty\":1,\"salePrice\":800,\"skuForeignName\":\"\",\"skuId\":\"201889966070976307\",\"skuName\":\"薯条(大)T\",\"spuForeignName\":\"\",\"spuId\":\"201889966070976307\",\"spuName\":\"薯条(大)T\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"reduceScore\":0,\"scoreReduceAmount\":0,\"shareDiscountActivityDtos\":[],\"totalAmount\":1600,\"totalDiscountAmount\":800,\"totalScore\":0}" def shoppingCartGoodsDto = JSON.parseObject("{\"activityDiscountsDtos\":[],\"isDiscountDelivery\":false,\"originalTotalAmount\":1600,\"packageAmount\":0,\"packageAmountCollectType\":1,\"products\":[{\"activityDiscountsDtos\":[],\"cartGoodsUid\":\"22a31cf2-2589-4430-9853-589a0ab86007\",\"classificationId\":\"\",\"classificationName\":\"\",\"comboProducts\":[],\"customerCode\":\"SKU0316\",\"extraList\":[{\"attributeId\":\"208146925075177758\",\"attributeName\":\"少冰\"},{\"attributeId\":\"208146664688556827\",\"attributeName\":\"三分糖\"}],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isSendGoods\":false,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":1600,\"originalProductType\":1,\"picture\":\"https://picture.sandload.cn/1621303466545.jpg\",\"productCode\":\"SKU0316\",\"qty\":1,\"skuForeignName\":\"\",\"skuId\":\"208142777442212610\",\"skuName\":\"蛋糕布蕾奶茶\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"208142777442212610\",\"spuName\":\"蛋糕布蕾奶茶\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"reduceScore\":0,\"scoreReduceAmount\":0,\"totalAmount\":1600,\"totalDiscountAmount\":0}"
, ShoppingCartGoodsDto.class) , ShoppingCartGoodsDto.class)
createOrderBO.setShoppingCartGoodsDto(shoppingCartGoodsDto) createOrderBO.setShoppingCartGoodsDto(shoppingCartGoodsDto)
...@@ -58,124 +58,8 @@ class OrderAdapterServiceImplTest extends Specification { ...@@ -58,124 +58,8 @@ class OrderAdapterServiceImplTest extends Specification {
def extInfo = new OrderExtInfoDto() def extInfo = new OrderExtInfoDto()
createOrderBO.setExtInfo(extInfo) createOrderBO.setExtInfo(extInfo)
// 门店信息 // 门店信息 /api/v2/organization/getStoreMix
def storeMixResponseDto = JSON.parseObject("{\n" + def storeMixResponseDto = JSON.parseObject("{\"businessInfo\":{\"appointAutoDeliveryTakeOrderWorkflowFinishTime\":3,\"appointAutoSelfmentionMakerWorkflowFinishTime\":3,\"appointAutoSelfmentionTakeOrderWorkflowFinishTime\":3,\"appointAutoTakeOutTakeOrderWorkflowFinishTime\":4,\"appointThirdDeliveryPickCompleteWorkflowFinishTime\":5,\"appointThirdDeliveryTakeOrderWorkflowFinishTime\":6,\"autoChargebackOrderTime\":1,\"autoChargebackOrderType\":1,\"autoDeliveryTakeOrderWorkflowFinishTime\":3,\"autoSelfmentionMakerWorkflowFinishTime\":4,\"autoSelfmentionTakeOrderWorkflowFinishTime\":3,\"autoTakeOutTakeOrderWorkflowFinishTime\":3,\"autoThirdDeliveryPickCompleteWorkflowFinishTime\":5,\"autoThirdDeliveryTakeOrderWorkflowFinishTime\":6,\"automaticRefund\":0,\"deliveryAppoint\":0,\"deliveryFinishedAfterMinute\":45,\"deliveryHours\":\"\",\"deliveryOrderWarnTime\":\"1\",\"deliveryProcessingAfterMinute\":15,\"deliveryProcessingBeforeMinute\":45,\"expandFields\":{\"appendMinutePerKilometer\":0,\"likesConfigValue\":0,\"likesShow\":0,\"monthlySalesConfigValue\":0,\"monthlySalesShow\":0,\"peakTimeDelivery\":[],\"preOrderSwitch\":0,\"scanOrderSwitch\":0},\"expectedTime\":0,\"goodsAvgTimeOfMaking\":0,\"id\":189248192683154460,\"invoice\":0,\"invoiceExplain\":\"\",\"isAutoTakeOrder\":3,\"maxOrderQuantity\":100,\"minPriceForInvoice\":0,\"orderPrintConfig\":\"1\",\"orderProgressBarStatus\":2,\"orderType\":\"pickup\",\"orderWarnTime\":\"1\",\"overTimeCloseOrder\":1,\"overTimeCloseOrderTime\":30,\"partnerId\":\"2209\",\"pickupAutomaticOrderTime\":1,\"selfMentionSwitch\":0,\"tableware\":0,\"takePartInSettleAccounts\":2,\"takeoutAutomaticOrderTime\":1,\"templateName\":\"30分钟\",\"templateType\":1,\"timeOfRefund\":\"48\",\"timeTypeOfRefund\":2,\"turnOnTimeOfMaking\":2},\"storeBusyTimeInfoList\":[],\"storeImageList\":[],\"storeInfo\":{\"activeFlag\":1,\"address\":\"浙江省绍兴市越城区塔山街道解放南路777号金帝银泰城1幢4F002-1号\",\"briefName\":\"\",\"businessHours\":\"10:00-22:00\",\"businessHoursDay\":\"10:00-22:00\",\"businessType\":\"1\",\"city\":\"绍兴市\",\"delivery\":2,\"deliveryHours\":\"\",\"deliveryHoursDay\":\"\",\"deliveryPrice\":0.0,\"distributionScope\":\"\",\"freeDeliveryPrice\":0.0,\"isSelfMention\":1,\"latitude\":\"29.985151\",\"logoUrl\":\"\",\"longitude\":\"120.58086\",\"parentCode\":\"szcdcyglyxgsC4\",\"parentId\":\"fad5b35d-5671-4ae6-93d4-484a50a5cda7\",\"parentName\":\"苏州茶朵餐饮管理有限公司\",\"partnerId\":\"2209\",\"phone\":\"18258503233\",\"province\":\"浙江省\",\"region\":\"越城区\",\"remark\":\"\",\"state\":\"1\",\"storeCode\":\"810428538\",\"storeId\":\"92409098-8f9d-4e4d-90b4-d48315cf4083\",\"storeName\":\"如创于茶(绍兴银泰店)\",\"storeNameEn\":\"\",\"thirdPartCode\":\"810428538\"}}"
" \"storeInfo\": {\n" +
" \"storeId\": \"32f47616-6e78-42c3-b5ee-768d9983fc69\",\n" +
" \"storeCode\": \"229830\",\n" +
" \"storeName\": \"华莱士(西平步行街店)\",\n" +
" \"storeNameEn\": null,\n" +
" \"parentId\": \"16dc665e-8e03-41a8-83ae-95e92666d266\",\n" +
" \"parentCode\": \"05Y\",\n" +
" \"parentName\": \"湖北(豫)\",\n" +
" \"partnerId\": \"2581\",\n" +
" \"briefName\": null,\n" +
" \"longitude\": \"114.02106387473609\",\n" +
" \"latitude\": \"33.383438776512136\",\n" +
" \"geohash\": \"wtcjft\",\n" +
" \"businessHours\": \"00:00-24:00\",\n" +
" \"state\": \"1\",\n" +
" \"phone\": \"17719196597\",\n" +
" \"address\": \"河南省驻马店市西平县经贸路步行街西段小广场华莱士\",\n" +
" \"addressEn\": null,\n" +
" \"activeFlag\": 1,\n" +
" \"remark\": null,\n" +
" \"province\": \"河南省\",\n" +
" \"city\": \"驻马店市\",\n" +
" \"region\": \"西平县\",\n" +
" \"delivery\": \"2\",\n" +
" \"deliveryHours\": \"\",\n" +
" \"freeDeliveryPrice\": 20.0,\n" +
" \"distributionScope\": \"\",\n" +
" \"businessHoursDay\": \"00:00-24:00\",\n" +
" \"deliveryHoursDay\": null,\n" +
" \"storeNotice\": null,\n" +
" \"logoUrl\": null,\n" +
" \"isBusinessOpen\": \"1\",\n" +
" \"businessType\": \"1\",\n" +
" \"isSelfMention\": 1,\n" +
" \"showDiscount\": null,\n" +
" \"thirdPartCode\": \"EA23\",\n" +
" \"status\": 1,\n" +
" \"deliveryRemark\": null\n" +
" },\n" +
" \"deliveryInfo\": null,\n" +
" \"businessInfo\": {\n" +
" \"id\": 203735268043408939,\n" +
" \"templateName\": \"【河南】无外卖 无预定单\",\n" +
" \"templateType\": 1,\n" +
" \"partnerId\": \"2581\",\n" +
" \"orderWarnTime\": \"1\",\n" +
" \"deliveryOrderWarnTime\": \"1\",\n" +
" \"orderPrintConfig\": \"2\",\n" +
" \"maxOrderQuantity\": 10000,\n" +
" \"isAutoTakeOrder\": 1,\n" +
" \"pickupAutomaticOrderTime\": 1,\n" +
" \"takeoutAutomaticOrderTime\": 1,\n" +
" \"autoChargebackOrderType\": 1,\n" +
" \"autoChargebackOrderTime\": 1,\n" +
" \"overTimeCloseOrder\": 1,\n" +
" \"overTimeCloseOrderTime\": 30,\n" +
" \"autoSelfmentionTakeOrderWorkflowFinishTime\": 3,\n" +
" \"autoSelfmentionMakerWorkflowFinishTime\": 4,\n" +
" \"autoTakeOutTakeOrderWorkflowFinishTime\": 4,\n" +
" \"autoDeliveryTakeOrderWorkflowFinishTime\": 3,\n" +
" \"appointAutoSelfmentionTakeOrderWorkflowFinishTime\": 4,\n" +
" \"appointAutoSelfmentionMakerWorkflowFinishTime\": 4,\n" +
" \"appointAutoTakeOutTakeOrderWorkflowFinishTime\": 4,\n" +
" \"appointAutoDeliveryTakeOrderWorkflowFinishTime\": 3,\n" +
" \"autoThirdDeliveryTakeOrderWorkflowFinishTime\": 5,\n" +
" \"appointThirdDeliveryTakeOrderWorkflowFinishTime\": 6,\n" +
" \"orderType\": \"pickup\",\n" +
" \"invoice\": 0,\n" +
" \"deliveryHours\": \"\",\n" +
" \"expectedTime\": 0,\n" +
" \"takePartInSettleAccounts\": 2,\n" +
" \"automaticRefund\": 1,\n" +
" \"minPriceForInvoice\": 0,\n" +
" \"invoiceExplain\": \"\",\n" +
" \"deliveryAppoint\": 0,\n" +
" \"deliveryAppointTime\": null,\n" +
" \"tableware\": 0,\n" +
" \"selfMentionSwitch\": 0,\n" +
" \"autoThirdDeliveryPickCompleteWorkflowFinishTime\": 5,\n" +
" \"appointThirdDeliveryPickCompleteWorkflowFinishTime\": 5,\n" +
" \"timeOfRefund\": \"48\",\n" +
" \"timeTypeOfRefund\": 2,\n" +
" \"turnOnTimeOfMaking\": 2,\n" +
" \"goodsAvgTimeOfMaking\": 5,\n" +
" \"deliveryFinishedAfterMinute\": 45,\n" +
" \"deliveryProcessingAfterMinute\": 30,\n" +
" \"deliveryProcessingBeforeMinute\": 30,\n" +
" \"orderProgressBarStatus\": 2,\n" +
" \"expandFields\": {\n" +
" \"dispatchType\": \"0\",\n" +
" \"monthlySalesShow\": \"0\",\n" +
" \"progressBarStatus\": 2,\n" +
" \"progressBarOrderNumber\": 0,\n" +
" \"preOrderSwitch\": \"0\",\n" +
" \"pickupPackageFeeSwitch\": \"1\",\n" +
" \"dispatchConfig\": [],\n" +
" \"deliveryPackageFeeSwitch\": \"1\",\n" +
" \"monthlySalesConfigValue\": \"0\",\n" +
" \"likesShow\": \"0\",\n" +
" \"likesConfigValue\": \"0\",\n" +
" \"processBarColorList\": \"\",\n" +
" \"scanOrderSwitch\": \"0\",\n" +
" \"progressBarProductUnit\": 1,\n" +
" \"peakTimeDelivery\": [],\n" +
" \"progressBarDetailStatus\": 1,\n" +
" \"appendMinutePerKilometer\": \"0\",\n" +
" \"progressBarPageList\": \"\"\n" +
" },\n" +
" \"orgIds\": null,\n" +
" \"supportCashierPay\": 2,\n" +
" \"processBarResponse\": null\n" +
" },\n" +
" \"parentUntilTop\": null,\n" +
" \"storeImageList\": null,\n" +
" \"storeBusyTimeInfoList\": null\n" +
" }"
, StoreMixResponseDto.class) , StoreMixResponseDto.class)
createOrderBO.setStoreMixResponseDto(storeMixResponseDto) createOrderBO.setStoreMixResponseDto(storeMixResponseDto)
......
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