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
68247ee2
Commit
68247ee2
authored
Apr 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠券报错
parent
ba956a4a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
QPController.java
...c/main/java/share/web/controller/system/QPController.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
+4
-4
TiktokServiceImpl.java
...ain/java/share/system/service/impl/TiktokServiceImpl.java
+5
-5
No files found.
share-front/src/main/java/share/web/controller/system/QPController.java
View file @
68247ee2
...
@@ -81,7 +81,7 @@ public class QPController {
...
@@ -81,7 +81,7 @@ public class QPController {
//查询当前优惠券适用门店
//查询当前优惠券适用门店
@GetMapping
(
"/queryshop"
)
@GetMapping
(
"/queryshop"
)
public
R
<
List
<
SStoreVo
>>
queryshop
(
SStoreDto
dto
)
{
public
R
<
List
<
SStoreVo
>>
queryshop
(
SStoreDto
dto
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
dto
.
getCode
()))
{
if
(
StringUtils
.
isEmpty
(
dto
.
getCode
()))
{
throw
new
RuntimeException
(
"券码缺失"
);
throw
new
RuntimeException
(
"券码缺失"
);
}
}
...
...
share-system/src/main/java/share/system/service/QPService.java
View file @
68247ee2
...
@@ -34,7 +34,7 @@ public interface QPService {
...
@@ -34,7 +34,7 @@ public interface QPService {
List
<
CustomerKeyShopScopeResponseEntity
>
scope
();
List
<
CustomerKeyShopScopeResponseEntity
>
scope
();
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
);
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
)
throws
Exception
;
List
<
SStoreVo
>
getsStores
(
List
<
SStore
>
sStoreList
,
SCoupon
sCoupon
,
SStoreDto
dto
);
List
<
SStoreVo
>
getsStores
(
List
<
SStore
>
sStoreList
,
SCoupon
sCoupon
,
SStoreDto
dto
);
}
}
share-system/src/main/java/share/system/service/TiktokService.java
View file @
68247ee2
...
@@ -30,5 +30,5 @@ public interface TiktokService {
...
@@ -30,5 +30,5 @@ public interface TiktokService {
List
<
TiktokPoi
>
poiList
();
List
<
TiktokPoi
>
poiList
();
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
);
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
)
throws
Exception
;
}
}
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
68247ee2
...
@@ -423,10 +423,10 @@ public class QPServiceImpl implements QPService {
...
@@ -423,10 +423,10 @@ public class QPServiceImpl implements QPService {
}
}
@Override
@Override
public
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
)
{
public
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
)
throws
Exception
{
String
code
=
dto
.
getCode
();
String
code
=
dto
.
getCode
();
if
(
StringUtils
.
isEmpty
(
dto
.
getLatitude
())
||
StringUtils
.
isEmpty
(
dto
.
getLongitude
()))
{
if
(
StringUtils
.
isEmpty
(
dto
.
getLatitude
())
||
StringUtils
.
isEmpty
(
dto
.
getLongitude
()))
{
throw
new
Runtime
Exception
(
"经纬度不能为空"
);
throw
new
Exception
(
"经纬度不能为空"
);
}
}
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>(
SStore
.
class
);
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>(
SStore
.
class
);
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getStoreType
,
StoreType
.
HOTEL
.
getCode
());
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getStoreType
,
StoreType
.
HOTEL
.
getCode
());
...
@@ -442,7 +442,7 @@ public class QPServiceImpl implements QPService {
...
@@ -442,7 +442,7 @@ public class QPServiceImpl implements QPService {
queryWrapper
.
eq
(
SConsumerCoupon:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
());
queryWrapper
.
eq
(
SConsumerCoupon:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
());
SConsumerCoupon
unUsedCoupon
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
SConsumerCoupon
unUsedCoupon
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
if
(
ObjectUtils
.
isNotEmpty
(
unUsedCoupon
))
{
if
(
ObjectUtils
.
isNotEmpty
(
unUsedCoupon
))
{
throw
new
Runtime
Exception
(
"该券码已被使用"
);
throw
new
Exception
(
"该券码已被使用"
);
}
}
sStoreList
=
storeService
.
list
(
new
LambdaQueryWrapper
<>(
SStore
.
class
).
isNotNull
(
SStore:
:
getOpenShopUuid
));
sStoreList
=
storeService
.
list
(
new
LambdaQueryWrapper
<>(
SStore
.
class
).
isNotNull
(
SStore:
:
getOpenShopUuid
));
SCoupon
sCoupon
=
isCouponService
.
getOne
(
new
LambdaQueryWrapper
<>(
SCoupon
.
class
).
SCoupon
sCoupon
=
isCouponService
.
getOne
(
new
LambdaQueryWrapper
<>(
SCoupon
.
class
).
...
@@ -456,7 +456,7 @@ public class QPServiceImpl implements QPService {
...
@@ -456,7 +456,7 @@ public class QPServiceImpl implements QPService {
List
<
SCoupon
>
coupons
=
isCouponService
.
queryShopDeal
();
List
<
SCoupon
>
coupons
=
isCouponService
.
queryShopDeal
();
SCoupon
scoupon
=
coupons
.
stream
().
filter
(
o
->
o
.
getDealgroupId
().
equals
(
prepare
.
getDealgroup_id
())).
findFirst
().
get
();
SCoupon
scoupon
=
coupons
.
stream
().
filter
(
o
->
o
.
getDealgroupId
().
equals
(
prepare
.
getDealgroup_id
())).
findFirst
().
get
();
if
(
ObjectUtils
.
isEmpty
(
scoupon
))
{
if
(
ObjectUtils
.
isEmpty
(
scoupon
))
{
throw
new
Runtime
Exception
(
"当前优惠券异常,请联系客服"
);
throw
new
Exception
(
"当前优惠券异常,请联系客服"
);
}
}
isCouponService
.
save
(
scoupon
);
isCouponService
.
save
(
scoupon
);
//过滤不存在sCoupon.getstoreIds()的门店
//过滤不存在sCoupon.getstoreIds()的门店
...
...
share-system/src/main/java/share/system/service/impl/TiktokServiceImpl.java
View file @
68247ee2
...
@@ -470,10 +470,10 @@ public class TiktokServiceImpl implements TiktokService {
...
@@ -470,10 +470,10 @@ public class TiktokServiceImpl implements TiktokService {
}
}
@Override
@Override
public
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
)
{
public
List
<
SStoreVo
>
queryshop
(
SStoreDto
dto
)
throws
Exception
{
String
code
=
dto
.
getCode
();
String
code
=
dto
.
getCode
();
if
(
StringUtils
.
isEmpty
(
dto
.
getLatitude
())
||
StringUtils
.
isEmpty
(
dto
.
getLongitude
()))
{
if
(
StringUtils
.
isEmpty
(
dto
.
getLatitude
())
||
StringUtils
.
isEmpty
(
dto
.
getLongitude
()))
{
throw
new
Runtime
Exception
(
"经纬度不能为空"
);
throw
new
Exception
(
"经纬度不能为空"
);
}
}
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>(
SStore
.
class
);
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>(
SStore
.
class
);
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getStoreType
,
StoreType
.
HOTEL
.
getCode
());
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getStoreType
,
StoreType
.
HOTEL
.
getCode
());
...
@@ -490,7 +490,7 @@ public class TiktokServiceImpl implements TiktokService {
...
@@ -490,7 +490,7 @@ public class TiktokServiceImpl implements TiktokService {
JSONObject
prepare
=
prepare
(
tiktokCouponDto
);
JSONObject
prepare
=
prepare
(
tiktokCouponDto
);
JSONArray
certificates
=
prepare
.
getJSONArray
(
"certificates"
);
JSONArray
certificates
=
prepare
.
getJSONArray
(
"certificates"
);
if
(
CollectionUtils
.
isEmpty
(
certificates
))
{
if
(
CollectionUtils
.
isEmpty
(
certificates
))
{
throw
new
Runtime
Exception
(
"该券码已被使用"
);
throw
new
Exception
(
"该券码已被使用"
);
}
}
Object
o
=
certificates
.
get
(
0
);
Object
o
=
certificates
.
get
(
0
);
JSONObject
entries
=
new
JSONObject
(
o
);
JSONObject
entries
=
new
JSONObject
(
o
);
...
@@ -506,13 +506,13 @@ public class TiktokServiceImpl implements TiktokService {
...
@@ -506,13 +506,13 @@ public class TiktokServiceImpl implements TiktokService {
List
<
SCoupon
>
coupons
=
isCouponService
.
querySkuPoiList
();
List
<
SCoupon
>
coupons
=
isCouponService
.
querySkuPoiList
();
SCoupon
scoupon
=
coupons
.
stream
().
filter
(
s
->
s
.
getTiktokSkuId
().
equals
(
sku
.
getStr
(
"sku_id"
))).
findFirst
().
get
();
SCoupon
scoupon
=
coupons
.
stream
().
filter
(
s
->
s
.
getTiktokSkuId
().
equals
(
sku
.
getStr
(
"sku_id"
))).
findFirst
().
get
();
if
(
ObjectUtils
.
isEmpty
(
scoupon
))
{
if
(
ObjectUtils
.
isEmpty
(
scoupon
))
{
throw
new
Runtime
Exception
(
"当前优惠券异常,请联系客服"
);
throw
new
Exception
(
"当前优惠券异常,请联系客服"
);
}
}
isCouponService
.
save
(
scoupon
);
isCouponService
.
save
(
scoupon
);
return
qpService
.
getsStores
(
sStoreList
,
scoupon
,
dto
);
return
qpService
.
getsStores
(
sStoreList
,
scoupon
,
dto
);
}
}
}
catch
(
RuntimeException
e
)
{
}
catch
(
RuntimeException
e
)
{
throw
new
Runtime
Exception
(
e
);
throw
new
Exception
(
e
);
}
}
}
}
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
...
...
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