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
7ddf01d5
Commit
7ddf01d5
authored
Nov 12, 2020
by
yu.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::fixbug::fix bug about getCouponNameByCode
parent
b8c6416e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+21
-9
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
7ddf01d5
...
...
@@ -20,6 +20,7 @@ import cn.freemud.interceptor.ServiceException;
import
cn.freemud.service.ActivityService
;
import
cn.freemud.service.CouponService
;
import
cn.freemud.service.impl.AssortmentSdkService
;
import
cn.freemud.service.impl.CouponServiceImpl
;
import
cn.freemud.service.impl.FullSubtractionActivityServiceImpl
;
import
cn.freemud.service.impl.mcoffee.calculation.CalculationServiceImpl
;
import
cn.freemud.service.impl.mcoffee.calculation.CouponDiscountCalculation
;
...
...
@@ -106,6 +107,8 @@ public class ShoppingCartMCoffeeServiceImpl {
@Autowired
private
StoreCenterService
storeCenterService
;
@Autowired
private
CouponServiceImpl
couponService
;
@Autowired
private
ProductClient
productClient
;
@Autowired
private
ShoppingCartConvertAdapter
shoppingCartConvertAdapter
;
...
...
@@ -180,7 +183,8 @@ public class ShoppingCartMCoffeeServiceImpl {
String
couponName
=
""
;
if
(
StringUtils
.
isNotEmpty
(
couponCode
)){
CustomerInfoVo
userLoginInfoDto
=
getCustomerInfoVo
(
sessionId
);
couponName
=
getCouponNameByCode
(
couponCode
,
userLoginInfoDto
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
());
couponName
=
getCouponNameByCode
(
couponCode
,
userLoginInfoDto
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
(),
storeId
);
addCartGoods
.
setCouponName
(
couponName
);
}
...
...
@@ -1723,15 +1727,23 @@ public class ShoppingCartMCoffeeServiceImpl {
return
requestVo
;
}
private
String
getCouponNameByCode
(
String
couponCode
,
CustomerInfoVo
userInfo
,
String
menuType
){
private
String
getCouponNameByCode
(
String
couponCode
,
CustomerInfoVo
userInfo
,
String
menuType
,
String
storeId
){
String
couponName
=
""
;
//加购的时候根据券号查询券名称,存入cartGood
CheckSpqInfoRequestDto
checkSpqInfoRequestDto
=
new
CheckSpqInfoRequestDto
(
userInfo
.
getPartnerId
(),
userInfo
.
getStoreId
(),
couponCode
,
menuType
);
CouponService
couponService
=
SDKCommonBaseContextWare
.
getBean
(
CouponService
.
class
);
CheckSpqInfoResponseDto
checkSpqInfoResponseDto
=
couponService
.
checkSpqInfo
(
checkSpqInfoRequestDto
);
if
(
null
!=
checkSpqInfoRequestDto
&&
StringUtils
.
isNotEmpty
(
checkSpqInfoResponseDto
.
getActivityName
())){
couponName
=
checkSpqInfoResponseDto
.
getActivityName
();
String
partnerId
=
userInfo
.
getPartnerId
();
GetMemberCouponRequestVo
requestVo
=
new
GetMemberCouponRequestVo
();
requestVo
.
setPartnerId
(
partnerId
);
requestVo
.
setCouponCode
(
couponCode
);
requestVo
.
setStoreId
(
storeId
);
GetCouponDetailResponseDto
couponDetailResponseDto
=
couponService
.
getMemberCoupon
(
requestVo
);
if
(
couponDetailResponseDto
==
null
||
!
couponDetailResponseDto
.
getResult
().
equals
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_1
)
||
CollectionUtils
.
isEmpty
(
couponDetailResponseDto
.
getDetails
()))
{
return
couponName
;
}
if
(
null
!=
couponDetailResponseDto
&&
CollectionUtils
.
isNotEmpty
(
couponDetailResponseDto
.
getDetails
())
&&
null
!=
couponDetailResponseDto
.
getDetails
().
get
(
0
)){
couponName
=
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getActiveName
();
}
return
couponName
;
}
...
...
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