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
f8eb3d66
Commit
f8eb3d66
authored
Jun 08, 2020
by
dingkai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.freemud.com:order-group-application/order-group into develop
parents
efb0377e
d9f7e148
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
10 deletions
+35
-10
assortment-ordercenter-sdk/pom.xml
+1
-1
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/service/order/OrderCenterSdkServiceImpl.java
+1
-1
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/service/ShoppingCartBaseService.java
+1
-1
order-application-service/pom.xml
+1
-1
order-application-service/src/main/java/cn/freemud/entities/dto/CouponCodeBaseDto.java
+1
-0
order-application-service/src/main/java/cn/freemud/service/impl/CouponActivityServiceImpl.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/user/GetUserScoreUserDetailResponse.java
+7
-2
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartCustomerScoreVo.java
+4
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CustomerScoreService.java
+17
-2
No files found.
assortment-ordercenter-sdk/pom.xml
View file @
f8eb3d66
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<dependency>
<dependency>
<artifactId>
couponcenter-sdk
</artifactId>
<artifactId>
couponcenter-sdk
</artifactId>
<groupId>
com.freemud.application.service.sdk
</groupId>
<groupId>
com.freemud.application.service.sdk
</groupId>
<version>
1.
9.16
-SNAPSHOT
</version>
<version>
1.
10.4
-SNAPSHOT
</version>
<scope>
provided
</scope>
<scope>
provided
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/service/order/OrderCenterSdkServiceImpl.java
View file @
f8eb3d66
...
@@ -221,7 +221,7 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
...
@@ -221,7 +221,7 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
CouponRequest
couponVerificationRequest
=
orderSdkAdapter
.
convert2CouponVerificationRequest
(
orderBean
,
accounts
);
CouponRequest
couponVerificationRequest
=
orderSdkAdapter
.
convert2CouponVerificationRequest
(
orderBean
,
accounts
);
if
(
couponVerificationRequest
!=
null
){
if
(
couponVerificationRequest
!=
null
){
// 核销券新增参数:组织机构
// 核销券新增参数:组织机构
couponVerificationRequest
.
setChannel_
id
s
(
this
.
getOrgIds
(
orderBean
.
getCompanyId
(),
orderBean
.
getShopId
()));
couponVerificationRequest
.
setChannel_
code
s
(
this
.
getOrgIds
(
orderBean
.
getCompanyId
(),
orderBean
.
getShopId
()));
BaseResponse
<
CouponRedeemResponse
>
couponRedeemResponseBaseResponse
=
offlineCouponSdkService
.
couponRedeem
(
couponVerificationRequest
,
""
);
BaseResponse
<
CouponRedeemResponse
>
couponRedeemResponseBaseResponse
=
offlineCouponSdkService
.
couponRedeem
(
couponVerificationRequest
,
""
);
if
(!
ObjectUtils
.
equals
(
RESPONSE_SUCCESS_STR
,
couponRedeemResponseBaseResponse
.
getCode
()))
{
if
(!
ObjectUtils
.
equals
(
RESPONSE_SUCCESS_STR
,
couponRedeemResponseBaseResponse
.
getCode
()))
{
//TODO 失败取消订单,异步冲正库存
//TODO 失败取消订单,异步冲正库存
...
...
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/service/ShoppingCartBaseService.java
View file @
f8eb3d66
...
@@ -410,7 +410,7 @@ public interface ShoppingCartBaseService {
...
@@ -410,7 +410,7 @@ public interface ShoppingCartBaseService {
couponDetailRequest
.
setMerchantId
(
partnerId
);
couponDetailRequest
.
setMerchantId
(
partnerId
);
couponDetailRequest
.
setPartnerId
(
partnerId
);
couponDetailRequest
.
setPartnerId
(
partnerId
);
// 券码新增参数:组织机构
// 券码新增参数:组织机构
couponDetailRequest
.
setChannelCodeList
(
this
.
getOrg
Code
s
(
partnerId
,
storeId
));
couponDetailRequest
.
setChannelCodeList
(
this
.
getOrg
Id
s
(
partnerId
,
storeId
));
OnlineCouponSdkService
onlineCouponSdkService
=
SDKCommonBaseContextWare
.
getBean
(
OnlineCouponSdkService
.
class
);
OnlineCouponSdkService
onlineCouponSdkService
=
SDKCommonBaseContextWare
.
getBean
(
OnlineCouponSdkService
.
class
);
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
CouponDetailResponse
>
couponDetailResponse
=
onlineCouponSdkService
.
allDetail
(
couponDetailRequest
,
appKey
,
trackingNo
);
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
CouponDetailResponse
>
couponDetailResponse
=
onlineCouponSdkService
.
allDetail
(
couponDetailRequest
,
appKey
,
trackingNo
);
if
(
couponDetailResponse
==
null
||
!
CartResponseConstant
.
SUCCESS
.
getCode
().
equals
(
couponDetailResponse
.
getCode
())
||
couponDetailResponse
.
getData
()
==
null
||
CollectionUtils
.
isEmpty
(
couponDetailResponse
.
getData
().
getDetails
()))
{
if
(
couponDetailResponse
==
null
||
!
CartResponseConstant
.
SUCCESS
.
getCode
().
equals
(
couponDetailResponse
.
getCode
())
||
couponDetailResponse
.
getData
()
==
null
||
CollectionUtils
.
isEmpty
(
couponDetailResponse
.
getData
().
getDetails
()))
{
...
...
order-application-service/pom.xml
View file @
f8eb3d66
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<dependency>
<dependency>
<artifactId>
couponcenter-sdk
</artifactId>
<artifactId>
couponcenter-sdk
</artifactId>
<groupId>
com.freemud.application.service.sdk
</groupId>
<groupId>
com.freemud.application.service.sdk
</groupId>
<version>
1.
8.14.RELEASE
</version>
<version>
1.
10.4-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.freemud
</groupId>
<groupId>
cn.freemud
</groupId>
...
...
order-application-service/src/main/java/cn/freemud/entities/dto/CouponCodeBaseDto.java
View file @
f8eb3d66
...
@@ -27,5 +27,6 @@ public class CouponCodeBaseDto {
...
@@ -27,5 +27,6 @@ public class CouponCodeBaseDto {
// 组织机构ID,(String 类型的集合)
// 组织机构ID,(String 类型的集合)
private
String
[]
channel_ids
;
private
String
[]
channel_ids
;
private
String
[]
channel_codes
;
}
}
order-application-service/src/main/java/cn/freemud/service/impl/CouponActivityServiceImpl.java
View file @
f8eb3d66
...
@@ -98,7 +98,7 @@ public class CouponActivityServiceImpl implements CouponActivityService {
...
@@ -98,7 +98,7 @@ public class CouponActivityServiceImpl implements CouponActivityService {
||
OrderAccountType
.
DISCOUNT_COUPON
.
getCode
().
equals
(
accountBean
.
getType
()))
{
||
OrderAccountType
.
DISCOUNT_COUPON
.
getCode
().
equals
(
accountBean
.
getType
()))
{
CouponCodeVerificationDto
couponCodeVerificationDto
=
couponAdapter
.
convert2CouponCodeVerificationDto
(
activityChannelEnum
,
accountBean
.
getAccountId
(),
orderBean
.
getOid
(),
orderBean
.
getCompanyId
(),
orderBean
.
getShopId
(),
orderBean
.
getUserId
(),
products
,
accountBean
.
getPrice
().
intValue
());
CouponCodeVerificationDto
couponCodeVerificationDto
=
couponAdapter
.
convert2CouponCodeVerificationDto
(
activityChannelEnum
,
accountBean
.
getAccountId
(),
orderBean
.
getOid
(),
orderBean
.
getCompanyId
(),
orderBean
.
getShopId
(),
orderBean
.
getUserId
(),
products
,
accountBean
.
getPrice
().
intValue
());
// 核销券新增参数:组织机构ID
// 核销券新增参数:组织机构ID
couponCodeVerificationDto
.
setChannel_
id
s
(
storeService
.
getOrgIdsArr
(
orderBean
.
getCompanyId
(),
orderBean
.
getShopId
()));
couponCodeVerificationDto
.
setChannel_
code
s
(
storeService
.
getOrgIdsArr
(
orderBean
.
getCompanyId
(),
orderBean
.
getShopId
()));
try
{
try
{
//71.券核销
//71.券核销
CouponCodeResponseDto
couponCodeResponseDto
=
couponOfflineClient
.
verification
(
couponCodeVerificationDto
);
CouponCodeResponseDto
couponCodeResponseDto
=
couponOfflineClient
.
verification
(
couponCodeVerificationDto
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/user/GetUserScoreUserDetailResponse.java
View file @
f8eb3d66
...
@@ -32,8 +32,7 @@ public class GetUserScoreUserDetailResponse {
...
@@ -32,8 +32,7 @@ public class GetUserScoreUserDetailResponse {
private
Integer
reducePriceLimit
;
private
Integer
reducePriceLimit
;
private
Integer
getReduceScoreLimit
;
private
Integer
getReduceScoreLimit
;
/**
/**
* 积分抵扣状态
* 积分抵扣状态 1积分可用 2积分不足 3 积分抵扣开关禁用 4、订单金额不满足开启积分抵现要求
* 1积分可用 2积分不足 3 积分抵扣开关禁用
*/
*/
private
Integer
scoreState
;
private
Integer
scoreState
;
/**
/**
...
@@ -41,6 +40,11 @@ public class GetUserScoreUserDetailResponse {
...
@@ -41,6 +40,11 @@ public class GetUserScoreUserDetailResponse {
* 例如10积分抵扣5元为 10:5
* 例如10积分抵扣5元为 10:5
*/
*/
private
String
scoreReduceRate
;
private
String
scoreReduceRate
;
/**
* 是否可优惠同享{0所有订单均可抵扣,1仅限原价订单才可抵扣(享受了促销活动、或使用了优惠券,不能进行积分抵扣)
*/
private
Integer
overlayOffers
;
}
}
}
}
\ No newline at end of file
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartCustomerScoreVo.java
View file @
f8eb3d66
...
@@ -22,4 +22,8 @@ public class ShoppingCartCustomerScoreVo {
...
@@ -22,4 +22,8 @@ public class ShoppingCartCustomerScoreVo {
private
Integer
reduceAmount
;
private
Integer
reduceAmount
;
private
Integer
useScore
;
private
Integer
useScore
;
private
String
customerScorePrompt
;
private
String
customerScorePrompt
;
/**
* 是否可优惠同享{0所有订单均可抵扣,1仅限原价订单才可抵扣(享受了促销活动、或使用了优惠券,不能进行积分抵扣)
*/
private
String
overlayOffers
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
f8eb3d66
...
@@ -237,7 +237,7 @@ public class CouponServiceImpl implements CouponService {
...
@@ -237,7 +237,7 @@ public class CouponServiceImpl implements CouponService {
map
.
put
(
Finals
.
ACTION
,
"code.allDetails"
);
map
.
put
(
Finals
.
ACTION
,
"code.allDetails"
);
// 券码接口新增参数:组织机构(多个用英文逗号分离)
// 券码接口新增参数:组织机构(多个用英文逗号分离)
String
channelIds
=
commonService
.
getOrgIdsAsString
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
());
String
channelIds
=
commonService
.
getOrgIdsAsString
(
requestVo
.
getPartnerId
(),
requestVo
.
getStoreId
());
map
.
put
(
Finals
.
CHANNEL_
ID
_LIST
,
channelIds
);
map
.
put
(
Finals
.
CHANNEL_
CODE
_LIST
,
channelIds
);
String
appSecret
=
getAppSecret
(
requestVo
.
getPartnerId
());
String
appSecret
=
getAppSecret
(
requestVo
.
getPartnerId
());
String
sign
=
SignUtil
.
createMD5Sign
(
map
,
appSecret
);
String
sign
=
SignUtil
.
createMD5Sign
(
map
,
appSecret
);
map
.
put
(
Finals
.
SIGN
,
sign
);
map
.
put
(
Finals
.
SIGN
,
sign
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CustomerScoreService.java
View file @
f8eb3d66
...
@@ -14,7 +14,7 @@ import cn.freemud.service.thirdparty.CustomScoreClient;
...
@@ -14,7 +14,7 @@ import cn.freemud.service.thirdparty.CustomScoreClient;
import
cn.freemud.utils.LogUtil
;
import
cn.freemud.utils.LogUtil
;
import
com.freemud.application.sdk.api.constant.FMStatusCode
;
import
com.freemud.application.sdk.api.constant.FMStatusCode
;
import
com.freemud.application.sdk.api.log.ErrorLog
;
import
com.freemud.application.sdk.api.log.ErrorLog
;
import
org.apache.commons.lang.
Object
Utils
;
import
org.apache.commons.lang.
String
Utils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -65,9 +65,21 @@ public class CustomerScoreService implements IPromotionService {
...
@@ -65,9 +65,21 @@ public class CustomerScoreService implements IPromotionService {
customerScoreVo
.
setCurrentScore
(
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()));
customerScoreVo
.
setCurrentScore
(
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()));
customerScoreVo
.
setReduceAmount
(
getValue
(
userScoreUseDetail
.
getResult
().
getReduceAmount
()));
customerScoreVo
.
setReduceAmount
(
getValue
(
userScoreUseDetail
.
getResult
().
getReduceAmount
()));
customerScoreVo
.
setReducePriceLimit
(
getValue
(
userScoreUseDetail
.
getResult
().
getReducePriceLimit
()));
customerScoreVo
.
setReducePriceLimit
(
getValue
(
userScoreUseDetail
.
getResult
().
getReducePriceLimit
()));
customerScoreVo
.
setScoreReduceState
(
userScoreUseDetail
.
getResult
().
getScoreState
());
// 是否可优惠同享{0所有订单均可抵扣,1仅限原价订单才可抵扣(享受了促销活动、或使用了优惠券,不能进行积分抵扣
if
(
userScoreUseDetail
.
getResult
().
getOverlayOffers
()
==
0
)
{
customerScoreVo
.
setScoreReduceState
(
userScoreUseDetail
.
getResult
().
getScoreState
());
}
else
{
if
(
StringUtils
.
isNotBlank
(
shoppingCartInfoRequestVo
.
getCouponCode
())
||
calculationDiscountResult
.
getTotalDiscountAmount
().
intValue
()
>
0
)
{
//积分抵扣开关禁用
customerScoreVo
.
setScoreReduceState
(
3
);
discountAmount
=
0
;
}
}
customerScoreVo
.
setUseScore
(
getValue
(
userScoreUseDetail
.
getResult
().
getUseScore
()));
customerScoreVo
.
setUseScore
(
getValue
(
userScoreUseDetail
.
getResult
().
getUseScore
()));
String
msg
=
""
;
String
msg
=
""
;
// 积分抵扣状态 1积分可用 2积分不足 3 积分抵扣开关禁用 4、订单金额不满足开启积分抵现要求
switch
(
userScoreUseDetail
.
getResult
().
getScoreState
())
{
switch
(
userScoreUseDetail
.
getResult
().
getScoreState
())
{
case
1
:
case
1
:
msg
=
String
.
format
(
"共%s积分,可用%s积分抵¥%s"
,
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()),
getValue
(
userScoreUseDetail
.
getResult
().
getUseScore
()),
((
double
)
userScoreUseDetail
.
getResult
().
getReduceAmount
())
/
100
);
msg
=
String
.
format
(
"共%s积分,可用%s积分抵¥%s"
,
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()),
getValue
(
userScoreUseDetail
.
getResult
().
getUseScore
()),
((
double
)
userScoreUseDetail
.
getResult
().
getReduceAmount
())
/
100
);
...
@@ -76,6 +88,9 @@ public class CustomerScoreService implements IPromotionService {
...
@@ -76,6 +88,9 @@ public class CustomerScoreService implements IPromotionService {
String
[]
split
=
userScoreUseDetail
.
getResult
().
getScoreReduceRate
().
split
(
":"
);
String
[]
split
=
userScoreUseDetail
.
getResult
().
getScoreReduceRate
().
split
(
":"
);
msg
=
String
.
format
(
"共%s积分,每%s积分可抵¥%s"
,
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()),
split
[
0
],
split
[
1
]);
msg
=
String
.
format
(
"共%s积分,每%s积分可抵¥%s"
,
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()),
split
[
0
],
split
[
1
]);
break
;
break
;
case
3
:
msg
=
"已享受优惠,无法再参与积分抵扣"
;
break
;
case
4
:
case
4
:
msg
=
String
.
format
(
"共%s积分,订单满¥%s可开启积分抵现"
,
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()),
((
double
)
userScoreUseDetail
.
getResult
().
getReducePriceLimit
())
/
100
);
msg
=
String
.
format
(
"共%s积分,订单满¥%s可开启积分抵现"
,
getValue
(
userScoreUseDetail
.
getResult
().
getCurrentScore
()),
((
double
)
userScoreUseDetail
.
getResult
().
getReducePriceLimit
())
/
100
);
break
;
break
;
...
...
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