Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
32bcea00
Commit
32bcea00
authored
Dec 24, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店经纬度
parent
a01c5680
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
157 additions
and
24 deletions
+157
-24
WxSearchStoreSearchDTO.java
...c/main/java/com/gic/store/dto/WxSearchStoreSearchDTO.java
+87
-0
StoreApiService.java
.../src/main/java/com/gic/store/service/StoreApiService.java
+20
-7
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+50
-17
No files found.
gic-store-api/src/main/java/com/gic/store/dto/WxSearchStoreSearchDTO.java
0 → 100644
View file @
32bcea00
package
com
.
gic
.
store
.
dto
;
import
java.io.Serializable
;
public
class
WxSearchStoreSearchDTO
implements
Serializable
{
private
Integer
enterpriseId
;
private
String
cityId
;
private
String
longitude
;
private
String
latitude
;
private
Integer
brandId
;
private
String
appid
;
private
Integer
StoreWidgetId
;
private
Integer
pageNum
=
1
;
private
Integer
pageSize
=
20
;
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getCityId
()
{
return
cityId
;
}
public
void
setCityId
(
String
cityId
)
{
this
.
cityId
=
cityId
;
}
public
String
getLongitude
()
{
return
longitude
;
}
public
void
setLongitude
(
String
longitude
)
{
this
.
longitude
=
longitude
;
}
public
String
getLatitude
()
{
return
latitude
;
}
public
void
setLatitude
(
String
latitude
)
{
this
.
latitude
=
latitude
;
}
public
Integer
getBrandId
()
{
return
brandId
;
}
public
void
setBrandId
(
Integer
brandId
)
{
this
.
brandId
=
brandId
;
}
public
String
getAppid
()
{
return
appid
;
}
public
void
setAppid
(
String
appid
)
{
this
.
appid
=
appid
;
}
public
Integer
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
Integer
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
Integer
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
Integer
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
Integer
getStoreWidgetId
()
{
return
StoreWidgetId
;
}
public
void
setStoreWidgetId
(
Integer
storeWidgetId
)
{
StoreWidgetId
=
storeWidgetId
;
}
}
gic-store-api/src/main/java/com/gic/store/service/StoreApiService.java
View file @
32bcea00
...
...
@@ -3,9 +3,7 @@ package com.gic.store.service;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.store.dto.StoreDTO
;
import
com.gic.store.dto.StoreFieldDTO
;
import
com.gic.store.dto.StoreSearchDTO
;
import
com.gic.store.dto.*
;
import
java.util.List
;
...
...
@@ -215,15 +213,30 @@ public interface StoreApiService {
ServiceResponse
<
List
<
StoreDTO
>>
listStore
(
String
search
,
Integer
enterpriseId
);
/** @Description: 附近门店
/** @Description:
小程序
附近门店
* @author taogs
* @Date 19:41 2019/12/4
* @Param
* @return
*/
ServiceResponse
<
Page
<
StoreDTO
>>
pageNearbyStore
(
Integer
enterpriseId
,
String
cityId
,
String
longitude
,
String
latitude
,
Integer
brandId
,
String
appid
,
Integer
pageNum
,
Integer
pageSize
);
ServiceResponse
<
Page
<
StoreDTO
>>
pageNearbyStore
(
WxSearchStoreSearchDTO
wxSearchStoreSearchDTO
);
/** @Description: 小程序卡券适用门店
* @author taogs
* @Date 17:22 2019/12/24
* @Param
* @return
*/
ServiceResponse
<
Page
<
StoreDTO
>>
pageCoupApplyStore
(
WxSearchStoreSearchDTO
wxSearchStoreSearchDTO
);
/** @Description: 小程序开卡门店
* @author taogs
* @Date 17:28 2019/12/24
* @Param
* @return
*/
ServiceResponse
<
Page
<
StoreDTO
>>
pageOpenCardStore
(
WxSearchStoreSearchDTO
wxSearchStoreSearchDTO
);
ServiceResponse
<
Void
>
storeQrcodeCallBack
(
String
param
);
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
32bcea00
...
...
@@ -511,31 +511,64 @@ public class StoreApiServiceImpl implements StoreApiService {
}
@Override
public
ServiceResponse
<
Page
<
StoreDTO
>>
pageNearbyStore
(
Integer
enterpriseId
,
String
cityId
,
String
longitude
,
String
latitude
,
Integer
brandId
,
String
appid
,
Integer
pageNum
,
Integer
pageSize
)
{
ServiceResponse
<
CustomStoreDTO
>
customStore
=
this
.
customStoreApiService
.
getCustomStore
(
enterpriseId
,
appid
);
public
ServiceResponse
<
Page
<
StoreDTO
>>
pageNearbyStore
(
WxSearchStoreSearchDTO
nearByStoreSearchDTO
)
{
ServiceResponse
<
CustomStoreDTO
>
customStore
=
this
.
customStoreApiService
.
getCustomStore
(
nearByStoreSearchDTO
.
getEnterpriseId
(),
nearByStoreSearchDTO
.
getAppid
());
if
(
customStore
.
isSuccess
()
&&
customStore
.
getResult
()
!=
null
){
Integer
storeWidgetId
=
customStore
.
getResult
().
getStoreWidgetId
();
ServiceResponse
<
List
<
Integer
>>
response
=
this
.
storeWidgetApiService
.
listStoreIdByStoreWidgetId
(
enterpriseId
,
storeWidgetId
);
if
(
response
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
response
.
getResult
())
){
StoreSearchD
BDTO
searchDBDTO
=
new
StoreSearchDB
DTO
();
s
earchDBDTO
.
setEnterpriseId
(
enterpriseId
);
s
earchDBDTO
.
setStoreBrandId
(
brandId
);
s
earchDBDTO
.
setLongitude
(
longitude
);
s
earchDBDTO
.
setLatitude
(
latitude
);
s
earchDBDTO
.
setCityId
(
cityId
);
s
earchDBDTO
.
setStoreIdList
(
response
.
getResult
());
com
.
github
.
pagehelper
.
Page
<
StoreDTO
>
page
=
this
.
storeService
.
listStore
(
searchDBDTO
,
pageNum
,
pageSize
);
Page
<
StoreDTO
>
storeDTOPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
page
);
logger
.
info
(
"pageNearbyStore:{}"
,
JSON
.
toJSONString
(
store
DTO
Page
,
true
));
return
ServiceResponse
.
success
(
store
DTOPage
);
ServiceResponse
<
StoreWidgetDTO
>
response
=
this
.
storeWidgetApiService
.
getStoreWidget
(
storeWidgetId
);
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
StoreSearchD
TO
storeSearchDTO
=
new
StoreSearch
DTO
();
s
toreSearchDTO
.
setEnterpriseId
(
nearByStoreSearchDTO
.
getEnterpriseId
()
);
s
toreSearchDTO
.
setStoreBrandId
(
nearByStoreSearchDTO
.
getBrandId
()
);
s
toreSearchDTO
.
setLongitude
(
nearByStoreSearchDTO
.
getLongitude
()
);
s
toreSearchDTO
.
setLatitude
(
nearByStoreSearchDTO
.
getLatitude
()
);
s
toreSearchDTO
.
setCityId
(
nearByStoreSearchDTO
.
getCityId
()
);
s
toreSearchDTO
.
setAuthSearchJson
(
response
.
getResult
().
getAuthSearchParam
());
storeSearchDTO
.
setSearchJson
(
response
.
getResult
().
getSearchParam
()
);
ServiceResponse
<
Page
<
StoreDTO
>>
storePage
=
this
.
listStore
(
storeSearchDTO
,
nearByStoreSearchDTO
.
getPageNum
(),
nearByStoreSearchDTO
.
getPageSize
()
);
logger
.
info
(
"pageNearbyStore:{}"
,
JSON
.
toJSONString
(
storePage
,
true
));
return
ServiceResponse
.
success
(
store
Page
.
getResult
()
);
}
}
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Page
<
StoreDTO
>>
pageCoupApplyStore
(
WxSearchStoreSearchDTO
coupApplyStoreSearchDTO
)
{
if
(
coupApplyStoreSearchDTO
.
getStoreWidgetId
()
!=
null
){
Integer
storeWidgetId
=
coupApplyStoreSearchDTO
.
getStoreWidgetId
();
ServiceResponse
<
StoreWidgetDTO
>
response
=
this
.
storeWidgetApiService
.
getStoreWidget
(
storeWidgetId
);
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
coupApplyStoreSearchDTO
.
getEnterpriseId
());
storeSearchDTO
.
setStoreBrandId
(
coupApplyStoreSearchDTO
.
getBrandId
());
storeSearchDTO
.
setLongitude
(
coupApplyStoreSearchDTO
.
getLongitude
());
storeSearchDTO
.
setLatitude
(
coupApplyStoreSearchDTO
.
getLatitude
());
storeSearchDTO
.
setCityId
(
coupApplyStoreSearchDTO
.
getCityId
());
storeSearchDTO
.
setAuthSearchJson
(
response
.
getResult
().
getAuthSearchParam
());
storeSearchDTO
.
setSearchJson
(
response
.
getResult
().
getSearchParam
());
ServiceResponse
<
Page
<
StoreDTO
>>
storePage
=
this
.
listStore
(
storeSearchDTO
,
coupApplyStoreSearchDTO
.
getPageNum
(),
coupApplyStoreSearchDTO
.
getPageSize
());
logger
.
info
(
"pageCoupApplyStore:{}"
,
JSON
.
toJSONString
(
storePage
,
true
));
return
ServiceResponse
.
success
(
storePage
.
getResult
());
}
}
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Page
<
StoreDTO
>>
pageOpenCardStore
(
WxSearchStoreSearchDTO
wxSearchStoreSearchDTO
)
{
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
wxSearchStoreSearchDTO
.
getEnterpriseId
());
storeSearchDTO
.
setStoreBrandId
(
wxSearchStoreSearchDTO
.
getBrandId
());
storeSearchDTO
.
setLongitude
(
wxSearchStoreSearchDTO
.
getLongitude
());
storeSearchDTO
.
setLatitude
(
wxSearchStoreSearchDTO
.
getLatitude
());
storeSearchDTO
.
setCityId
(
wxSearchStoreSearchDTO
.
getCityId
());
ServiceResponse
<
Page
<
StoreDTO
>>
storePage
=
this
.
listStore
(
storeSearchDTO
,
wxSearchStoreSearchDTO
.
getPageNum
(),
wxSearchStoreSearchDTO
.
getPageSize
());
logger
.
info
(
"pageCoupApplyStore:{}"
,
JSON
.
toJSONString
(
storePage
,
true
));
return
ServiceResponse
.
success
(
storePage
.
getResult
());
}
@Override
public
ServiceResponse
<
Void
>
storeQrcodeCallBack
(
String
param
)
{
return
null
;
}
...
...
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