Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
c52e533d
Commit
c52e533d
authored
Nov 10, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改seisson
parent
e4d49c52
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
22 deletions
+22
-22
application-dev.yml
share-admin/src/main/resources/application-dev.yml
+1
-2
application-prod.yml
share-admin/src/main/resources/application-prod.yml
+4
-0
application-test.yml
share-admin/src/main/resources/application-test.yml
+3
-0
application-dev.yml
share-front/src/main/resources/application-dev.yml
+1
-2
application-prod.yml
share-front/src/main/resources/application-prod.yml
+2
-4
application-test.yml
share-front/src/main/resources/application-test.yml
+2
-4
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+9
-10
No files found.
share-admin/src/main/resources/application-dev.yml
View file @
c52e533d
...
...
@@ -188,5 +188,4 @@ meituan:
dianping
:
appKey
:
a59ea57cd1eb4737
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
authCode
:
abcdefghijklmnopqrstuvwxyz
openShoopUuid
:
5067d2db1311d32a0ff366c79a73df51
share-admin/src/main/resources/application-prod.yml
View file @
c52e533d
...
...
@@ -178,3 +178,7 @@ xss:
excludes
:
/system/notice
# 匹配链接
urlPatterns
:
/system/*,/monitor/*,/tool/*
dianping
:
appKey
:
a59ea57cd1eb4737
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
share-admin/src/main/resources/application-test.yml
View file @
c52e533d
...
...
@@ -178,3 +178,6 @@ xss:
excludes
:
/system/notice
# 匹配链接
urlPatterns
:
/system/*,/monitor/*,/tool/*
dianping
:
appKey
:
a59ea57cd1eb4737
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
share-front/src/main/resources/application-dev.yml
View file @
c52e533d
...
...
@@ -190,5 +190,4 @@ meituan:
dianping
:
appKey
:
a59ea57cd1eb4737
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
authCode
:
abcdefghijklmnopqrstuvwxyz
openShoopUuid
:
cf0eb0891f9e366bcda10cb7f6f23b25
authCode
:
6be3e11e19d0b3595046cc2cefbf05da790be35d
share-front/src/main/resources/application-prod.yml
View file @
c52e533d
...
...
@@ -190,6 +190,4 @@ meituan:
appAuthToken
:
abcdefghijklmnopqrstuvwxyz
dianping
:
appKey
:
a59ea57cd1eb4737
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
authCode
:
abcdefghijklmnopqrstuvwxyz
openShoopUuid
:
cf0eb0891f9e366bcda10cb7f6f23b25
\ No newline at end of file
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
\ No newline at end of file
share-front/src/main/resources/application-test.yml
View file @
c52e533d
...
...
@@ -190,6 +190,4 @@ meituan:
appAuthToken
:
abcdefghijklmnopqrstuvwxyz
dianping
:
appKey
:
a59ea57cd1eb4737
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
authCode
:
abcdefghijklmnopqrstuvwxyz
openShoopUuid
:
cf0eb0891f9e366bcda10cb7f6f23b25
\ No newline at end of file
appSecret
:
0caaabb7fda1c1be46636171548dcf510d1fb706
\ No newline at end of file
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
c52e533d
...
...
@@ -39,8 +39,6 @@ public class QPServiceImpl implements QPService {
private
String
APP_KEY
;
@Value
(
"${dianping.appSecret}"
)
private
String
APP_SECRET
;
@Value
(
"${dianping.openShoopUuid}"
)
private
String
OPEN_SHOP_UUID
;
@Autowired
...
...
@@ -60,15 +58,16 @@ public class QPServiceImpl implements QPService {
if
(
sCoupon
==
null
)
{
throw
new
RuntimeException
(
"未找到对应的优惠券"
);
}
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
TuangouReceiptPrepareResponseEntityVo
response
=
new
TuangouReceiptPrepareResponseEntityVo
();
//查询领取记录表
LambdaQueryWrapper
<
SConsumerCoupon
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SConsumerCoupon:
:
getDealId
,
prepare
.
getDeal_id
());
queryWrapper
.
eq
(
SConsumerCoupon:
:
getConsumerId
,
user
.
getId
());
SConsumerCoupon
one
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
one
))
{
throw
new
RuntimeException
(
"该券码已被使用"
);
}
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
if
(
ObjectUtils
.
isNotEmpty
(
sCoupon
))
{
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
sConsumerCoupon
.
setDealId
(
prepare
.
getDeal_id
());
...
...
@@ -153,7 +152,7 @@ public class QPServiceImpl implements QPService {
*/
@Override
public
TuangouReceiptPrepareResponseEntity
prepare
(
String
code
,
String
openShopUuid
)
{
TuangouReceiptPrepareRequest
request
=
new
TuangouReceiptPrepareRequest
(
APP_KEY
,
APP_SECRET
,
"
04bdcb2ccac3075eac0f60680587be2138c6c362
"
,
code
,
""
,
openShopUuid
);
TuangouReceiptPrepareRequest
request
=
new
TuangouReceiptPrepareRequest
(
APP_KEY
,
APP_SECRET
,
"
5bf98bb4c6c0d8ecef94f0882b40e00c5a248abc
"
,
code
,
""
,
openShopUuid
);
TuangouReceiptPrepare
tuangouReceiptPrepare
=
new
TuangouReceiptPrepare
(
request
);
DefaultOpenAPIClient
client
=
new
DefaultOpenAPIClient
();
TuangouReceiptPrepareResponse
invoke
=
client
.
invoke
(
tuangouReceiptPrepare
);
...
...
@@ -171,7 +170,7 @@ public class QPServiceImpl implements QPService {
public
List
<
TuangouReceiptConsumeResponseEntity
>
consume
(
String
code
,
int
count
,
String
openShopUuid
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
String
requestid
=
UUID
.
randomUUID
().
toString
();
TuangouReceiptConsumeRequest
request
=
new
TuangouReceiptConsumeRequest
(
APP_KEY
,
APP_SECRET
,
"
04bdcb2ccac3075eac0f60680587be2138c6c362
"
,
TuangouReceiptConsumeRequest
request
=
new
TuangouReceiptConsumeRequest
(
APP_KEY
,
APP_SECRET
,
"
5bf98bb4c6c0d8ecef94f0882b40e00c5a248abc
"
,
requestid
,
code
,
count
,
openShopUuid
,
user
.
getAccount
(),
user
.
getNickName
());
DefaultOpenAPIClient
openAPIClient
=
new
DefaultOpenAPIClient
();
...
...
@@ -190,7 +189,7 @@ public class QPServiceImpl implements QPService {
@Override
public
List
<
TuangouReceiptReverseConsumeResponseEntity
>
reverseconsume
(
String
code
,
Long
appDealId
,
String
openShopUuid
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
TuangouReceiptReverseConsumeRequest
tuangouReceiptReverseConsumeRequest
=
new
TuangouReceiptReverseConsumeRequest
(
APP_KEY
,
APP_SECRET
,
"
04bdcb2ccac3075eac0f60680587be2138c6c362
"
,
TuangouReceiptReverseConsumeRequest
tuangouReceiptReverseConsumeRequest
=
new
TuangouReceiptReverseConsumeRequest
(
APP_KEY
,
APP_SECRET
,
"
5bf98bb4c6c0d8ecef94f0882b40e00c5a248abc
"
,
String
.
valueOf
(
appDealId
),
code
,
openShopUuid
,
user
.
getAccount
(),
user
.
getNickName
());
DefaultOpenAPIClient
openAPIClient
=
new
DefaultOpenAPIClient
();
...
...
@@ -210,7 +209,7 @@ public class QPServiceImpl implements QPService {
public
TuangouReceiptGetConsumedReponseEntity
getconsumed
(
String
code
,
String
openShopUuid
)
{
DefaultOpenAPIClient
openAPIClient
=
new
DefaultOpenAPIClient
();
TuangouReceiptGetConsumedRequest
request
=
new
TuangouReceiptGetConsumedRequest
(
APP_KEY
,
APP_SECRET
,
"
04bdcb2ccac3075eac0f60680587be2138c6c362
"
,
code
,
openShopUuid
);
"
5bf98bb4c6c0d8ecef94f0882b40e00c5a248abc
"
,
code
,
openShopUuid
);
TuangouReceiptGetConsumed
tuangouReceiptGetConsumed
=
new
TuangouReceiptGetConsumed
(
request
);
TuangouReceiptGetConsumedReponse
response
=
openAPIClient
.
invoke
(
tuangouReceiptGetConsumed
);
if
(
response
.
getCode
()
!=
200
)
{
...
...
@@ -223,11 +222,11 @@ public class QPServiceImpl implements QPService {
public
String
oauthToken
(
String
authCode
)
{
DefaultOpenAPIClient
openAPIClient
=
new
DefaultOpenAPIClient
();
DynamicTokenRequest
request
=
new
DynamicTokenRequest
(
APP_KEY
,
APP_SECRET
,
GrantType
.
AUTHORIZATION_CODE
.
getValue
(),
"6be3e11e19d0b3595046cc2cefbf05da790be35d"
);
APP_SECRET
,
GrantType
.
AUTHORIZATION_CODE
.
getValue
(),
authCode
);
DynamicToken
dynamicToken
=
new
DynamicToken
(
request
);
DynamicTokenResponse
response
=
openAPIClient
.
invoke
(
dynamicToken
);
if
(
response
.
getRemain_refresh_count
()
==
0
)
{
return
refreshToken
(
response
.
get
Refresh
_token
());
return
refreshToken
(
response
.
get
Access
_token
());
}
return
response
.
getAccess_token
();
}
...
...
@@ -241,7 +240,7 @@ public class QPServiceImpl implements QPService {
* @param app_shop_id
*/
DefaultOpenAPIClient
openAPIClient
=
new
DefaultOpenAPIClient
();
TuangouDealQueryShopDealRequest
request
=
new
TuangouDealQueryShopDealRequest
(
APP_KEY
,
APP_SECRET
,
"
04bdcb2ccac3075eac0f60680587be2138c6c362
"
,
""
,
1
,
100
,
openShopUuid
);
TuangouDealQueryShopDealRequest
request
=
new
TuangouDealQueryShopDealRequest
(
APP_KEY
,
APP_SECRET
,
"
5bf98bb4c6c0d8ecef94f0882b40e00c5a248abc
"
,
""
,
1
,
100
,
openShopUuid
);
TuangouDealQueryShopDeal
tuangouDealQueryShopDeal
=
new
TuangouDealQueryShopDeal
(
request
);
TuangouDealQueryShopDealResponse
response
=
openAPIClient
.
invoke
(
tuangouDealQueryShopDeal
);
if
(
response
.
getCode
()
!=
200
)
{
...
...
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