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
9a41a82f
Commit
9a41a82f
authored
Jan 04, 2022
by
查志伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20211223-code_v4接口查询优化-zhiwei.zha'
parents
46d96f62
127e8b36
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/coupon/Finals.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/coupon/KgdCouponServiceImpl.java
+4
-6
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+4
-5
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/coupon/Finals.java
View file @
9a41a82f
...
@@ -28,6 +28,7 @@ public class Finals {
...
@@ -28,6 +28,7 @@ public class Finals {
public
static
final
String
MEMBER_ID
=
"member_id"
;
public
static
final
String
MEMBER_ID
=
"member_id"
;
public
static
final
String
CHANNEL_ID_LIST
=
"channelIds"
;
public
static
final
String
CHANNEL_ID_LIST
=
"channelIds"
;
public
static
final
String
CHANNEL_CODE_LIST
=
"channelCodes"
;
public
static
final
String
CHANNEL_CODE_LIST
=
"channelCodes"
;
public
static
final
String
IS_QUERY_STORE
=
"isQueryStore"
;
public
static
final
Integer
PRODUCT_COUPON
=
0
;
public
static
final
Integer
PRODUCT_COUPON
=
0
;
public
static
final
Integer
CASH_COUPON
=
1
;
public
static
final
Integer
CASH_COUPON
=
1
;
public
static
final
Integer
ELSE_COUPON
=
2
;
public
static
final
Integer
ELSE_COUPON
=
2
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/coupon/KgdCouponServiceImpl.java
View file @
9a41a82f
...
@@ -23,7 +23,6 @@ import cn.freemud.redis.RedisCache;
...
@@ -23,7 +23,6 @@ import cn.freemud.redis.RedisCache;
import
cn.freemud.service.thirdparty.CouponOnlineClient
;
import
cn.freemud.service.thirdparty.CouponOnlineClient
;
import
cn.freemud.utils.RedisUtil
;
import
cn.freemud.utils.RedisUtil
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductType
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductType
;
import
com.freemud.application.sdk.api.util.SignUtil
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
ma.glasnost.orika.MapperFacade
;
import
ma.glasnost.orika.MapperFacade
;
...
@@ -61,7 +60,7 @@ public class KgdCouponServiceImpl implements CouponService {
...
@@ -61,7 +60,7 @@ public class KgdCouponServiceImpl implements CouponService {
@Override
@Override
public
CouponDetailBO
getCouponDetail
(
GetCouponDetailBO
getCouponDetailBO
)
{
public
CouponDetailBO
getCouponDetail
(
GetCouponDetailBO
getCouponDetailBO
)
{
Map
<
String
,
String
>
map
=
new
TreeMap
<>();
Map
<
String
,
Object
>
map
=
new
TreeMap
<>();
if
(
StringUtils
.
isBlank
(
getCouponDetailBO
.
getPartnerId
())
||
StringUtils
.
isBlank
(
getCouponDetailBO
.
getCouponCode
()))
{
if
(
StringUtils
.
isBlank
(
getCouponDetailBO
.
getPartnerId
())
||
StringUtils
.
isBlank
(
getCouponDetailBO
.
getCouponCode
()))
{
return
null
;
return
null
;
}
}
...
@@ -73,13 +72,12 @@ public class KgdCouponServiceImpl implements CouponService {
...
@@ -73,13 +72,12 @@ public class KgdCouponServiceImpl implements CouponService {
GetStoreBO
getStoreBO
=
new
GetStoreBO
();
GetStoreBO
getStoreBO
=
new
GetStoreBO
();
getStoreBO
.
setPartnerId
(
getCouponDetailBO
.
getPartnerId
());
getStoreBO
.
setPartnerId
(
getCouponDetailBO
.
getPartnerId
());
getStoreBO
.
setStoreCode
(
getCouponDetailBO
.
getStoreCode
());
getStoreBO
.
setStoreCode
(
getCouponDetailBO
.
getStoreCode
());
// 由于门店服务老是慢,这个参数可以控制不查门店服务, 返回的数据也不需要门店数据
map
.
put
(
Finals
.
IS_QUERY_STORE
,
false
);
List
<
String
>
orgIds
=
storeService
.
getOrgIds
(
getStoreBO
);
List
<
String
>
orgIds
=
storeService
.
getOrgIds
(
getStoreBO
);
String
channelIds
=
CollectionUtils
.
isNotEmpty
(
orgIds
)
?
Joiner
.
on
(
","
).
join
(
orgIds
)
:
""
;
String
channelIds
=
CollectionUtils
.
isNotEmpty
(
orgIds
)
?
Joiner
.
on
(
","
).
join
(
orgIds
)
:
""
;
map
.
put
(
Finals
.
CHANNEL_ID_LIST
,
channelIds
);
map
.
put
(
Finals
.
CHANNEL_ID_LIST
,
channelIds
);
String
appSecret
=
getAppSecret
(
getCouponDetailBO
.
getPartnerId
());
map
.
put
(
Finals
.
SIGN
,
"adapterV4Skip"
+
getCouponDetailBO
.
getPartnerId
());
String
sign
=
SignUtil
.
createMD5Sign
(
map
,
appSecret
);
map
.
put
(
Finals
.
SIGN
,
sign
);
GetCouponDetailResponseDto
responseDto
=
couponOnlineClient
.
getCouponDetails
(
map
);
GetCouponDetailResponseDto
responseDto
=
couponOnlineClient
.
getCouponDetails
(
map
);
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_1
.
equals
(
responseDto
.
getResult
()))
{
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_1
.
equals
(
responseDto
.
getResult
()))
{
return
convert2CouponDetailBO
(
responseDto
);
return
convert2CouponDetailBO
(
responseDto
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
9a41a82f
...
@@ -40,7 +40,6 @@ import com.freemud.application.sdk.api.productcenter.constant.ResponseConstant;
...
@@ -40,7 +40,6 @@ import com.freemud.application.sdk.api.productcenter.constant.ResponseConstant;
import
com.freemud.application.sdk.api.util.SignUtil
;
import
com.freemud.application.sdk.api.util.SignUtil
;
import
com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum
;
import
com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
;
import
com.freemud.sdk.api.assortment.shoppingcart.util.ShoppingSdkLogUtil
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.ObjectUtils
;
...
@@ -133,7 +132,7 @@ public class CouponServiceImpl implements CouponService {
...
@@ -133,7 +132,7 @@ public class CouponServiceImpl implements CouponService {
@Override
@Override
public
GetCouponDetailResponseDto
getMemberCoupon
(
GetMemberCouponRequestVo
requestVo
)
{
public
GetCouponDetailResponseDto
getMemberCoupon
(
GetMemberCouponRequestVo
requestVo
)
{
//券详情查券服务
//券详情查券服务
Map
<
String
,
String
>
map
=
new
TreeMap
<
String
,
String
>();
Map
<
String
,
Object
>
map
=
new
TreeMap
<
>();
if
(
StringUtils
.
isBlank
(
requestVo
.
getPartnerId
())
||
StringUtils
.
isBlank
(
requestVo
.
getCouponCode
()))
{
if
(
StringUtils
.
isBlank
(
requestVo
.
getPartnerId
())
||
StringUtils
.
isBlank
(
requestVo
.
getCouponCode
()))
{
return
null
;
return
null
;
}
}
...
@@ -148,9 +147,9 @@ public class CouponServiceImpl implements CouponService {
...
@@ -148,9 +147,9 @@ public class CouponServiceImpl implements CouponService {
map
.
put
(
Finals
.
STOREID
,
requestVo
.
getStoreId
());
map
.
put
(
Finals
.
STOREID
,
requestVo
.
getStoreId
());
map
.
put
(
Finals
.
STORECHECK
,
"0"
);
map
.
put
(
Finals
.
STORECHECK
,
"0"
);
}
}
String
appSecret
=
getAppSecret
(
requestVo
.
getPartnerId
());
// 由于门店服务老是慢,这个参数可以控制不查门店服务, 返回的数据也不需要门店数据
String
sign
=
SignUtil
.
createMD5Sign
(
map
,
appSecret
);
map
.
put
(
Finals
.
IS_QUERY_STORE
,
false
);
map
.
put
(
Finals
.
SIGN
,
sign
);
map
.
put
(
Finals
.
SIGN
,
"adapterV4Skip"
+
requestVo
.
getPartnerId
()
);
GetCouponDetailResponseDto
responseDto
=
couponOnlineClient
.
getCouponDetails
(
map
);
GetCouponDetailResponseDto
responseDto
=
couponOnlineClient
.
getCouponDetails
(
map
);
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_1
.
equals
(
responseDto
.
getResult
()))
{
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS_1
.
equals
(
responseDto
.
getResult
()))
{
return
responseDto
;
return
responseDto
;
...
...
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