Commit 824053fb by hanghang.wang

Merge branch 'feature/20210107_蜜雪新增APP购买虚拟商品(券)业务_wanghanghang' into develop

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	assortment-ordercenter-sdk/readme.md
#	order-application-service/pom.xml
#	order-application-service/src/main/java/cn/freemud/service/impl/AppOrderServiceImpl.java
#	order-application-service/src/main/resources/application.properties
parents 14e19ed4 d561ac3e
...@@ -152,4 +152,8 @@ ...@@ -152,4 +152,8 @@
| 2.2.28-SNAPSHOT | 停车场查询添加排序字段 | 张志恒 | 2021-01-03 | | 2.2.28-SNAPSHOT | 停车场查询添加排序字段 | 张志恒 | 2021-01-03 |
| 2.1.15-RELEASE | 集点三期添加商户号 | 张志恒 | 2020-12-29 | | 2.1.15-RELEASE | 集点三期添加商户号 | 张志恒 | 2020-12-29 |
| 2.2.29-SNAPSHOT | 麦咖啡新增商品类型 | 徐康 | 2021-01-06 | | 2.2.29-SNAPSHOT | 麦咖啡新增商品类型 | 徐康 | 2021-01-06 |
| 2.2.30-SNAPSHOT | 新增prospective_amount | 徐康 | 2021-01-07 | | 2.2.30-SNAPSHOT | 新增prospective_amount | 徐康 | 2021-01-07 |
\ No newline at end of file | 2.1.16-RELEASE | 停车场订单添加排序字段 | 张志恒 | 2021-01-06 |
| 2.1.17-RELEASE | 增加配送类型字段 | 王航航 | 2021-01-06 |
| 2.1.18-RELEASE | 添加美团点评渠道 | 梁崇福 | 2021-01-07 |
| 2.2.31-SNAPSHOT | 新增订单商品extInfo内部类对象 | 王航航 | 2021-01-11 |
\ No newline at end of file
...@@ -610,6 +610,11 @@ public class QueryOrdersResponse { ...@@ -610,6 +610,11 @@ public class QueryOrdersResponse {
public List<ProductBean> materialProduct; public List<ProductBean> materialProduct;
/** /**
* 商品拓展字段extInfo转换对象接收
*/
public List<ProductExtInfo> productExtInfo;
/**
* 购物车行uid * 购物车行uid
*/ */
private String cartGoodsUid; private String cartGoodsUid;
...@@ -658,6 +663,21 @@ public class QueryOrdersResponse { ...@@ -658,6 +663,21 @@ public class QueryOrdersResponse {
private String productId; private String productId;
} }
@NoArgsConstructor
@Data
public static class ProductExtInfo {
//券活动编号
private String activityCode;
//数量
private Integer num;
//券活动名称
private String activityName;
}
} }
@NoArgsConstructor @NoArgsConstructor
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>assortment-ordercenter-sdk</artifactId> <artifactId>assortment-ordercenter-sdk</artifactId>
<version>2.2.29-SNAPSHOT</version> <version>2.2.31-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
......
...@@ -28,6 +28,7 @@ import com.freemud.application.sdk.api.log.LogParams; ...@@ -28,6 +28,7 @@ import com.freemud.application.sdk.api.log.LogParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -98,7 +99,7 @@ public class OrderController { ...@@ -98,7 +99,7 @@ public class OrderController {
*/ */
@ApiAnnotation(logMessage = "appCreateOrder") @ApiAnnotation(logMessage = "appCreateOrder")
@PostMapping("/app/create") @PostMapping("/app/create")
public BaseResponse appCreateOrder(@Validated @LogParams @RequestBody AppCreateOrderVo createOrderVo) { public BaseResponse appCreateOrder(@Validated @LogParams @RequestBody AppCreateOrderVo createOrderVo, BindingResult bindingResult) {
return orderAdapterService.appCreateOrder(createOrderVo); return orderAdapterService.appCreateOrder(createOrderVo);
} }
......
...@@ -76,4 +76,18 @@ public class AppCreateOrderVo { ...@@ -76,4 +76,18 @@ public class AppCreateOrderVo {
* 下单渠道 版本号 * 下单渠道 版本号
*/ */
private String version; private String version;
//20210107蜜雪新增APP购买虚拟商品(券)业务--》》新增以下字段 bizType skuId --wanghanghang
/**
* 代表蜜雪APP买虚拟商品(买券)业务标识
*/
private Integer bizType;
/**
* 此字段只针对蜜雪冰城APP下单购买虚拟券时使用,其他商品请入参orderProducts字段
*/
private String skuId;
} }
...@@ -6,6 +6,10 @@ import org.hibernate.validator.constraints.NotEmpty; ...@@ -6,6 +6,10 @@ import org.hibernate.validator.constraints.NotEmpty;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
import java.util.List; import java.util.List;
/** /**
* All rights Reserved, Designed By www.freemud.cn * All rights Reserved, Designed By www.freemud.cn
* *
......
package cn.freemud.enums;
public enum BizTypeEnum {
APP_COUPON(6, "APP买券"),
APP_PRO(1, "未知(目前暂不支持),后续可能预留给正常商品");
private Integer bizType;
private String desc;
BizTypeEnum(Integer bizType, String desc) {
this.bizType = bizType;
this.desc = desc;
}
public static cn.freemud.enums.BizTypeEnum getByCode(Integer code) {
for (cn.freemud.enums.BizTypeEnum payType : values()) {
if (payType.getBizType().equals(code)) {
return payType;
}
}
return null;
}
public Integer getBizType() {
return bizType;
}
public void setBizType(Integer bizType) {
this.bizType = bizType;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
\ No newline at end of file
...@@ -1502,6 +1502,13 @@ public class OrderServiceImpl implements Orderservice { ...@@ -1502,6 +1502,13 @@ public class OrderServiceImpl implements Orderservice {
joinPayGift(sessionId, queryOrderResponseVo, partnerId,null); joinPayGift(sessionId, queryOrderResponseVo, partnerId,null);
} }
List<QueryOrdersResponse.DataBean.OrderBean.ProductBean> productList = response.getData().getProductList();
if(productList!=null && productList.size()>0){
productList.stream().forEach(productBean -> {
gson.fromJson(productBean.getExtInfo(), OrderExtInfoDto.class);
});
}
buildQueryOrderResponseVo(queryOrderResponseVo, response, partnerId); buildQueryOrderResponseVo(queryOrderResponseVo, response, partnerId);
......
...@@ -221,7 +221,7 @@ structure.connectTimeOut = 10000 ...@@ -221,7 +221,7 @@ structure.connectTimeOut = 10000
structure.readTimeOut = 10000 structure.readTimeOut = 10000
structure.baseUrl = http://10.20.10.213:9140 structure.baseUrl = http://10.20.10.213:9140
structure.appName = message-center structure.appName = message-center
saas.assistantserviceclient.feign.url = 助手服务 saas.assistantserviceclient.feign.url = С���ַ���
member.pay.callback.notifyUrl = http://118.89.173.227:9213/customer/payment/memberPaymentCallback member.pay.callback.notifyUrl = http://118.89.173.227:9213/customer/payment/memberPaymentCallback
customer.service.url = https://saastestapi.sandload.cn/customer-service customer.service.url = https://saastestapi.sandload.cn/customer-service
...@@ -261,7 +261,7 @@ management.endpoints.web.exposure.include = prometheus,info,health ...@@ -261,7 +261,7 @@ management.endpoints.web.exposure.include = prometheus,info,health
management.metrics.tags.application = ${spring.application.name} management.metrics.tags.application = ${spring.application.name}
eureka.instance.metadataMap.group = open-store eureka.instance.metadataMap.group = open-store
# 版本号,根据发布进行变化 # �汾�ţ����ݷ������б仯
eureka.instance.metadataMap.version = 1.9.10 eureka.instance.metadataMap.version = 1.9.10
......
...@@ -13,14 +13,72 @@ ...@@ -13,14 +13,72 @@
package cn.freemud.utils; package cn.freemud.utils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.junit.Test; import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
public class QrCodeUtilTest { public class QrCodeUtilTest {
@Test @Test
public void createQrCodeTest() throws Exception { public void qq() {
String imageString = QrCodeUtil.createQrCode("1243456", 200, "PNG"); // String imageString = QrCodeUtil.createQrCode("1243456", 200, "PNG");
System.out.println(imageString); // System.out.println(imageString);
aa a1 = new aa();
List<aa> list = new ArrayList<>();
for (int i = 0;i<4 ;i++){
a1.setA("1" + i);
a1.setB("1"+ i);
a1.setC("1"+ i);
list.add(a1);
}
String astr = list.toString();
Gson gson = new Gson();
List<aa> goods = gson.fromJson(astr,
new TypeToken<List<aa>>() {
}.getType());
System.out.println(goods);
}
public class aa {
String a;
String b;
String c;
public String getA() {
return a;
}
public void setA(String a) {
this.a = a;
}
public String getB() {
return b;
}
public void setB(String b) {
this.b = b;
}
public String getC() {
return c;
}
public void setC(String c) {
this.c = c;
}
} }
} }
\ No newline at end of file
package cn.freemud; package cn.freemud;
import cn.freemud.utils.QrCodeUtilTest;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.junit.Test; import org.junit.Test;
import java.io.File; import java.io.File;
...@@ -9,9 +12,7 @@ import java.lang.reflect.Method; ...@@ -9,9 +12,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.net.URL; import java.net.URL;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.Enumeration; import java.util.*;
import java.util.LinkedHashSet;
import java.util.Set;
public class AllTests { public class AllTests {
...@@ -125,6 +126,65 @@ public class AllTests { ...@@ -125,6 +126,65 @@ public class AllTests {
} }
@Test
public void qq (){
// String imageString = QrCodeUtil.createQrCode("1243456", 200, "PNG");
// System.out.println(imageString);
aa a1 = new aa();
List<aa> list = new ArrayList<>();
for (int i = 0;i<4 ;i++){
a1.setA("1" + i);
a1.setB("1"+ i);
a1.setC("1"+ i);
list.add(a1);
}
String astr = list.toString();
Gson gson = new Gson();
List<aa> goods = gson.fromJson(astr,
new TypeToken<List<aa>>() {
}.getType());
System.out.println(goods);
}
public class aa {
String a;
String b;
String c;
public String getA() {
return a;
}
public void setA(String a) {
this.a = a;
}
public String getB() {
return b;
}
public void setB(String b) {
this.b = b;
}
public String getC() {
return c;
}
public void setC(String c) {
this.c = c;
}
}
/** /**
* 以文件的形式来获取包下的所有Class * 以文件的形式来获取包下的所有Class
* *
......
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