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
ba956a4a
Commit
ba956a4a
authored
Apr 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改异常报错
parent
09c78f5e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
14 deletions
+14
-14
TiktokController.java
...in/java/share/web/controller/system/TiktokController.java
+1
-1
QPController.java
...c/main/java/share/web/controller/system/QPController.java
+1
-1
TiktokController.java
...in/java/share/web/controller/system/TiktokController.java
+1
-1
QPService.java
...-system/src/main/java/share/system/service/QPService.java
+1
-1
TiktokService.java
...tem/src/main/java/share/system/service/TiktokService.java
+1
-1
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+5
-5
TiktokServiceImpl.java
...ain/java/share/system/service/impl/TiktokServiceImpl.java
+4
-4
No files found.
share-admin/src/main/java/share/web/controller/system/TiktokController.java
View file @
ba956a4a
...
...
@@ -67,7 +67,7 @@ public class TiktokController {
//用户验券接口
@GetMapping
(
"/consumeByUser"
)
public
AjaxResult
consumeByUser
(
String
code
,
String
poiId
)
{
public
AjaxResult
consumeByUser
(
String
code
,
String
poiId
)
throws
Exception
{
return
success
(
tiktokService
.
consumeByUser
(
code
,
poiId
));
}
}
share-front/src/main/java/share/web/controller/system/QPController.java
View file @
ba956a4a
...
...
@@ -51,7 +51,7 @@ public class QPController {
//用户验券接口
@GetMapping
(
"/consumeByUser"
)
public
R
<
String
>
consumeByUser
(
String
code
,
String
storeId
)
{
public
R
<
String
>
consumeByUser
(
String
code
,
String
storeId
)
throws
Exception
{
if
(
code
.
length
()
==
10
)
{
return
R
.
ok
(
qpService
.
consumeByUser
(
code
,
storeId
,
ConsumerCouponStatusEnum
.
CONTROLLER
.
getCode
()));
}
else
if
(
code
.
startsWith
(
"https://v.douyin.com/"
)
|
code
.
length
()
==
15
|
code
.
length
()
==
12
)
{
...
...
share-front/src/main/java/share/web/controller/system/TiktokController.java
View file @
ba956a4a
...
...
@@ -64,7 +64,7 @@ public class TiktokController {
//用户验券接口
@GetMapping
(
"/consumeByUser"
)
public
AjaxResult
consumeByUser
(
String
code
,
String
storeId
)
{
public
AjaxResult
consumeByUser
(
String
code
,
String
storeId
)
throws
Exception
{
return
success
(
tiktokService
.
consumeByUser
(
code
,
storeId
));
}
}
share-system/src/main/java/share/system/service/QPService.java
View file @
ba956a4a
...
...
@@ -20,7 +20,7 @@ public interface QPService {
TuangouReceiptGetConsumedReponseEntity
getconsumed
(
String
code
,
String
openShopUuid
);
String
consumeByUser
(
String
code
,
String
storeId
,
String
status
);
String
consumeByUser
(
String
code
,
String
storeId
,
String
status
)
throws
Exception
;
List
<
TuangouReceiptReverseConsumeResponseEntity
>
reverseconsumeByUser
(
Long
id
);
...
...
share-system/src/main/java/share/system/service/TiktokService.java
View file @
ba956a4a
...
...
@@ -26,7 +26,7 @@ public interface TiktokService {
JSONObject
onlineGet
(
String
productIds
,
String
accountId
);
String
consumeByUser
(
String
code
,
String
storeId
);
String
consumeByUser
(
String
code
,
String
storeId
)
throws
Exception
;
List
<
TiktokPoi
>
poiList
();
...
...
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
ba956a4a
...
...
@@ -94,15 +94,15 @@ public class QPServiceImpl implements QPService {
* 用户验卷接口
*/
@Override
public
String
consumeByUser
(
String
code
,
String
storeId
,
String
status
)
{
public
String
consumeByUser
(
String
code
,
String
storeId
,
String
status
)
throws
Exception
{
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getId
,
storeId
);
SStore
sStore
=
storeService
.
getOne
(
sStoreLambdaQueryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
sStore
)
||
StoreStatusEnum
.
STOP
.
getIndex
().
equals
(
sStore
.
getStatus
()))
{
throw
new
Runtime
Exception
(
"门店维护中,请联系客服"
);
throw
new
Exception
(
"门店维护中,请联系客服"
);
}
if
(
StringUtils
.
isEmpty
(
sStore
.
getOpenShopUuid
()))
{
throw
new
Runtime
Exception
(
"门店未授权,请联系客服"
);
throw
new
Exception
(
"门店未授权,请联系客服"
);
}
//验券准备
TuangouReceiptPrepareResponseEntity
prepare
=
prepare
(
code
.
trim
(),
sStore
.
getOpenShopUuid
(),
status
);
...
...
@@ -115,7 +115,7 @@ public class QPServiceImpl implements QPService {
queryWrapper
.
eq
(
SConsumerCoupon:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
());
SConsumerCoupon
unUsedCoupon
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
if
(
ObjectUtils
.
isNotEmpty
(
unUsedCoupon
))
{
throw
new
RuntimeException
(
"该券已被领取
"
);
throw
new
Exception
(
"该券码已被使用
"
);
}
//根据优惠卷名称查询优惠劵配置 查询list,取第一个
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
...
...
@@ -442,7 +442,7 @@ public class QPServiceImpl implements QPService {
queryWrapper
.
eq
(
SConsumerCoupon:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
());
SConsumerCoupon
unUsedCoupon
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
if
(
ObjectUtils
.
isNotEmpty
(
unUsedCoupon
))
{
throw
new
RuntimeException
(
"该券
已被领取
"
);
throw
new
RuntimeException
(
"该券
码已被使用
"
);
}
sStoreList
=
storeService
.
list
(
new
LambdaQueryWrapper
<>(
SStore
.
class
).
isNotNull
(
SStore:
:
getOpenShopUuid
));
SCoupon
sCoupon
=
isCouponService
.
getOne
(
new
LambdaQueryWrapper
<>(
SCoupon
.
class
).
...
...
share-system/src/main/java/share/system/service/impl/TiktokServiceImpl.java
View file @
ba956a4a
...
...
@@ -330,15 +330,15 @@ public class TiktokServiceImpl implements TiktokService {
}
@Override
public
String
consumeByUser
(
String
code
,
String
storeId
)
{
public
String
consumeByUser
(
String
code
,
String
storeId
)
throws
Exception
{
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getId
,
storeId
);
SStore
sStore
=
storeService
.
getOne
(
sStoreLambdaQueryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
sStore
)
||
StoreStatusEnum
.
STOP
.
getIndex
().
equals
(
sStore
.
getStatus
()))
{
throw
new
Runtime
Exception
(
"门店维护中,请联系客服"
);
throw
new
Exception
(
"门店维护中,请联系客服"
);
}
if
(
StringUtils
.
isEmpty
(
sStore
.
getTiktokPoiId
()))
{
throw
new
Runtime
Exception
(
"门店未授权,请联系客服"
);
throw
new
Exception
(
"门店未授权,请联系客服"
);
}
if
(
code
.
startsWith
(
"https://v.douyin.com/"
)
|
code
.
length
()
==
15
|
code
.
length
()
==
12
)
{
try
{
...
...
@@ -352,7 +352,7 @@ public class TiktokServiceImpl implements TiktokService {
JSONObject
prepare
=
prepare
(
tiktokCouponDto
);
JSONArray
certificates
=
prepare
.
getJSONArray
(
"certificates"
);
if
(
CollectionUtils
.
isEmpty
(
certificates
))
{
throw
new
Runtime
Exception
(
"该券码已被使用"
);
throw
new
Exception
(
"该券码已被使用"
);
}
Object
o
=
certificates
.
get
(
0
);
JSONObject
entries
=
new
JSONObject
(
o
);
...
...
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