Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
fa8ee536
Commit
fa8ee536
authored
Sep 11, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员券查询标识
parent
bf63ad93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
+10
-7
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
View file @
fa8ee536
...
@@ -85,7 +85,7 @@ public enum ResponseResult {
...
@@ -85,7 +85,7 @@ public enum ResponseResult {
SHOPPING_CART_SHOP_ID_NOT_EMPTY
(
"44019"
,
"门店编号不能为空"
),
SHOPPING_CART_SHOP_ID_NOT_EMPTY
(
"44019"
,
"门店编号不能为空"
),
SHOPPING_CART_COUPON_CAN_NOT_USE_THIS_SHOP
(
"44020"
,
"券不适用于该门店"
),
SHOPPING_CART_COUPON_CAN_NOT_USE_THIS_SHOP
(
"44020"
,
"券不适用于该门店"
),
SHOPPING_CART_SEAT_EMPTY
(
"44020"
,
"键位为空"
),
SHOPPING_CART_SEAT_EMPTY
(
"44020"
,
"键位为空"
),
SHOPPING_CART_COUPON_USED
(
"44021"
,
"
商品券已使用
"
),
SHOPPING_CART_COUPON_USED
(
"44021"
,
"
优惠券已加入餐盘
"
),
/**
/**
* 订单状态码
* 订单状态码
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
fa8ee536
...
@@ -334,7 +334,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -334,7 +334,7 @@ public class ShoppingCartMCoffeeServiceImpl {
String
appId
=
shoppingCartInfoRequestVo
.
getAppId
();
String
appId
=
shoppingCartInfoRequestVo
.
getAppId
();
//非商品券券号
//非商品券券号
String
couponCode
=
shoppingCartInfoRequestVo
.
getCouponCode
();
String
couponCode
=
shoppingCartInfoRequestVo
.
getCouponCode
();
//
String menuType = shoppingCartInfoRequestVo.getMenuType();
String
menuType
=
shoppingCartInfoRequestVo
.
getMenuType
();
Integer
orderType
=
shoppingCartInfoRequestVo
.
getOrderType
();
Integer
orderType
=
shoppingCartInfoRequestVo
.
getOrderType
();
// String receiveId = shoppingCartInfoRequestVo.getReceiveId();
// String receiveId = shoppingCartInfoRequestVo.getReceiveId();
...
@@ -344,7 +344,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -344,7 +344,7 @@ public class ShoppingCartMCoffeeServiceImpl {
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_ADD_INVAILD
);
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_ADD_INVAILD
);
}
}
// 获取购物车商品-查询用户券-券码校验可用券
// 获取购物车商品-查询用户券-券码校验可用券
availableCoupon
=
couponDiscountCalculation
.
availableCoupon
(
partnerId
,
storeId
,
userId
,
thirdPartyMemberID
,
unionId
,
appId
,
couponCode
,
orderType
,
cartGoodsList
);
availableCoupon
=
couponDiscountCalculation
.
availableCoupon
(
partnerId
,
storeId
,
userId
,
thirdPartyMemberID
,
unionId
,
appId
,
couponCode
,
orderType
,
menuType
,
cartGoodsList
);
return
ResponseUtil
.
success
(
availableCoupon
);
return
ResponseUtil
.
success
(
availableCoupon
);
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
View file @
fa8ee536
...
@@ -8,23 +8,19 @@ import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto;
...
@@ -8,23 +8,19 @@ import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.enums.*
;
import
cn.freemud.enums.*
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.redis.RedisCache
;
import
cn.freemud.service.CommonService
;
import
cn.freemud.service.CommonService
;
import
cn.freemud.service.impl.mcoffee.entity.CouponAvailableReq
;
import
cn.freemud.service.impl.mcoffee.entity.CouponAvailableReq
;
import
cn.freemud.service.impl.mcoffee.entity.CouponAvailableResp
;
import
cn.freemud.service.impl.mcoffee.entity.CouponAvailableResp
;
import
cn.freemud.service.impl.mcoffee.entity.CouponProductVo
;
import
cn.freemud.service.impl.mcoffee.entity.CouponProductVo
;
import
cn.freemud.service.impl.mcoffee.entity.CouponState
;
import
cn.freemud.service.impl.mcoffee.entity.CouponState
;
import
cn.freemud.service.thirdparty.CardBinClient
;
import
cn.freemud.service.thirdparty.CouponClient
;
import
cn.freemud.service.thirdparty.CouponClient
;
import
cn.freemud.service.thirdparty.CustomerExtendClient
;
import
cn.freemud.service.thirdparty.CustomerExtendClient
;
import
cn.freemud.utils.BarcodeUtil
;
import
cn.freemud.utils.BarcodeUtil
;
import
cn.freemud.utils.LogUtil
;
import
cn.freemud.utils.LogUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.MapUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -70,6 +66,10 @@ public class CouponDiscountCalculation {
...
@@ -70,6 +66,10 @@ public class CouponDiscountCalculation {
private
String
appid
;
private
String
appid
;
private
static
final
String
mcafe
=
"mccafe"
;
private
static
final
String
mcafePickup
=
"mccafe_pickup"
;
/**
/**
* 优惠计算
* 优惠计算
*/
*/
...
@@ -203,7 +203,7 @@ public class CouponDiscountCalculation {
...
@@ -203,7 +203,7 @@ public class CouponDiscountCalculation {
* 可选优惠券
* 可选优惠券
*/
*/
public
ActivityClassifyCouponBean
availableCoupon
(
String
partnerId
,
String
storeId
,
String
userId
,
String
thirdPartyMemberId
,
String
unionId
,
String
appId
public
ActivityClassifyCouponBean
availableCoupon
(
String
partnerId
,
String
storeId
,
String
userId
,
String
thirdPartyMemberId
,
String
unionId
,
String
appId
,
String
couponCode
,
Integer
orderType
,
List
<
CartGoods
>
cartGoods
)
{
,
String
couponCode
,
Integer
orderType
,
String
menuType
,
List
<
CartGoods
>
cartGoods
)
{
// List<CartGoods> tmpCartGoods = cartGoods.parallelStream().filter(k -> StringUtils.isBlank(k.getCouponCode())).collect(Collectors.toList());
// List<CartGoods> tmpCartGoods = cartGoods.parallelStream().filter(k -> StringUtils.isBlank(k.getCouponCode())).collect(Collectors.toList());
boolean
hasGoodsCoupon
=
false
;
boolean
hasGoodsCoupon
=
false
;
...
@@ -214,8 +214,11 @@ public class CouponDiscountCalculation {
...
@@ -214,8 +214,11 @@ public class CouponDiscountCalculation {
getMemberCouponListRequestDto
.
setAppId
(
appId
);
getMemberCouponListRequestDto
.
setAppId
(
appId
);
getMemberCouponListRequestDto
.
setThirdPartyMemberId
(
thirdPartyMemberId
);
getMemberCouponListRequestDto
.
setThirdPartyMemberId
(
thirdPartyMemberId
);
getMemberCouponListRequestDto
.
setUnionId
(
unionId
);
getMemberCouponListRequestDto
.
setUnionId
(
unionId
);
//麦咖啡固定值
String
tag
=
mcafe
;
getMemberCouponListRequestDto
.
setTag
(
"mccafe"
);
if
(
"saas"
.
equals
(
menuType
)){
tag
=
mcafePickup
;
}
getMemberCouponListRequestDto
.
setTag
(
tag
);
getMemberCouponListRequestDto
.
setPageNum
(
1
);
getMemberCouponListRequestDto
.
setPageNum
(
1
);
getMemberCouponListRequestDto
.
setPageSize
(
Integer
.
MAX_VALUE
);
getMemberCouponListRequestDto
.
setPageSize
(
Integer
.
MAX_VALUE
);
GetMemberCouponListResponseDto
.
Result
result
=
getMemberCouponList
(
getMemberCouponListRequestDto
);
GetMemberCouponListResponseDto
.
Result
result
=
getMemberCouponList
(
getMemberCouponListRequestDto
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment