Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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-platform-enterprise
Commits
e6c39311
Commit
e6c39311
authored
Jun 10, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员卡域和企业查询的微盟店铺信息
parent
3cca38b8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
10 deletions
+46
-10
WmStoreApiService.java
...in/java/com/gic/enterprise/service/WmStoreApiService.java
+2
-2
pom.xml
gic-platform-enterprise-service/pom.xml
+5
-0
TabWmStoreMapper.java
.../java/com/gic/enterprise/dao/mapper/TabWmStoreMapper.java
+2
-1
WmStoreService.java
.../main/java/com/gic/enterprise/service/WmStoreService.java
+6
-1
WmStoreServiceImpl.java
...a/com/gic/enterprise/service/impl/WmStoreServiceImpl.java
+3
-3
WmStoreApiServiceImpl.java
.../enterprise/service/outer/impl/WmStoreApiServiceImpl.java
+23
-3
dubbo-gic-platform-enterprise-service.xml
.../main/resources/dubbo-gic-platform-enterprise-service.xml
+2
-0
TabWmStoreMapper.xml
...se-service/src/main/resources/mapper/TabWmStoreMapper.xml
+3
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/WmStoreApiService.java
View file @
e6c39311
...
...
@@ -101,10 +101,10 @@ public interface WmStoreApiService {
* @Description:
* @author guojuxing
* @param enterpriseId 商户ID
* @param
appId 小程序
ID
* @param
memberCardAreaId 会员卡域
ID
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.enterprise.dto.wm.WmCouponPackageDTO>>
*/
ServiceResponse
<
List
<
WmCouponPackageDTO
>>
getWmListByAppId
(
Integer
enterpriseId
,
String
app
Id
);
ServiceResponse
<
List
<
WmCouponPackageDTO
>>
getWmListByAppId
(
Integer
enterpriseId
,
Long
memberCardArea
Id
);
/**
* 根据微盟主账号查询配置
...
...
gic-platform-enterprise-service/pom.xml
View file @
e6c39311
...
...
@@ -196,6 +196,11 @@
<artifactId>
gic-thirdparty-sdk
</artifactId>
<version>
${gic-thirdparty-sdk}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-weimob-api
</artifactId>
<version>
${gic-weimob-api}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabWmStoreMapper.java
View file @
e6c39311
...
...
@@ -67,7 +67,7 @@ public interface TabWmStoreMapper {
int
countByStoreName
(
@Param
(
"storeName"
)
String
storeName
,
@Param
(
"wmMallStoreId"
)
Integer
wmMallStoreId
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
List
<
TabWmStore
>
listWmStore
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"appId"
)
String
appId
);
List
<
TabWmStore
>
listWmStore
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"appId"
)
String
appId
,
@Param
(
"authStatus"
)
Integer
authStatus
);
TabWmStore
getByWmMainAccount
(
String
wmMainAccount
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/WmStoreService.java
View file @
e6c39311
...
...
@@ -62,5 +62,10 @@ public interface WmStoreService {
List
<
TabWmStore
>
listWmStore
(
Integer
enterpriseId
);
List
<
TabWmStore
>
getWmListByAppId
(
Integer
enterpriseId
,
String
appId
);
/**
* 已授权店铺
* @param enterpriseId
* @return
*/
List
<
TabWmStore
>
getHasAuth
(
Integer
enterpriseId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/WmStoreServiceImpl.java
View file @
e6c39311
...
...
@@ -65,11 +65,11 @@ public class WmStoreServiceImpl implements WmStoreService{
@Override
public
List
<
TabWmStore
>
listWmStore
(
Integer
enterpriseId
)
{
return
tabWmStoreMapper
.
listWmStore
(
enterpriseId
,
null
);
return
tabWmStoreMapper
.
listWmStore
(
enterpriseId
,
null
,
null
);
}
@Override
public
List
<
TabWmStore
>
get
WmListByAppId
(
Integer
enterpriseId
,
String
app
Id
)
{
return
tabWmStoreMapper
.
listWmStore
(
enterpriseId
,
appId
);
public
List
<
TabWmStore
>
get
HasAuth
(
Integer
enterprise
Id
)
{
return
tabWmStoreMapper
.
listWmStore
(
enterpriseId
,
null
,
1
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/WmStoreApiServiceImpl.java
View file @
e6c39311
...
...
@@ -3,9 +3,11 @@ package com.gic.enterprise.service.outer.impl;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.wm.*
;
import
com.gic.enterprise.entity.TabWmStoreSyncLog
;
import
com.gic.enterprise.service.*
;
import
com.gic.weimob.api.service.WeimobMerchantService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -38,6 +40,8 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
private
WmStoreCouponConfigService
wmStoreCouponConfigService
;
@Autowired
private
WmStoreSyncLogService
wmStoreSyncLogService
;
@Autowired
private
WeimobMerchantService
weimobMerchantService
;
@Override
public
ServiceResponse
<
Integer
>
saveWmStore
(
WmStoreDTO
wmStoreDTO
)
{
...
...
@@ -138,8 +142,11 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
}
@Override
public
ServiceResponse
<
List
<
WmCouponPackageDTO
>>
getWmListByAppId
(
Integer
enterpriseId
,
String
appId
)
{
List
<
TabWmStore
>
list
=
wmStoreService
.
getWmListByAppId
(
enterpriseId
,
appId
);
public
ServiceResponse
<
List
<
WmCouponPackageDTO
>>
getWmListByAppId
(
Integer
enterpriseId
,
Long
memberCardAreaId
)
{
if
(
memberCardAreaId
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"会员卡域ID为空"
);
}
List
<
TabWmStore
>
list
=
wmStoreService
.
getHasAuth
(
enterpriseId
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
return
ServiceResponse
.
success
(
list
.
stream
()
...
...
@@ -148,7 +155,10 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
ServiceResponse
<
TabWmStoreConfig
>
result
=
getWmConfig
(
e
.
getWmMallStoreId
(),
WmStoreConfigTypeEnum
.
COUPON_CONFIG
);
if
(
result
.
isSuccess
())
{
if
(
"2"
.
equals
(
JSON
.
parseObject
(
result
.
getResult
().
getStoreConfigJson
()).
getString
(
"couponMode"
)))
{
return
true
;
//
if
(
memberCardAreaId
.
toString
().
equals
(
getMemberCardArea
(
e
.
getWmMallStoreId
())))
{
return
true
;
}
}
}
return
false
;
...
...
@@ -162,6 +172,16 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
return
ServiceResponse
.
success
(
Collections
.
emptyList
());
}
private
String
getMemberCardArea
(
Integer
wmMallStoreId
)
{
ServiceResponse
<
Long
>
result
=
weimobMerchantService
.
getMcuAreaId
(
wmMallStoreId
);
if
(
result
.
isSuccess
())
{
if
(
result
.
getResult
()
!=
null
)
{
return
result
.
getResult
().
toString
();
}
}
return
null
;
}
private
ServiceResponse
<
TabWmStoreConfig
>
getWmConfig
(
Integer
wmMallStoreId
,
WmStoreConfigTypeEnum
typeEnum
)
{
TabWmStore
record
=
wmStoreService
.
getByWmMallStoreId
(
wmMallStoreId
);
if
(
record
==
null
)
{
...
...
gic-platform-enterprise-service/src/main/resources/dubbo-gic-platform-enterprise-service.xml
View file @
e6c39311
...
...
@@ -140,4 +140,6 @@
<dubbo:reference
interface=
"com.gic.member.api.service.UserOwnerApiService"
id=
"userOwnerApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.marketing.process.api.service.sms.SmsSendApiService"
id=
"smsSendApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.wechat.business.api.service.wxa.WeixinWxaFunService"
id=
"weixinWxaFunService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.weimob.api.service.WeimobMerchantService"
id=
"weimobMerchantService"
timeout=
"6000"
/>
</beans>
gic-platform-enterprise-service/src/main/resources/mapper/TabWmStoreMapper.xml
View file @
e6c39311
...
...
@@ -239,6 +239,9 @@
<if
test=
"appId != null and appId != '' "
>
and wm_appid = #{appId}
</if>
<if
test=
"authStatus != null"
>
and auth_status = #{authStatus}
</if>
</select>
<select
id=
"getByWmMainAccount"
resultMap=
"BaseResultMap"
>
...
...
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