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
......@@ -153,3 +153,7 @@
| 2.1.15-RELEASE | 集点三期添加商户号 | 张志恒 | 2020-12-29 |
| 2.2.29-SNAPSHOT | 麦咖啡新增商品类型 | 徐康 | 2021-01-06 |
| 2.2.30-SNAPSHOT | 新增prospective_amount | 徐康 | 2021-01-07 |
| 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 {
public List<ProductBean> materialProduct;
/**
* 商品拓展字段extInfo转换对象接收
*/
public List<ProductExtInfo> productExtInfo;
/**
* 购物车行uid
*/
private String cartGoodsUid;
......@@ -658,6 +663,21 @@ public class QueryOrdersResponse {
private String productId;
}
@NoArgsConstructor
@Data
public static class ProductExtInfo {
//券活动编号
private String activityCode;
//数量
private Integer num;
//券活动名称
private String activityName;
}
}
@NoArgsConstructor
......
......@@ -46,7 +46,7 @@
<dependency>
<groupId>cn.freemud</groupId>
<artifactId>assortment-ordercenter-sdk</artifactId>
<version>2.2.29-SNAPSHOT</version>
<version>2.2.31-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
......
......@@ -28,6 +28,7 @@ import com.freemud.application.sdk.api.log.LogParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -98,7 +99,7 @@ public class OrderController {
*/
@ApiAnnotation(logMessage = "appCreateOrder")
@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);
}
......
......@@ -76,4 +76,18 @@ public class AppCreateOrderVo {
* 下单渠道 版本号
*/
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;
import javax.validation.constraints.Min;
import java.util.List;
/**
* 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 {
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);
......
......@@ -221,7 +221,7 @@ structure.connectTimeOut = 10000
structure.readTimeOut = 10000
structure.baseUrl = http://10.20.10.213:9140
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
customer.service.url = https://saastestapi.sandload.cn/customer-service
......@@ -261,7 +261,7 @@ management.endpoints.web.exposure.include = prometheus,info,health
management.metrics.tags.application = ${spring.application.name}
eureka.instance.metadataMap.group = open-store
# 版本号,根据发布进行变化
# �汾�ţ����ݷ������б仯
eureka.instance.metadataMap.version = 1.9.10
......
......@@ -13,14 +13,72 @@
package cn.freemud.utils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
public class QrCodeUtilTest {
@Test
public void createQrCodeTest() throws Exception {
String imageString = QrCodeUtil.createQrCode("1243456", 200, "PNG");
System.out.println(imageString);
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;
}
}
}
\ No newline at end of file
package cn.freemud;
import cn.freemud.utils.QrCodeUtilTest;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.junit.Test;
import java.io.File;
......@@ -9,9 +12,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.net.URL;
import java.net.URLDecoder;
import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.*;
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
*
......
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