Commit e7cf567a by 张洪旺

Merge remote-tracking branch 'origin/qa' into qa

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/controller/OrderController.java
#	order-application-service/src/main/java/cn/freemud/service/Orderservice.java
#	order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
parents 0c76b274 35eabe2e
...@@ -2,84 +2,22 @@ ...@@ -2,84 +2,22 @@
| 版本号 | 版本说明 | 更新人 | 更新时间 | | 版本号 | 版本说明 | 更新人 | 更新时间 |
| --------------| ------------ | ------------- | ---------- | | --------------| ------------ | ------------- | ---------- |
| 1.0.0-SNAPSHOT | 迁移后包明改为cn.freemud开头第一版 | wuping | 2019-12-16 | | 1.0.0-SNAPSHOT | 迁移后包明改为cn.freemud开头第一版 | wuping | 2019-12-16 |
| 6.4.10.RELEASE| 骑手小费 | 张明警 | 2019-12-26 |
| 1.1.0.RELEASE| 1.9.8需求打包release版本 | 侯书虎 | 2019-12-26 |
| 1.1.1.RELEASE| 1.9.9sessionKey | 胡超 | 20200108 |
| 1.1.2.RELEASE| 1.9.9需求打包release版本 | 丁凯 | 20200108 |
| 1.1.3.RELEASE| 1.9.10需求打包release版本(thirdCateId) | 胡超 | 20200113 |
| 1.1.4.RELEASE| 农工商submit接口 | 侯书虎 | 2020-01-13 |
| 1.1.5.RELEASE| 农工商submit接口(del thirdCateId) | 胡超 | 2020-01-13 |
| 1.1.6.SNAPSHOT| 1.9.11商品组 | 胡超 | 2020-02-05 | | 1.1.6.SNAPSHOT| 1.9.11商品组 | 胡超 | 2020-02-05 |
| 1.1.7.SNAPSHOT| 核销流程更改 | 侯书虎 | 2020-02-10 | | 1.1.7.SNAPSHOT| 核销流程更改 | 侯书虎 | 2020-02-10 |
| 1.1.7.RELEASE| 1.9.11商品组 | 胡超 | 2020-02-13 |
| 1.1.9.RELEASE| pos渠道 | 丁凯 | 2020-02-22 |
| 1.2.0.RELEASE| 开放平台创建订单 | 姜海波 | 2020-02-24 |
| 1.2.1.RELEASE| 基于1.2.0.RELEASE | 丁凯 | 2020-03-04 |
| 1.2.2.RELEASE| 升级RELEASE | wuping | 2020-03-04 |
| 1.1.7-SNAPSHOT| 预约单支付成功接口增加预约任务 | wuping | 2020-03-10 | | 1.1.7-SNAPSHOT| 预约单支付成功接口增加预约任务 | wuping | 2020-03-10 |
| 1.1.8-SNAPSHOT| 预约单接单接口增加预约任务 | wuping | 2020-03-17 | | 1.1.8-SNAPSHOT| 预约单接单接口增加预约任务 | wuping | 2020-03-17 |
| 1.3.1-SNAPSHOT | 判断优化 | 丁凯 | 2020-03-27 |
| 1.4.1-SNAPSHOT | 增加延时队列配置 | 海波 | 2020-04-07 |
| 1.4.2-SNAPSHOT | 核销券码失败订单状态闭环开发 | 侯书虎 | 2020-04-08 |
| 1.4.3-SNAPSHOT | 查询订单返回新增参数 | 侯书虎 | 2020-04-08 |
| 1.4.4-SNAPSHOT | 订单扩展信息 | 丁凯 | 2020-04-13 |
| 1.4.5-SNAPSHOT | 订单app渠道 | 丁凯 | 2020-04-16 |
| 1.4.7-SNAPSHOT | 去掉无用字符写入ext_info | 李小二 | 2020-04-17 |
| 1.4.8-SNAPSHOT | 增加实际配送费 | 海波 | 2020-04-17 |
| 1.5.0-SNAPSHOT | APP渠道 | 丁凯 | 2020-04-22 |
| 1.5.1-SNAPSHOT | oms订单正向操作 | 侯书虎 | 2020-04-23 |
| 1.5.2-SNAPSHOT | 预约单打印 | 海波 | 2020-04-23 |
| 1.5.3-SNAPSHOT | 放开常用方法修饰符 | 李小二 | 2020-04-23 |
| 1.5.4-SNAPSHOT | 优化ES查询sdk方法 | 海波 | 2020-04-24 |
| 1.5.5-SNAPSHOT | 订单渠道类型新增支付宝 | 书虎 | 2020-04-24 |
| 1.5.6-SNAPSHOT | 返回售后单创建时间 | wuping | 2020-04-27 |
| 1.5.7-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.5.8-SNAPSHOT | 费用实体添加字段:实际费用 | 胡超 | 2020-04-29 |
| 1.5.9-SNAPSHOT | oms逆向代码 | 侯书虎 | 2020-05-06 |
| 1.6.0-SNAPSHOT | 增加订单金额字段返回 | 侯书虎 | 2020-05-06 |
| 1.6.1-SNAPSHOT | 增加售后阶段 | 海波 | 2020-05-07 |
| 1.6.2-SNAPSHOT | 增加售后阶段 | 海波 | 2020-05-07 |
| 1.6.3-SNAPSHOT | 发送pos消息中心新增字段 | 侯书虎 | 2020-05-07 |
| 1.6.5-SNAPSHOT | 创建订单增加appid字段 | wuping | 2020-05-08 |
| 1.6.6-SNAPSHOT | 退单增加配送费字段 | 海波 | 2020-05-12 |
| 1.6.7-SNAPSHOT | 开放平台订单详情补全信息 | 茹祥 | 2020-05-12 |
| 1.6.8-SNAPSHOT | 退配送费增加默认值 | 海波 | 2020-05-12 |
| 1.6.9-SNAPSHOT | 券码接口添加组织机构ID | 胡超 | 2020-05-12 |
| 1.7.6-SNAPSHOT | 订单查询返回配送渠道字段 | 雷后领 | 2020-05-14 |
| 1.7.2-SNAPSHOT | 规范extInfo字段 | 侯书虎 | 2020-05-14 |
| 1.7.3-SNAPSHOT | 客如云 | 海波 | 2020-05-14 |
| 1.7.4-SNAPSHOT| 客如云 | 海波 | 2020-05-15 |
| 1.7.6-SNAPSHOT| 订单查询返回配送渠道字段 | 雷后领 | 2020-05-15 |
| 1.7.7-SNAPSHOT| 聚合订单综合查询新增新订单类型 | wuping | 2020-05-15 |
| 1.7.8-SNAPSHOT| 预约单接单后提醒时间区分外卖自提 | wuping | 2020-05-18 |
| 1.8.0-SNAPSHOT| 增加订单支付类型 | 海波 | 2020-05-18 |
| 1.8.1-SNAPSHOT| 增加订单支付类型 | 海波 | 2020-05-18 |
| 1.8.2-SNAPSHOT| 升级券码sdk | 胡超 | 2020-05-18 |
| 1.8.3-SNAPSHOT| 更新基础sdk1.4.8-SNAPSHOT | 海波 | 2020-05-25|
| 1.8.4-SNAPSHOT| 新增活动类型 | 侯书虎 | 2020-05-26 |
| 1.8.5-SNAPSHOT| 客如云增加字段 | 海波 | 2020-05-26 |
| 1.8.6-SNAPSHOT| 增加完成时间戳字段 | 雷后领 | 2020-05-27**** |
| 1.8.7-SNAPSHOT| 修改订单详情配送时间字段 | 茹祥 | 2020-05-27 |
| 1.8.8-SNAPSHOT| 查询非码微店订单下载 | 梁崇福 | 2020-05-28 |
| 1.5.5-SNAPSHOT | 返回售后单创建时间 | wuping | 2020-04-27 |
| 1.5.6-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.6.5-SNAPSHOT | 创建订单增加appid字段 | wuping | 2020-05-08 |
| 1.7.7-SNAPSHOT| 聚合订单综合查询新增新订单类型 | wuping | 2020-05-15 |
| 1.7.8-SNAPSHOT| 预约单接单后提醒时间区分外卖自提 | wuping | 2020-05-18 |
| 1.7.1-SNAPSHOT| 订单查询返回配送渠道字段 | 雷后领 | 2020-05-14 |
| 1.8.6-SNAPSHOT| 增加完成时间戳字段 | 雷后领 | 2020-05-27|
| 1.3.4-SNAPSHOT | 返回售后单创建时间 | wuping | 2020-04-27 |
| 1.3.5-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.7.7-SNAPSHOT| 聚合订单综合查询新增新订单类型 | wuping | 2020-05-15 |
| 1.7.8-SNAPSHOT| 预约单接单后提醒时间区分外卖自提 | wuping | 2020-05-18 |
| 1.8.9-SNAPSHOT | 用户订单和es综合查询接口新增订单业务类型集合 | wuping | 2020-06-01 |
| 1.3.8-SNAPSHOT | 客如云订单信息 | 茹祥 | 2020-04-29 |
| 1.8.9-SNAPSHOT | 用户订单和es综合查询接口新增订单业务类型集合 | wuping | 2020-06-01 |
| 1.8.10-SNAPSHOT | 集点为0时不调用会员接口 | 梁崇福 | 2020-06-01 |
| 1.9.1-SNAPSHOT | 修改客如云接口名 | 海波 | 2020-06-05 |
| 1.9.2-SNAPSHOT| 预约单任务删除 | wuping | 2020-06-05 |
| 1.9.3-SNAPSHOT| 围餐 | dingkai | 2020-06-08 |
| 1.9.4-SNAPSHOT| 券码接口修改为channel_code | 梁崇福 | 2020-06-08 |
| 1.9.5-SNAPSHOT| 商品统计分类编号保存 | wuping | 2020-06-09 |
| 1.9.6-SNAPSHOT| 农工商停车订单 | dingkai | 2020-06-12 |
| 1.9.7-SNAPSHOT| 添加小助手营业额查询 | 梁崇福 | 2020-06-16 |
| 1.9.8-SNAPSHOT| 增加小程序打开场景值scene 升级ordercenter-sdk | 梁崇福 | 2020-06-16 |
| 1.9.91-SNAPSHOT| 升级ordercenter-sdk | 李小二 | 2020-06-28 |
| 2.0.0-SNAPSHOT| 增加payChannel | 李小二 | 2020-06-28 |
| 2.0.3-SNAPSHOT| 围餐使用积分抵扣金额赋值问题 | 谌会阳 | 2020-07-20 |
| 2.0.6-SNAPSHOT| 升级sdk版本| 李小二 | 2020-07-20 |
| 2.0.7-SNAPSHOT| 围餐添加支付渠道字段 | 谌会阳 | 2020-07-23 |
| 2.0.8-SNAPSHOT| 加料商品 | 梁崇福 | 2020-07-27 |
| 2.0.14-SNAPSHOT| 麦咖啡 | 谌会阳 | 2020-08-17 |
| 2.0.15-SNAPSHOT| 升级ordercenter-sdk | 肖家炜 | 2020-08-25 |
| 1.2.3.RELEASE | 预约单升级RELEASE | wuping | 2020-03-18 | | 1.2.3.RELEASE | 预约单升级RELEASE | wuping | 2020-03-18 |
| 1.2.4.RELEASE | 紧急需求 增加骑手电话 | 海波 | 2020-03-19 | | 1.2.4.RELEASE | 紧急需求 增加骑手电话 | 海波 | 2020-03-19 |
| 1.2.5.RELEASE | 满额减配送费 | dingkai | 2020-03-26 | | 1.2.5.RELEASE | 满额减配送费 | dingkai | 2020-03-26 |
...@@ -156,3 +94,5 @@ ...@@ -156,3 +94,5 @@
| 2.1.9-RELEASE | 去掉0元核销优惠券 | 李小二 | 2020-12-14 | | 2.1.9-RELEASE | 去掉0元核销优惠券 | 李小二 | 2020-12-14 |
| 2.1.10-RELEASE | coco | 刘鹏飞 | 2020-12-17 | | 2.1.10-RELEASE | coco | 刘鹏飞 | 2020-12-17 |
| 2.1.11-RELEASE | 农工商添加设备号 | 梁崇福 | 2020-12-17 | | 2.1.11-RELEASE | 农工商添加设备号 | 梁崇福 | 2020-12-17 |
| 2.1.12-RELEASE | coco定制优惠券核销 | 刘鹏飞 | 2020-12-24 |
\ No newline at end of file
...@@ -1384,6 +1384,9 @@ public class OrderSdkAdapter { ...@@ -1384,6 +1384,9 @@ public class OrderSdkAdapter {
case "GATHER_SPOT": case "GATHER_SPOT":
type=221; type=221;
break; break;
case "COCO_PRODUCT_CASH_COUPON":
type=36;
break;
default: default:
break; break;
} }
...@@ -1988,6 +1991,8 @@ public class OrderSdkAdapter { ...@@ -1988,6 +1991,8 @@ public class OrderSdkAdapter {
newOrderAccountType=OldOrderAccountType.MEMBER_PRICE_DISCOUNT.getCode(); newOrderAccountType=OldOrderAccountType.MEMBER_PRICE_DISCOUNT.getCode();
case 99: case 99:
newOrderAccountType=OldOrderAccountType.FREIGHT_COUPON.getCode(); newOrderAccountType=OldOrderAccountType.FREIGHT_COUPON.getCode();
case 36:
newOrderAccountType=OldOrderAccountType.COCO_PRODUCT_CASH_COUPON.getCode();
default: default:
break; break;
} }
......
...@@ -43,7 +43,8 @@ public enum OldOrderAccountType { ...@@ -43,7 +43,8 @@ public enum OldOrderAccountType {
PRICE_DEDUCTION_COUPON(103, "抵价券", "PRICE_DEDUCTION_COUPON"), PRICE_DEDUCTION_COUPON(103, "抵价券", "PRICE_DEDUCTION_COUPON"),
TOTAL_DISCOUNT(205, "优惠总金额", "TOTAL_DISCOUNT"), TOTAL_DISCOUNT(205, "优惠总金额", "TOTAL_DISCOUNT"),
GATHER_SPOT(221, "集点活动","GATHER_SPOT"), GATHER_SPOT(221, "集点活动","GATHER_SPOT"),
MEMBER_PRICE_DISCOUNT(220, "会员价优惠", "MEMBER_PRICE_DISCOUNT"); MEMBER_PRICE_DISCOUNT(220, "会员价优惠", "MEMBER_PRICE_DISCOUNT"),
COCO_PRODUCT_CASH_COUPON(36, "coco商品代金券","COCO_PRODUCT_CASH_COUPON");
private Integer code; private Integer code;
private String desc; private String desc;
......
...@@ -43,6 +43,7 @@ public enum QueryOrderAccountType { ...@@ -43,6 +43,7 @@ public enum QueryOrderAccountType {
MEMBER_PRICE_DISCOUNT("MEMBER_PRICE_DISCOUNT","会员价优惠"), MEMBER_PRICE_DISCOUNT("MEMBER_PRICE_DISCOUNT","会员价优惠"),
MCCAFE_MONTH_CARD("MCCAFE_MONTH_CARD","麦咖啡月卡"), MCCAFE_MONTH_CARD("MCCAFE_MONTH_CARD","麦咖啡月卡"),
WITH_ORDER_BUY_COUPON_FEE("WITH_ORDER_BUY_COUPON_FEE", "随单买月卡"), WITH_ORDER_BUY_COUPON_FEE("WITH_ORDER_BUY_COUPON_FEE", "随单买月卡"),
COCO_PRODUCT_CASH_COUPON("COCO_PRODUCT_CASH_COUPON", "coco商品代金券"),
; ;
private String code; private String code;
......
...@@ -2579,6 +2579,14 @@ public class OrderAdapter { ...@@ -2579,6 +2579,14 @@ public class OrderAdapter {
if (ActivityTypeEnum.TYPE_221.getCode().equals(activityType)){ if (ActivityTypeEnum.TYPE_221.getCode().equals(activityType)){
return OldOrderAccountType.GATHER_SPOT; return OldOrderAccountType.GATHER_SPOT;
} }
if (ActivityTypeEnum.TYPE_221.getCode().equals(activityType)){
return OldOrderAccountType.GATHER_SPOT;
}
// coco商品代金券
if (ActivityTypeEnum.TYPE_36.getCode().equals(activityType)){
return OldOrderAccountType.COCO_PRODUCT_CASH_COUPON;
}
return OldOrderAccountType.BUYM_SENDN; return OldOrderAccountType.BUYM_SENDN;
} }
......
...@@ -407,4 +407,7 @@ public class OrderController { ...@@ -407,4 +407,7 @@ public class OrderController {
} }
} }
package cn.freemud.entities.vo;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
@Data
public class PlatformPaySuccessRequest {
@NotEmpty(message = "orderCode 不能为空")
private String orderCode;
@NotEmpty(message = "商户号 不能为空")
private String partnerId;
}
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
package cn.freemud.entities.vo; package cn.freemud.entities.vo;
import cn.freemud.entities.dto.PromotionMessageDto; import cn.freemud.entities.dto.PromotionMessageDto;
import cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDto;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Builder; import lombok.Builder;
...@@ -364,14 +365,14 @@ public class QueryOrderResponseVo { ...@@ -364,14 +365,14 @@ public class QueryOrderResponseVo {
private String activityName; private String activityName;
//支付有礼活动号 //支付有礼活动号
private String activityNo; // private String activityNo;
/** /**
* 支付有礼发送方式 * 支付有礼发送方式
* 0-静默发送 * 0-静默发送
* 5-手动发送 * 5-手动发送
*/ */
private Integer activitySendType; // private Integer activitySendType;
//支付有礼领券集合 //支付有礼领券集合
private List<PayGiftCouponVo> coupons; private List<PayGiftCouponVo> coupons;
...@@ -381,32 +382,32 @@ public class QueryOrderResponseVo { ...@@ -381,32 +382,32 @@ public class QueryOrderResponseVo {
/** /**
* 支付有礼奖励类型:1-非码券,2-微信商家券,3-弹窗奖励 * 支付有礼奖励类型:1-非码券,2-微信商家券,3-弹窗奖励
*/ */
private String syncWechat; // private String syncWechat;
/** /**
* 支付有礼活动配图 * 支付有礼活动配图
*/ */
private String activityPicture; // private String activityPicture;
/** /**
* 支付有礼跳转设置(跳转类型) 0:无 5:跳转页面 10:外部小程序 15:跳转商品 20:跳转H5 * 支付有礼跳转设置(跳转类型) 0:无 5:跳转页面 10:外部小程序 15:跳转商品 20:跳转H5
*/ */
private String redirectType; // private String redirectType;
/** /**
* 支付有礼跳转商品 * 支付有礼跳转商品
*/ */
private PayGiftGoodsConfigVo goodsConfig; // private PayGiftGoodsConfigVo goodsConfig;
/** /**
* 支付有礼跳转小程序 * 支付有礼跳转小程序
*/ */
private PayGiftMicroProgramConfigVo microProgramConfig; // private PayGiftMicroProgramConfigVo microProgramConfig;
/** /**
* 支付有礼跳转页面5和20跳转外部H5对应的路径或者URL * 支付有礼跳转页面5和20跳转外部H5对应的路径或者URL
*/ */
private String redirectPage; // private String redirectPage;
/** /**
* 收件人省份 * 收件人省份
...@@ -526,5 +527,13 @@ public class QueryOrderResponseVo { ...@@ -526,5 +527,13 @@ public class QueryOrderResponseVo {
* 是否已选择寄杯 * 是否已选择寄杯
*/ */
private Boolean sendCoupon; private Boolean sendCoupon;
} }
/**
*促销返回参数对象 20201223 提出紧急需求变更
*/
private PayGiftCheckAndJoinResponseDto payGiftReps;
} }
...@@ -55,7 +55,8 @@ public enum ActivityTypeEnum { ...@@ -55,7 +55,8 @@ public enum ActivityTypeEnum {
TYPE_DELIVERY(901, "配送费"), TYPE_DELIVERY(901, "配送费"),
TYPE_211(211, "套餐优惠"), TYPE_211(211, "套餐优惠"),
TYPE_221(221, "集点活动"), TYPE_221(221, "集点活动"),
TYPE_320(320, "会员价优惠"); TYPE_320(320, "会员价优惠"),
TYPE_36(36, "coco商品代金券");
private Integer code; private Integer code;
......
...@@ -26,7 +26,8 @@ public enum OrderAccountType { ...@@ -26,7 +26,8 @@ public enum OrderAccountType {
BUYM_SENDN(24, "买M赠N"), BUYM_SENDN(24, "买M赠N"),
CUSTOMER_SUB(4, "积分扣减"), CUSTOMER_SUB(4, "积分扣减"),
CARD_ORIGINAL_AMOUNT(25, "会员卡原价"), CARD_ORIGINAL_AMOUNT(25, "会员卡原价"),
CARD_DISCOUNT_AMOUNT(26, "会员卡优惠金额"); CARD_DISCOUNT_AMOUNT(26, "会员卡优惠金额"),
COCO_PRODUCT_CASH_COUPON(36, "coco商品代金券");;
private Integer code; private Integer code;
private String desc; private String desc;
......
...@@ -147,4 +147,8 @@ public interface Orderservice { ...@@ -147,4 +147,8 @@ public interface Orderservice {
BaseResponse timeOutOrderRefund(TimeOutOrderVo timeOutOrderVo); BaseResponse timeOutOrderRefund(TimeOutOrderVo timeOutOrderVo);
BaseResponse platformPaysuccess(PlatformPaySuccessRequest requestVo);
} }
...@@ -148,8 +148,10 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -148,8 +148,10 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
// 根据活动号转类型 // 根据活动号转类型
Integer orderAccountType = orderSdkAdapter.getOldOrderAccountType(settlementType); Integer orderAccountType = orderSdkAdapter.getOldOrderAccountType(settlementType);
// 不是商品券、代金券、折扣券不处理
if(!OrderAccountType.COUPON.getCode().equals(orderAccountType) && // 不是商品券、代金券、折扣券、商品代金券不处理
if(!OrderAccountType.COCO_PRODUCT_CASH_COUPON.getCode().equals(orderAccountType) &&
!OrderAccountType.COUPON.getCode().equals(orderAccountType) &&
!OrderAccountType.PRODUCT_COUPON.getCode().equals(orderAccountType) && !OrderAccountType.PRODUCT_COUPON.getCode().equals(orderAccountType) &&
!OrderAccountType.DISCOUNT_COUPON.getCode().equals(orderAccountType)){ !OrderAccountType.DISCOUNT_COUPON.getCode().equals(orderAccountType)){
continue; continue;
...@@ -158,6 +160,7 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -158,6 +160,7 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
if(OrderAccountType.COUPON.getCode().equals(orderAccountType) && "0".equals(orderSettlementInfo.get(0).getProductId())){ if(OrderAccountType.COUPON.getCode().equals(orderAccountType) && "0".equals(orderSettlementInfo.get(0).getProductId())){
// 整单代金券,最后在计算 // 整单代金券,最后在计算
orderSettlementRemain.add(orderSettlementInfo.get(0)); orderSettlementRemain.add(orderSettlementInfo.get(0));
continue;
} }
CouponCodeVerificationTransDto couponCodeVerificationTransDto = new CouponCodeVerificationTransDto(); CouponCodeVerificationTransDto couponCodeVerificationTransDto = new CouponCodeVerificationTransDto();
...@@ -203,10 +206,6 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -203,10 +206,6 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
} }
couponCodeVerificationTransDto.setProducts(products); couponCodeVerificationTransDto.setProducts(products);
//处理第三方外卖单优惠金额信息
if(totalAmount != null && totalAmount.intValue() > 0){
totalAmount = 0 - Math.abs(totalAmount);
}
// 总优惠金额单位:分 // 总优惠金额单位:分
couponCodeVerificationTransDto.setTotalAmount(totalAmount); couponCodeVerificationTransDto.setTotalAmount(totalAmount);
...@@ -227,13 +226,13 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -227,13 +226,13 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
if(!orderSettlementRemain.isEmpty()){ if(!orderSettlementRemain.isEmpty()){
Map<String, IntSummaryStatistics> collect = orderSettlementAlready.stream().collect(Collectors.groupingBy(OrderSettlementResp::getProductId, Collectors.summarizingInt(OrderSettlementResp::getNumber))); Map<String, IntSummaryStatistics> collect = orderSettlementAlready.stream().collect(Collectors.groupingBy(OrderSettlementResp::getProductId, Collectors.summarizingInt(OrderSettlementResp::getNumber)));
log.info("coco订单核销优惠券,orderCode:{},collect:{}",orderBean.getOid(),JSONObject.toJSONString(collect));
for(OrderSettlementResp osr: orderSettlementRemain){ for(OrderSettlementResp osr: orderSettlementRemain){
CouponCodeVerificationTransDto couponCodeVerificationTransFull = new CouponCodeVerificationTransDto(); CouponCodeVerificationTransDto couponCodeVerificationTransFull = new CouponCodeVerificationTransDto();
// 券号 // 券号
couponCodeVerificationTransFull.setCode(osr.getExternalObjectId()); couponCodeVerificationTransFull.setCode(osr.getExternalObjectId());
// 总优惠金额单位:分 // 总优惠金额单位:分
couponCodeVerificationTransFull.setTotalAmount(osr.getSettlementAmount().intValue()); couponCodeVerificationTransFull.setTotalAmount(0 - osr.getSettlementAmount().intValue());
// 订单号 // 订单号
couponCodeVerificationTransFull.setOrderNumber(orderBean.getOid()); couponCodeVerificationTransFull.setOrderNumber(orderBean.getOid());
List<CouponCodeVerificationProductDto> productsFull = new ArrayList<>(); List<CouponCodeVerificationProductDto> productsFull = new ArrayList<>();
...@@ -261,21 +260,27 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -261,21 +260,27 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
couponCodeVerificationDto.setTransactions(transactions); couponCodeVerificationDto.setTransactions(transactions);
try { try {
for(CouponCodeVerificationTransDto transaction : transactions){
List<CouponCodeVerificationTransDto> transactionsNew = new ArrayList<>();
transactionsNew.add(transaction);
couponCodeVerificationDto.setTransactions(transactionsNew);
//71.券核销 //71.券核销
for (int i = 2; i >= 0; i--) { for (int i = 2; i >= 0; i--) {
LogUtil.info("coco核销券码开始==", JSON.toJSONString(couponCodeVerificationDto), null);
CouponCodeResponseDto couponCodeResponseDto = couponOfflineClient.verification(couponCodeVerificationDto); CouponCodeResponseDto couponCodeResponseDto = couponOfflineClient.verification(couponCodeVerificationDto);
LogUtil.info("coco核销券码返回==", JSON.toJSONString(couponCodeVerificationDto), null);
ThirdPartyLog.infoConvertJson(System.currentTimeMillis(), System.currentTimeMillis(), "/api", couponCodeVerificationDto, couponCodeResponseDto); ThirdPartyLog.infoConvertJson(System.currentTimeMillis(), System.currentTimeMillis(), "/api", couponCodeVerificationDto, couponCodeResponseDto);
if (Objects.equals(couponCodeResponseDto.getStatusCode(), ResponseResult.SUCCESS.getCode())) { if (Objects.equals(couponCodeResponseDto.getStatusCode(), ResponseResult.SUCCESS.getCode())) {
LogUtil.info("coco CocoCouponRelationServiceImpl", JSON.toJSONString(couponCodeVerificationDto), JSON.toJSONString(couponCodeResponseDto)); log.info("coco 核销券码返回成功,couponCodeVerificationDto:{},couponCodeResponseDto:{},", JSON.toJSONString(couponCodeVerificationDto), JSON.toJSONString(couponCodeResponseDto));
break; break;
} }
if (!Objects.equals(couponCodeResponseDto.getStatusCode(), ResponseResult.SUCCESS.getCode())) { if (!Objects.equals(couponCodeResponseDto.getStatusCode(), ResponseResult.SUCCESS.getCode())) {
emailAlertService.sendEmailAlert("cooc核销券码失败", String.format("request:%s \r\nresponse:%s", JSONObject.toJSONString(couponCodeVerificationDto), JSONObject.toJSONString(couponCodeResponseDto))); emailAlertService.sendEmailAlert("cooc核销券码失败", String.format("request:%s \r\nresponse:%s", JSONObject.toJSONString(couponCodeVerificationDto), JSONObject.toJSONString(couponCodeResponseDto)));
log.info("coco 核销券码返回失败,couponCodeVerificationDto:{},couponCodeResponseDto:{},", JSON.toJSONString(couponCodeVerificationDto), JSON.toJSONString(couponCodeResponseDto));
return ResponseUtil.error(ResponseResult.COUPON_VERIFICATION_FAIL); return ResponseUtil.error(ResponseResult.COUPON_VERIFICATION_FAIL);
} }
} }
}
} catch (Exception ex) { } catch (Exception ex) {
emailAlertService.sendEmailAlert("coco核销券码异常", String.format("request:%s \r\nexception:%s", JSONObject.toJSONString(couponCodeVerificationDto), Throwables.getStackTraceAsString(ex))); emailAlertService.sendEmailAlert("coco核销券码异常", String.format("request:%s \r\nexception:%s", JSONObject.toJSONString(couponCodeVerificationDto), Throwables.getStackTraceAsString(ex)));
...@@ -283,7 +288,6 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -283,7 +288,6 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
return ResponseUtil.error(ResponseResult.COUPON_VERIFICATION_FAIL); return ResponseUtil.error(ResponseResult.COUPON_VERIFICATION_FAIL);
} }
return ResponseUtil.success(); return ResponseUtil.success();
} }
...@@ -301,7 +305,7 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -301,7 +305,7 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
QueryOrdersResponseDto.DataBean.OrderBean.ProductBean pb, QueryOrdersResponseDto.DataBean.OrderBean.ProductBean pb,
List<CouponCodeVerificationProductDto> productsFull, List<CouponCodeVerificationProductDto> productsFull,
Integer totalAmountOriFull){ Integer totalAmountOriFull){
Long alreadyNum = collect.get(pb.getProductId()) == null ? 0L : collect.get(pb.getProductId()).getSum(); Long alreadyNum = collect.get(pb.getSpecification()) == null ? 0L : collect.get(pb.getSpecification()).getSum();
Integer num = pb.getNumber(); Integer num = pb.getNumber();
Integer remainNum = num - alreadyNum.intValue(); Integer remainNum = num - alreadyNum.intValue();
if(Objects.equals(remainNum,0)){ if(Objects.equals(remainNum,0)){
...@@ -309,13 +313,17 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService { ...@@ -309,13 +313,17 @@ public class CocoCouponRelationServiceImpl implements CouponRelationService {
} }
// 统计商品 // 统计商品
Integer price = pb.getPrice() == null ? 0 : pb.getPrice().intValue();
if(price.intValue() == 0){
return totalAmountOriFull;
}
CouponCodeVerificationProductDto couponCodeVerificationProductFull = new CouponCodeVerificationProductDto(); CouponCodeVerificationProductDto couponCodeVerificationProductFull = new CouponCodeVerificationProductDto();
couponCodeVerificationProductFull.setConsume_num(remainNum); couponCodeVerificationProductFull.setConsume_num(remainNum);
couponCodeVerificationProductFull.setPID(pb.getProductId()); couponCodeVerificationProductFull.setPID(pb.getProductId());
couponCodeVerificationProductFull.setSeq(pb.getSequence()); couponCodeVerificationProductFull.setSeq(pb.getSequence());
couponCodeVerificationProductFull.setProductName(pb.getProductName()); couponCodeVerificationProductFull.setProductName(pb.getProductName());
Integer price = pb.getPrice() == null ? 0 : pb.getPrice().intValue();
couponCodeVerificationProductFull.setInitPrice(price); couponCodeVerificationProductFull.setInitPrice(price);
couponCodeVerificationProductFull.setNowPrice(price); couponCodeVerificationProductFull.setNowPrice(price);
couponCodeVerificationProductFull.setPayMoney(price); couponCodeVerificationProductFull.setPayMoney(price);
......
...@@ -11,7 +11,8 @@ public enum OrderSource { ...@@ -11,7 +11,8 @@ public enum OrderSource {
SAAS("saas", "saas点餐"), SAAS("saas", "saas点餐"),
ALIPAY("alipay", "支付宝"), ALIPAY("alipay", "支付宝"),
EBAI("ebwm", "饿百外卖"), EBAI("ebwm", "饿百外卖"),
DPZHCT("dpzhct", "美团点评智慧餐厅"); DPZHCT("dpzhct", "美团点评智慧餐厅"),
KOUBEI("koubeiwaimai", "口碑外卖");
private String source; private String source;
private String sourceName; private String sourceName;
......
...@@ -31,7 +31,7 @@ public class OrderBeanFactory { ...@@ -31,7 +31,7 @@ public class OrderBeanFactory {
} }
if (OrderSource.BDWM.getSource().equals(source) || OrderSource.JDWM.getSource().equals(source) if (OrderSource.BDWM.getSource().equals(source) || OrderSource.JDWM.getSource().equals(source)
|| OrderSource.MTWM.getSource().equals(source) || OrderSource.ELEME.getSource().equals(source) || OrderSource.FMWD.getSource().equals(source) || OrderSource.EBAI.getSource().equals(source) || OrderSource.MTWM.getSource().equals(source) || OrderSource.ELEME.getSource().equals(source) || OrderSource.FMWD.getSource().equals(source) || OrderSource.EBAI.getSource().equals(source)
|| OrderSource.DPZHCT.getSource().equals(source)){ || OrderSource.DPZHCT.getSource().equals(source) || OrderSource.KOUBEI.getSource().equals(source)){
return applicationContext.getBean(WaimaiOrderMangerServiceImpl.class); return applicationContext.getBean(WaimaiOrderMangerServiceImpl.class);
} }
return applicationContext.getBean(SaasOrderMangerServiceImpl.class); return applicationContext.getBean(SaasOrderMangerServiceImpl.class);
......
...@@ -191,5 +191,10 @@ public class OrderExtInfoDto { ...@@ -191,5 +191,10 @@ public class OrderExtInfoDto {
*/ */
private String stationId; private String stationId;
/**
* 线下订单储值卡支付金额
*/
private Integer svcAmount;
} }
...@@ -13,12 +13,11 @@ ...@@ -13,12 +13,11 @@
package cn.freemud.controller; package cn.freemud.controller;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.GetMemberInfoRequestDto;
import cn.freemud.entities.vo.*; import cn.freemud.entities.vo.*;
import cn.freemud.enums.CreateOrderType;
import cn.freemud.enums.OrderChannelType; import cn.freemud.enums.OrderChannelType;
import cn.freemud.enums.ResponseResult; import cn.freemud.enums.ResponseResult;
import cn.freemud.service.ShoppingCartNewService; import cn.freemud.service.ShoppingCartNewService;
import cn.freemud.service.ShoppingCartToolsService;
import cn.freemud.service.impl.ShoppingCartMallServiceImpl; import cn.freemud.service.impl.ShoppingCartMallServiceImpl;
import cn.freemud.service.impl.ShoppingCartMealServiceImpl; import cn.freemud.service.impl.ShoppingCartMealServiceImpl;
import cn.freemud.service.impl.ShoppingCartNewServiceImpl; import cn.freemud.service.impl.ShoppingCartNewServiceImpl;
...@@ -28,7 +27,6 @@ import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo ...@@ -28,7 +27,6 @@ import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo
import com.freemud.api.assortment.datamanager.enums.IappIdType; import com.freemud.api.assortment.datamanager.enums.IappIdType;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager; import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare; import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare;
import com.alibaba.fastjson.JSON;
import com.freemud.application.sdk.api.log.ApiAnnotation; import com.freemud.application.sdk.api.log.ApiAnnotation;
import com.freemud.application.sdk.api.log.LogParams; import com.freemud.application.sdk.api.log.LogParams;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -177,4 +175,14 @@ public class ShoppingCartController { ...@@ -177,4 +175,14 @@ public class ShoppingCartController {
return SDKCommonBaseContextWare.getBean(ShoppingCartToolsServiceImpl.class).clear(request); return SDKCommonBaseContextWare.getBean(ShoppingCartToolsServiceImpl.class).clear(request);
} }
/**
* 线下订单查询接口
*/
@ApiAnnotation(logMessage = "/getMemberInfo")
@PostMapping(value = "/getMemberInfo")
public BaseResponse getMemberInfo(@LogParams @RequestBody GetMemberInfoRequestDto request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartNewServiceImpl.class).getMemberInfo(request);
}
} }
...@@ -194,6 +194,7 @@ public class ActivityCalculationDiscountResponseDto { ...@@ -194,6 +194,7 @@ public class ActivityCalculationDiscountResponseDto {
private Integer maxNum; private Integer maxNum;
private Integer exchangeNum; private Integer exchangeNum;
private Integer validityDateDays; private Integer validityDateDays;
private Boolean storeLevel;
} }
@Data @Data
......
package cn.freemud.entities.dto;
import lombok.Data;
import java.util.List;
@Data
public class GetMemberInfoRequestDto {
private String partnerId;
private String mobile;
private String userId;
/**
* 实际支付金额(分)
*/
private Integer actualPayAmount;
/**
* 下单门店号
*/
private String storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 订单原金额(分)
*/
private Integer originalAmount;
/**
* 下单渠道
*/
private Integer orderClient;
/**
* 订单类型
*/
private Integer orderType;
/**
* 支付渠道
*/
private String payChannel;
/**
* 支付渠道名称
*/
private String payChannelName;
/**
* pos编号
*/
private String posCode;
/**
* 操作人
*/
private String operator;
/**
* 是否赠送积分 0是1否
*/
private Integer needBonus;
/**
* 订单商品信息
*/
private List<OrderItemRequest> orderItemList;
@Data
public static class OrderItemRequest {
/**
* 商品序号
*/
private Integer productSeq;
/**
* 平台商品编号
*/
private String productId;
/**
* 商家商品编号
*/
private String thirdProductId;
/**
* 商品名称
*/
private String productName;
/**
* 商品单价(分)
*/
private Integer productPrice;
/**
* 数量
*/
private Integer productQuantity;
/**
* 优惠分摊金额(分)
*/
private Integer productSharePrice;
/**
* 商品单位
*/
private String productWeightUnit;
/**
* 商品重量(克)
*/
private Integer weight;
/**
* 商品规格名称(大杯)
*/
private String productSpecName;
/**
* 商品属性名称(三分糖)
*/
private String productProperty;
/**
* 商家商品分类编号
*/
private String thirdCateCode;
/**
* 是否算积分
*/
private String needBonus;
}
}
package cn.freemud.entities.dto;
import lombok.Data;
import java.util.List;
@Data
public class GetMemberInfoResponseVo {
private String userId;
private Score score;
private List<Coupon> coupons;
private List<Card> cards;
@Data
public static class Score {
/**
* 当前可用积分
*/
private Integer currentScore;
/**
* 积分抵扣金额,单位分
*/
private Integer reduceAmount;
/**
* 抵扣积分
*/
private Integer reduceScore;
}
@Data
public static class Coupon {
/**
* 券名称
*/
private String couponName;
/**
* 券CODE
*/
private String couponCode;
/**
* 券类型 0:商品 券 1:代金券 3 折扣券
*/
private Integer cuoponType;
/**
* 如:2019-10-1 至 2019-10-10 当天有效
*/
private String couponLimit;
/**
* 优惠金额,单位分
*/
private Integer discountAmount;
/**
* 状态:-1:未激活 0:可用(剔除过期) 1:已使用 2:部分使用 3:取消 6:已过期(根据生失效日期) 99:未知(目前暂不支持)
*/
private Integer status;
private List<Product> products;
}
@Data
public static class Product {
/**
* 商户商品编号
*/
private String pid;
/**
* 商品名称
*/
private String name;
/**
* 最大可取商品个数
*/
private Integer number;
/**
* 商品折扣价,以分为单位
*/
private Integer priceAct;
/**
* 原价,以分为单位
*/
private Integer priceOriginal;
/**
* 支付信息
*/
Payment payment;
}
@Data
public static class Payment {
/**
* 线上已付金额,以分为单位
*/
private Integer paid;
/**
* 线下需要收取的金额,以分为单位
*/
private Integer remaining;
}
@Data
public static class Card {
/**
* 实充余额,单位分
*/
private Integer amount;
/**
* 赠送余额,单位分
*/
private Integer vamount;
/**
* 卡规格ID
*/
private String applyId;
/**
* 卡号
*/
private String cardCode;
/**
* 卡名称
*/
private String cardName;
}
}
...@@ -169,6 +169,7 @@ public class CalculationSharingDiscountResponseDto { ...@@ -169,6 +169,7 @@ public class CalculationSharingDiscountResponseDto {
private Integer exchangeNum; private Integer exchangeNum;
private Integer validityDateDays; private Integer validityDateDays;
private Date endTime; private Date endTime;
private Boolean storeLevel;
} }
@Data @Data
......
...@@ -18,9 +18,7 @@ import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant; ...@@ -18,9 +18,7 @@ import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -101,6 +99,10 @@ public interface ShoppingCartNewService { ...@@ -101,6 +99,10 @@ public interface ShoppingCartNewService {
List<CartGoods> updateCartGoodsLegal(CartGoods cartGoods, String userId, ShoppingCartGoodsBaseResponseVo shoppingCartGoodsResponseVo, AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo, List<CartGoods> oldAllCartGoodsList); List<CartGoods> updateCartGoodsLegal(CartGoods cartGoods, String userId, ShoppingCartGoodsBaseResponseVo shoppingCartGoodsResponseVo, AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo, List<CartGoods> oldAllCartGoodsList);
default BaseResponse<GetMemberInfoResponseVo> getMemberInfo(GetMemberInfoRequestDto request){
return null;
};
/** /**
* 商品券校验券是否有效 * 商品券校验券是否有效
* *
......
...@@ -219,6 +219,7 @@ public class CalculationSharingDiscountService { ...@@ -219,6 +219,7 @@ public class CalculationSharingDiscountService {
sendPointNew.setValidityDateDays(sendPointVo.getValidityDateDays()); sendPointNew.setValidityDateDays(sendPointVo.getValidityDateDays());
sendPointNew.setActivityCode(discountDTO.getActivityCode()); sendPointNew.setActivityCode(discountDTO.getActivityCode());
sendPointNew.setEndTime(discountDTO.getEndTime()); sendPointNew.setEndTime(discountDTO.getEndTime());
sendPointNew.setStoreLevel(sendPointVo.getStoreLevel());
result.setSendPointVo(sendPointNew); result.setSendPointVo(sendPointNew);
} }
......
...@@ -124,6 +124,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation ...@@ -124,6 +124,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
shoppingCartGoodsResponseVo.setActivityTip(activityTip); shoppingCartGoodsResponseVo.setActivityTip(activityTip);
} }
// 将配送费放到一个字段去
if(shoppingCartGoodsResponseVo.getIsDiscountDelivery() && ( shoppingCartGoodsResponseVo.getDiscountDeliveryAmount() < shoppingCartGoodsResponseVo.getDeliveryAmount())){
shoppingCartGoodsResponseVo.setDeliveryAmount(shoppingCartGoodsResponseVo.getDiscountDeliveryAmount());
}
} }
@Override @Override
......
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