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
8b53bc04
Commit
8b53bc04
authored
Apr 19, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠券查询适用门店
parent
1e3311ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
11 deletions
+22
-11
QPController.java
...c/main/java/share/web/controller/system/QPController.java
+2
-1
SStoreDto.java
...ystem/src/main/java/share/system/domain/vo/SStoreDto.java
+2
-0
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+9
-5
TiktokServiceImpl.java
...ain/java/share/system/service/impl/TiktokServiceImpl.java
+9
-5
No files found.
share-front/src/main/java/share/web/controller/system/QPController.java
View file @
8b53bc04
...
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.Api;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.domain.R
;
...
...
@@ -80,7 +81,7 @@ public class QPController {
}
//查询当前优惠券适用门店
@
Ge
tMapping
(
"/queryshop"
)
@
Pos
tMapping
(
"/queryshop"
)
public
R
<
List
<
SStoreVo
>>
queryshop
(
SStoreDto
dto
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
dto
.
getCode
()))
{
throw
new
RuntimeException
(
"券码缺失"
);
...
...
share-system/src/main/java/share/system/domain/vo/SStoreDto.java
View file @
8b53bc04
...
...
@@ -19,4 +19,6 @@ public class SStoreDto extends BaseEntity {
private
String
code
;
private
Long
[]
storeIds
;
private
Long
storeId
;
}
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
8b53bc04
...
...
@@ -423,11 +423,15 @@ public class QPServiceImpl implements QPService {
if
(
StringUtils
.
isEmpty
(
dto
.
getLatitude
())
||
StringUtils
.
isEmpty
(
dto
.
getLongitude
()))
{
throw
new
Exception
(
"经纬度不能为空"
);
}
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>(
SStore
.
class
);
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getStoreType
,
StoreType
.
HOTEL
.
getCode
());
List
<
SStore
>
sStoreList
=
storeService
.
list
(
sStoreLambdaQueryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
dto
.
getStoreId
()))
{
throw
new
Exception
(
"门店异常,请联系客服"
);
}
SStore
sStore
=
storeService
.
selectSStoreById
(
dto
.
getStoreId
());
if
(
ObjectUtils
.
isEmpty
(
sStore
)
||
sStore
.
getStatus
().
equals
(
StoreStatusEnum
.
STOP
.
getIndex
())
||
StringUtils
.
isBlank
(
sStore
.
getOpenShopUuid
()))
{
throw
new
Exception
(
"门店异常,请更换门店"
);
}
//验券准备
TuangouReceiptPrepareResponseEntity
prepare
=
prepare
(
code
.
trim
(),
sStore
List
.
get
(
0
)
.
getOpenShopUuid
(),
""
);
TuangouReceiptPrepareResponseEntity
prepare
=
prepare
(
code
.
trim
(),
sStore
.
getOpenShopUuid
(),
""
);
//获取用户信息
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
//查询领取记录表
...
...
@@ -439,7 +443,7 @@ public class QPServiceImpl implements QPService {
if
(
ObjectUtils
.
isNotEmpty
(
unUsedCoupon
))
{
throw
new
Exception
(
"该券码已被使用"
);
}
sStoreList
=
storeService
.
list
(
new
LambdaQueryWrapper
<>(
SStore
.
class
).
isNotNull
(
SStore:
:
getOpenShopUuid
));
List
<
SStore
>
sStoreList
=
storeService
.
list
(
new
LambdaQueryWrapper
<>(
SStore
.
class
).
isNotNull
(
SStore:
:
getOpenShopUuid
));
SCoupon
sCoupon
=
isCouponService
.
getOne
(
new
LambdaQueryWrapper
<>(
SCoupon
.
class
).
eq
(
SCoupon:
:
getCouponType
,
CouponTypeEnum
.
CASH
.
getCode
()).
eq
(
SCoupon:
:
getDealgroupId
,
prepare
.
getDealgroup_id
()).
...
...
share-system/src/main/java/share/system/service/impl/TiktokServiceImpl.java
View file @
8b53bc04
...
...
@@ -475,9 +475,13 @@ public class TiktokServiceImpl implements TiktokService {
if
(
StringUtils
.
isEmpty
(
dto
.
getLatitude
())
||
StringUtils
.
isEmpty
(
dto
.
getLongitude
()))
{
throw
new
Exception
(
"经纬度不能为空"
);
}
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>(
SStore
.
class
);
sStoreLambdaQueryWrapper
.
eq
(
SStore:
:
getStoreType
,
StoreType
.
HOTEL
.
getCode
());
List
<
SStore
>
sStoreList
=
storeService
.
list
(
sStoreLambdaQueryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
dto
.
getStoreId
()))
{
throw
new
Exception
(
"门店异常,请联系客服"
);
}
SStore
sStore
=
storeService
.
selectSStoreById
(
dto
.
getStoreId
());
if
(
ObjectUtils
.
isEmpty
(
sStore
)
||
sStore
.
getStatus
().
equals
(
StoreStatusEnum
.
STOP
.
getIndex
())
||
StringUtils
.
isBlank
(
sStore
.
getTiktokPoiId
()))
{
throw
new
Exception
(
"门店异常,请更换门店"
);
}
if
(
code
.
startsWith
(
"https://v.douyin.com/"
)
|
code
.
length
()
==
15
|
code
.
length
()
==
12
)
{
try
{
TiktokCouponDto
tiktokCouponDto
=
new
TiktokCouponDto
();
...
...
@@ -486,7 +490,7 @@ public class TiktokServiceImpl implements TiktokService {
}
else
{
tiktokCouponDto
.
setCode
(
code
);
}
tiktokCouponDto
.
setPoiId
(
sStore
List
.
get
(
0
)
.
getTiktokPoiId
());
tiktokCouponDto
.
setPoiId
(
sStore
.
getTiktokPoiId
());
JSONObject
prepare
=
prepare
(
tiktokCouponDto
);
JSONArray
certificates
=
prepare
.
getJSONArray
(
"certificates"
);
if
(
CollectionUtils
.
isEmpty
(
certificates
))
{
...
...
@@ -499,7 +503,7 @@ public class TiktokServiceImpl implements TiktokService {
eq
(
SCoupon:
:
getCouponType
,
CouponTypeEnum
.
CASH
.
getCode
()).
eq
(
SCoupon:
:
getTiktokSkuId
,
sku
.
getStr
(
"sku_id"
)).
eq
(
SCoupon:
:
getPlatformType
,
PlatformTypeEnum
.
TIKTOK
.
getCode
()));
sStoreList
=
storeService
.
list
(
new
LambdaQueryWrapper
<>(
SStore
.
class
).
isNotNull
(
SStore:
:
getTiktokPoiId
));
List
<
SStore
>
sStoreList
=
storeService
.
list
(
new
LambdaQueryWrapper
<>(
SStore
.
class
).
isNotNull
(
SStore:
:
getTiktokPoiId
));
if
(!
ObjectUtils
.
isEmpty
(
sCoupon
))
{
return
qpService
.
getsStores
(
sStoreList
,
sCoupon
,
dto
);
}
else
{
...
...
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