Commit 11701220 by shuhu.hou@freemud.cn

会员价联调

parent 5cb8e634
......@@ -1166,6 +1166,9 @@ public class OrderSdkAdapter {
case "FULL_DISTRIBUTION_FEE":
type=1014;
break;
case "MEMBER_PRICE_DISCOUNT":
type=220;
break;
default:
break;
}
......@@ -1867,6 +1870,8 @@ public class OrderSdkAdapter {
break;
case 205:
newOrderAccountType=OldOrderAccountType.TOTAL_DISCOUNT.getCode();
case 220:
newOrderAccountType=OldOrderAccountType.MEMBER_PRICE_DISCOUNT.getCode();
default:
break;
}
......
......@@ -37,7 +37,8 @@ public enum OldOrderAccountType {
FULL_DISTRIBUTION_FEE(1014, "满减配送费", "FULL_DISTRIBUTION_FEE"),
NEW_USER_DISCOUNT(101, "新用户立减", "NEW_USER_DISCOUNT"),
PRICE_DEDUCTION_COUPON(103, "抵价券", "PRICE_DEDUCTION_COUPON"),
TOTAL_DISCOUNT(205, "优惠总金额", "TOTAL_DISCOUNT");
TOTAL_DISCOUNT(205, "优惠总金额", "TOTAL_DISCOUNT"),
MEMBER_PRICE_DISCOUNT(220, "会员价优惠", "MEMBER_PRICE_DISCOUNT");
private Integer code;
private String desc;
......
......@@ -36,7 +36,8 @@ public enum QueryOrderAccountType {
TOTAL_DISCOUNT("TOTAL_DISCOUNT", "优惠总金额"),
ONLINE_PAY("ONLINE_PAY", "线上支付"),
FULL_DISTRIBUTION_FEE("FULL_DISTRIBUTION_FEE", "满减配送费"),
OFFLINE_PAY("OFFLINE_PAY", "线下支付");
OFFLINE_PAY("OFFLINE_PAY", "线下支付"),
MEMBER_PRICE_DISCOUNT("MEMBER_PRICE_DISCOUNT","会员价优惠");
private String code;
private String desc;
......
......@@ -42,7 +42,7 @@
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
<artifactId>productcenter-sdk</artifactId>
<version>2.8.0-SNAPSHOT</version>
<version>2.9.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
......
......@@ -71,6 +71,7 @@ public class ShoppingCartAdapter {
//可选搭配&固定搭配
productType.setComboProductTypeList(getValidateSkuProductType(cartGoods.getProductComboList()));
productType.setProductGroupTypeList(getValidateSkuProductType(cartGoods.getProductGroupList()));
productType.setMemberDiscount(cartGoods.getMemberDiscount());
validateShopProductRequest.getProductTypeList().add(productType);
}
return validateShopProductRequest;
......@@ -279,6 +280,7 @@ public class ShoppingCartAdapter {
cartGoods.setStockLimit(isSkuProduct ? ObjectUtils.equals(1, skuProduct.getStockLimit()) : ObjectUtils.equals(1, spuProduct.getStockLimit()));
cartGoods.setCustomerCode(isSkuProduct ? skuProduct.getCustomerCode() : spuProduct.getCustomerCode());
cartGoods.setRiseSell(isSkuProduct?skuProduct.getRiseSell():spuProduct.getRiseSell());
cartGoods.setMemberDiscount(isSkuProduct?skuProduct.getMemberDiscountResult():spuProduct.getMemberDiscountResult());
String skuSpecName = "";
if (isSkuProduct && CollectionUtils.isNotEmpty(skuProduct.getSkuSpecValues())) {
......
......@@ -138,6 +138,11 @@ public class CartGoods {
* 无起售份数默认值1
*/
private Integer riseSell;
/**
* 折扣比例
* 例如8折为80
*/
private Integer memberDiscount;
/**
* 套餐固定商品
......
......@@ -40,7 +40,7 @@
<dependency>
<groupId>cn.freemud</groupId>
<artifactId>assortment-ordercenter-sdk</artifactId>
<version>1.4.9.RELEASE</version>
<version>1.5.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
......
......@@ -2032,6 +2032,9 @@ public class OrderAdapter {
if (ActivityTypeEnum.TYPE_14.getCode().equals(activityType)) {
return OldOrderAccountType.FULL_DISTRIBUTION_FEE;
}
if (ActivityTypeEnum.TYPE_320.getCode().equals(activityType)){
return OldOrderAccountType.MEMBER_PRICE_DISCOUNT;
}
return OldOrderAccountType.BUYM_SENDN;
}
......
......@@ -50,7 +50,8 @@ public enum ActivityTypeEnum {
TYPE_200(200, "X元Y件"),
TYPE_PACKAGE(900, "包装费"),
TYPE_DELIVERY(901, "配送费"),
TYPE_211(211, "套餐优惠");
TYPE_211(211, "套餐优惠"),
TYPE_320(320, "会员价优惠");
private Integer code;
......
......@@ -35,7 +35,7 @@
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
<artifactId>productcenter-sdk</artifactId>
<version>2.8.0-SNAPSHOT</version>
<version>2.9.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
......
......@@ -63,6 +63,10 @@ public class ActivityCalculationDiscountRequestDto {
private List<CalculationDiscountGoods> goods;
private Long distributionFee;
/**
* 是否是会员
*/
private Boolean isMember;
@Data
public static class CalculationDiscountCoupon {
......@@ -94,6 +98,11 @@ public class ActivityCalculationDiscountRequestDto {
* 原价(分)
*/
private Long originalPrice;
/**
* 折扣比例
* 例如8折为80
*/
private Integer memberDiscount;
@Override
public boolean equals(Object o) {
......
package cn.freemud.entities.dto.user;
import lombok.Data;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: GetSessionUserInfoDto
* @Package cn.freemud.entities.dto.user
* @Description:
* @author: shuhu.hou
* @date: 2020/5/25 15:50
* @Copyright: 2020 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Data
public class GetSessionUserInfoDto {
private String sessionId;
private boolean isGetPaid;
}
......@@ -145,6 +145,11 @@ public class CartGoods {
*/
private Integer riseSell;
/**
* 折扣比例
* 例如8折为80
*/
private Integer memberDiscount;
/**
* 套餐固定商品
*/
private List<ComboxGoods> productComboList;
......
package cn.freemud.entities.vo;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import java.util.List;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: CustomerInfoVo
* @Package cn.freemud.entities.vo
* @Description:
* @author: shuhu.hou
* @date: 2020/5/25 15:35
* @Copyright: 2020 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Data
public class CustomerInfoVo {
private String openId;
private String unionId;
private String wxAppId;
private String appSecret;
private String sessionKey;
private String nickName;
private String photoUrl;
private String mobile;
private String memberId;
private String partnerId;
private Boolean newMember;
private String sessionId;
private String tableNumber;
private String iappId;
private String storeId;
private String devBrand;
private String devModel;
private String channel;
private String accessToken;
private String alipayUserId;
private String appId;
private String thirdPartyPartnerID;
private String thirdPartyMemberID;
/** 付费会员卡列表 **/
private List<MemberPaidDetailVo> memberPaids;
/** 判断是否为付费会员 **/
public boolean isMemberPaid(){
if(CollectionUtils.isEmpty(memberPaids)){
return false;
}
return memberPaids.stream().anyMatch(item -> item.getExpiryTime().getTime() > System.currentTimeMillis());
}
}
package cn.freemud.entities.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
public class MemberPaidDetailVo {
private String id;
private String paidId;
private String paidName;
private Date openTime;
private Date expiryTime;
}
......@@ -93,6 +93,7 @@ public interface ShoppingCartNewService {
String userId,
String appId,
Integer orderType,
boolean isMember,
List<CartGoods> cartGoodsList,
List<ActivityCalculationDiscountRequestDto.CalculationDiscountCoupon> coupons,
List<ShoppingCartInfoRequestVo.SendGoods> sendGoodsList,String menuType,Long distributionFee);
......
......@@ -416,7 +416,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
@Override
public ActivityCalculationDiscountResponseDto.CalculationDiscountResult getActivityCalculationDiscountResponse(
String partnerId, String storeId, String userId, String appId, Integer orderType, List<CartGoods> cartGoodsList,
String partnerId, String storeId, String userId, String appId, Integer orderType,boolean isMember, List<CartGoods> cartGoodsList,
List<ActivityCalculationDiscountRequestDto.CalculationDiscountCoupon> coupons, List<ShoppingCartInfoRequestVo.SendGoods> sendGoodsList,String menuType,Long distributionFee) {
return null;
}
......
......@@ -490,7 +490,7 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
@Override
public ActivityCalculationDiscountResponseDto.CalculationDiscountResult
getActivityCalculationDiscountResponse(String partnerId, String storeId, String userId, String appId, Integer orderType,
getActivityCalculationDiscountResponse(String partnerId, String storeId, String userId, String appId, Integer orderType,boolean isMember,
List<CartGoods> cartGoodsList, List<ActivityCalculationDiscountRequestDto.CalculationDiscountCoupon> coupons, List<ShoppingCartInfoRequestVo.SendGoods> sendGoodsList,String menuType,Long distributionFee) {
return null;
}
......
......@@ -3,6 +3,8 @@ package cn.freemud.service.thirdparty;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.GetPaidRuleRequestDto;
import cn.freemud.entities.dto.GetPaidRuleResponseDto;
import cn.freemud.entities.dto.user.GetSessionUserInfoDto;
import cn.freemud.entities.vo.CustomerInfoVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -24,4 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
public interface CustomerApplicationClient {
@PostMapping(value = "/membercard/getPaidRule")
BaseResponse<GetPaidRuleResponseDto> getPaidRule(GetPaidRuleRequestDto getPaidRuleRequestDto);
@PostMapping(value = "/user/getSessionUserInfo")
BaseResponse<CustomerInfoVo>getSessionUserInfo(GetSessionUserInfoDto getSessionUserInfoDto);
}
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