Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
QianQiXiang
haoban-manage3.0
Commits
d71be61e
Commit
d71be61e
authored
Jul 15, 2021
by
xuwenqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:代码优化
parent
c5db5d23
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
114 additions
and
129 deletions
+114
-129
DealSyncOperationApiService.java
...aoban/manage/api/service/DealSyncOperationApiService.java
+49
-40
MemberUnionidRelatedApiService.java
...an/manage/api/service/MemberUnionidRelatedApiService.java
+10
-9
FriendSyncNewOperation.java
...an/manage/service/task/friend/FriendSyncNewOperation.java
+4
-3
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+51
-77
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DealSyncOperationApiService.java
View file @
d71be61e
...
@@ -2,7 +2,6 @@ package com.gic.haoban.manage.api.service;
...
@@ -2,7 +2,6 @@ package com.gic.haoban.manage.api.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.PreDealLogInfoDTO
;
import
com.gic.haoban.manage.api.dto.PreDealLogInfoDTO
;
import
com.gic.haoban.manage.api.dto.SyncCheckDTO
;
import
com.gic.haoban.manage.api.dto.SyncCheckDTO
;
import
com.gic.haoban.manage.api.dto.SyncSingleDealDTO
;
import
com.gic.haoban.manage.api.dto.SyncSingleDealDTO
;
...
@@ -19,10 +18,11 @@ public interface DealSyncOperationApiService {
...
@@ -19,10 +18,11 @@ public interface DealSyncOperationApiService {
/**
/**
* 部门同步处理
* 部门同步处理
* "routerName": "departmentSyncDealMq"
*
*
* @param params
* @param params
*/
*/
public
void
departmentDealMq
(
String
params
);
void
departmentDealMq
(
String
params
);
/**
/**
* 处理前端数据
* 处理前端数据
...
@@ -30,14 +30,14 @@ public interface DealSyncOperationApiService {
...
@@ -30,14 +30,14 @@ public interface DealSyncOperationApiService {
* @param addList
* @param addList
* @param editList
* @param editList
*/
*/
public
void
dealDepartment
(
String
taskId
,
String
wxEnterpriseId
,
List
<
SyncSingleDealDTO
>
addList
,
List
<
SyncSingleDealDTO
>
editList
);
void
dealDepartment
(
String
taskId
,
String
wxEnterpriseId
,
List
<
SyncSingleDealDTO
>
addList
,
List
<
SyncSingleDealDTO
>
editList
);
/**
/**
* 重新执行任务
* 重新执行任务
*
*
* @param taskId
* @param taskId
*/
*/
public
void
reDealDepartment
(
String
taskId
,
int
dataType
);
void
reDealDepartment
(
String
taskId
,
int
dataType
);
/**
/**
* 创建任务
* 创建任务
...
@@ -46,7 +46,7 @@ public interface DealSyncOperationApiService {
...
@@ -46,7 +46,7 @@ public interface DealSyncOperationApiService {
* @param userId
* @param userId
* @param desc
* @param desc
*/
*/
public
String
createTask
(
String
wxEnterpriseId
,
String
taskName
,
String
userId
,
String
desc
);
String
createTask
(
String
wxEnterpriseId
,
String
taskName
,
String
userId
,
String
desc
);
/**
/**
* 创建任务
* 创建任务
...
@@ -55,7 +55,7 @@ public interface DealSyncOperationApiService {
...
@@ -55,7 +55,7 @@ public interface DealSyncOperationApiService {
* @param userId
* @param userId
* @param desc
* @param desc
*/
*/
public
String
createQywxTask
(
String
wxEnterpriseId
,
String
taskName
,
String
userId
,
String
desc
);
String
createQywxTask
(
String
wxEnterpriseId
,
String
taskName
,
String
userId
,
String
desc
);
/**
/**
* 关闭任务
* 关闭任务
...
@@ -63,7 +63,7 @@ public interface DealSyncOperationApiService {
...
@@ -63,7 +63,7 @@ public interface DealSyncOperationApiService {
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
public
boolean
closeTask
(
String
wxEnterpriseId
);
boolean
closeTask
(
String
wxEnterpriseId
);
/**
/**
...
@@ -71,7 +71,7 @@ public interface DealSyncOperationApiService {
...
@@ -71,7 +71,7 @@ public interface DealSyncOperationApiService {
*
*
* @param taskId
* @param taskId
*/
*/
public
void
unlockTask
(
String
taskId
);
void
unlockTask
(
String
taskId
);
/**
/**
* 校验是否锁
* 校验是否锁
...
@@ -79,7 +79,7 @@ public interface DealSyncOperationApiService {
...
@@ -79,7 +79,7 @@ public interface DealSyncOperationApiService {
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
public
String
getTaskLock
(
String
wxEnterpriseId
);
String
getTaskLock
(
String
wxEnterpriseId
);
/**
/**
* 校验同步状态
* 校验同步状态
...
@@ -87,7 +87,7 @@ public interface DealSyncOperationApiService {
...
@@ -87,7 +87,7 @@ public interface DealSyncOperationApiService {
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
public
SyncCheckDTO
getTaskCheck
(
String
wxEnterpriseId
);
SyncCheckDTO
getTaskCheck
(
String
wxEnterpriseId
);
/**
/**
* 同步日志
* 同步日志
...
@@ -95,7 +95,7 @@ public interface DealSyncOperationApiService {
...
@@ -95,7 +95,7 @@ public interface DealSyncOperationApiService {
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
public
Page
<
SyncTaskDTO
>
listSyncTask
(
String
wxEnterpriseId
,
BasePageInfo
pageInfo
);
Page
<
SyncTaskDTO
>
listSyncTask
(
String
wxEnterpriseId
,
BasePageInfo
pageInfo
);
/**
/**
* 同步日志
* 同步日志
...
@@ -103,52 +103,60 @@ public interface DealSyncOperationApiService {
...
@@ -103,52 +103,60 @@ public interface DealSyncOperationApiService {
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
public
Page
<
PreDealLogInfoDTO
>
listSyncTaskDetail
(
String
wxEnterpriseId
,
String
taskId
,
BasePageInfo
pageInfo
);
Page
<
PreDealLogInfoDTO
>
listSyncTaskDetail
(
String
wxEnterpriseId
,
String
taskId
,
BasePageInfo
pageInfo
);
/**
/**
* 处理同步
* 处理同步
*/
*/
public
String
dealQywxDepartment
(
String
taskId
,
String
wxEnterpriseId
);
String
dealQywxDepartment
(
String
taskId
,
String
wxEnterpriseId
);
/**
/**
* 清理不存在的数据
* 清理不存在的数据
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @param taskId
* @param taskId
*/
*/
public
void
cleanDiffrence
(
String
wxEnterpriseId
,
String
taskId
);
void
cleanDiffrence
(
String
wxEnterpriseId
,
String
taskId
);
/**
/**
* 创建企业微信好友刷新任务
* 创建企业微信好友刷新任务
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @param taskName
* @param taskName
* @param staffId
* @param staffId
* @param desc
* @param desc
* @return
* @return
*/
*/
public
String
createWxFriendTask
(
String
wxEnterpriseId
,
String
taskName
,
String
staffId
,
String
desc
);
String
createWxFriendTask
(
String
wxEnterpriseId
,
String
taskName
,
String
staffId
,
String
desc
);
/**
* 处理需要处理的导购
/**
* @param taskId
* 处理需要处理的导购
* @param wxEnterpriseId
*
*/
* @param taskId
public
void
dealWxFriendClerk
(
String
taskId
,
String
wxEnterpriseId
);
* @param wxEnterpriseId
/**
*/
void
dealWxFriendClerk
(
String
taskId
,
String
wxEnterpriseId
);
/**
* 创建企业微信好友刷新任务
* 创建企业微信好友刷新任务
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @param taskName
* @param taskName
* @param staffId
* @param staffId
* @return
* @return
*/
*/
public
String
createWxFriendTaskSingle
(
String
wxEnterpriseId
,
String
taskName
,
String
staffId
,
String
staffName
,
int
syncTaskType
);
String
createWxFriendTaskSingle
(
String
wxEnterpriseId
,
String
taskName
,
String
staffId
,
String
staffName
,
int
syncTaskType
);
/**
/**
* 单个导购刷新
* 单个导购刷新
* @param taskId
*
* @param wxUserId
* @param taskId
* @param staffId
* @param wxUserId
* @param wxEnterpriseId
* @param staffId
*/
* @param wxEnterpriseId
public
void
dealWxFriendClerkSingle
(
String
taskId
,
String
wxUserId
,
String
staffId
,
String
wxEnterpriseId
);
*/
void
dealWxFriendClerkSingle
(
String
taskId
,
String
wxUserId
,
String
staffId
,
String
wxEnterpriseId
);
/**
/**
* 单个导购刷新
* 单个导购刷新
...
@@ -156,16 +164,17 @@ public interface DealSyncOperationApiService {
...
@@ -156,16 +164,17 @@ public interface DealSyncOperationApiService {
* @param taskId
* @param taskId
* @param wxEnterpriseId
* @param wxEnterpriseId
*/
*/
public
void
dealWxFriendStore
(
String
taskId
,
String
storeId
,
String
wxEnterpriseId
);
void
dealWxFriendStore
(
String
taskId
,
String
storeId
,
String
wxEnterpriseId
);
/**
/**
* 定时
* 定时
* @param res
*
*/
* @param res
*/
@Deprecated
@Deprecated
public
void
quartWxFriendClerk
(
String
res
);
void
quartWxFriendClerk
(
String
res
);
void
test
(
String
wxEnterpriseId
,
String
taskId
);
void
test
(
String
wxEnterpriseId
,
String
taskId
);
/**
/**
* 获取刷新状态
* 获取刷新状态
...
@@ -174,7 +183,7 @@ public interface DealSyncOperationApiService {
...
@@ -174,7 +183,7 @@ public interface DealSyncOperationApiService {
* @param staffId
* @param staffId
* @return true 刷新中 false 没刷新或刷新完成
* @return true 刷新中 false 没刷新或刷新完成
*/
*/
public
boolean
getFreshFriendSyncTask
(
String
wxEnterpriseId
,
String
staffId
);
boolean
getFreshFriendSyncTask
(
String
wxEnterpriseId
,
String
staffId
);
/**
/**
* 创建标签任务
* 创建标签任务
...
@@ -182,7 +191,7 @@ public interface DealSyncOperationApiService {
...
@@ -182,7 +191,7 @@ public interface DealSyncOperationApiService {
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
public
String
createTagTask
(
String
wxEnterpriseId
,
String
addUser
,
String
memberTagId
);
String
createTagTask
(
String
wxEnterpriseId
,
String
addUser
,
String
memberTagId
);
/**
/**
* 执行任务
* 执行任务
...
@@ -192,5 +201,5 @@ public interface DealSyncOperationApiService {
...
@@ -192,5 +201,5 @@ public interface DealSyncOperationApiService {
* @param tagIds
* @param tagIds
* @param taskId
* @param taskId
*/
*/
public
void
dealTagTask
(
String
wxEnterpriseId
,
String
enterpriseId
,
List
<
String
>
tagIds
,
String
taskId
);
void
dealTagTask
(
String
wxEnterpriseId
,
String
enterpriseId
,
List
<
String
>
tagIds
,
String
taskId
);
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MemberUnionidRelatedApiService.java
View file @
d71be61e
...
@@ -34,28 +34,29 @@ public interface MemberUnionidRelatedApiService {
...
@@ -34,28 +34,29 @@ public interface MemberUnionidRelatedApiService {
void
editMemberUnionidRelated
(
MemberUnionidRelatedDTO
dto
);
void
editMemberUnionidRelated
(
MemberUnionidRelatedDTO
dto
);
/**
/**
* 处理外部联系人异步
* 处理外部联系人异步
*
* "routerName": "dealQywxExternalUserMq"
* @param params
*
*/
* @param params
*/
void
dealQywxExternalUser
(
String
params
);
void
dealQywxExternalUser
(
String
params
);
ExternalClerkRelatedDTO
getByMemberId
(
String
staffId
,
String
memberId
);
ExternalClerkRelatedDTO
getByMemberId
(
String
staffId
,
String
memberId
);
List
<
MemberUnionidRelatedDTO
>
getByWxUserIdAndWxEnterpriseId
(
String
wxUserId
,
String
wxEnterpriseId
);
List
<
MemberUnionidRelatedDTO
>
getByWxUserIdAndWxEnterpriseId
(
String
wxUserId
,
String
wxEnterpriseId
);
List
<
MemberUnionidRelatedDTO
>
listByEnterpriseIdAndDate
(
String
enterpriseId
,
Date
date
);
List
<
MemberUnionidRelatedDTO
>
listByEnterpriseIdAndDate
(
String
enterpriseId
,
Date
date
);
List
<
MemberStoreDTO
>
listByExTernalUseridAndWxUserId
(
String
externalUserid
,
String
wxUserId
);
List
<
MemberStoreDTO
>
listByExTernalUseridAndWxUserId
(
String
externalUserid
,
String
wxUserId
);
String
add
(
String
wxEnterpriseId
,
String
selfExternalUserId
,
String
userId1
,
String
storeId
);
String
add
(
String
wxEnterpriseId
,
String
selfExternalUserId
,
String
userId1
,
String
storeId
);
void
freshWxFrend
(
String
wxEnterpriseId
,
String
wxUserId
,
String
storeId
);
void
freshWxFrend
(
String
wxEnterpriseId
,
String
wxUserId
,
String
storeId
);
public
void
cleanByCid
(
String
cid
);
void
cleanByCid
(
String
cid
);
Page
<
MemberUnionidRelatedDTO
>
pageMemberUnionByParams
(
List
<
String
>
userIdList
,
List
<
String
>
sendMemberIds
,
Page
<
MemberUnionidRelatedDTO
>
pageMemberUnionByParams
(
List
<
String
>
userIdList
,
List
<
String
>
sendMemberIds
,
String
enterpriseId
,
BasePageInfo
pageInfo
);
String
enterpriseId
,
BasePageInfo
pageInfo
);
String
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
);
String
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/friend/FriendSyncNewOperation.java
View file @
d71be61e
...
@@ -26,14 +26,15 @@ import com.gic.member.api.dto.MemberDTO;
...
@@ -26,14 +26,15 @@ import com.gic.member.api.dto.MemberDTO;
import
com.gic.member.api.service.MemberOpenCardBusinessService
;
import
com.gic.member.api.service.MemberOpenCardBusinessService
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -217,7 +218,7 @@ public class FriendSyncNewOperation implements BaseSyncOperation {
...
@@ -217,7 +218,7 @@ public class FriendSyncNewOperation implements BaseSyncOperation {
return
"导购码不存在:"
+
clerkCode
;
return
"导购码不存在:"
+
clerkCode
;
}
}
MemberDTO
member
=
null
;
MemberDTO
member
=
null
;
if
(
clerk
!=
null
&&
StringUtils
.
isNotBlank
(
qrcodeParam
)
&&
StringUtils
.
isNotBlank
(
externalUserDTO
.
getUnionId
()))
{
if
(
StringUtils
.
isNotBlank
(
qrcodeParam
)
&&
StringUtils
.
isNotBlank
(
externalUserDTO
.
getUnionId
()))
{
member
=
memberOpenCardBusinessService
.
getMemberByQywxChannelParam
(
staffClerkRelationDTO
.
getEnterpriseId
(),
member
=
memberOpenCardBusinessService
.
getMemberByQywxChannelParam
(
staffClerkRelationDTO
.
getEnterpriseId
(),
externalUserDTO
.
getUnionId
(),
""
,
externalUserDTO
.
getName
(),
externalUserDTO
.
getAvatar
(),
qrcodeParam
);
externalUserDTO
.
getUnionId
(),
""
,
externalUserDTO
.
getName
(),
externalUserDTO
.
getAvatar
(),
qrcodeParam
);
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
d71be61e
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
com.gic.haoban.manage.api.dto.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.dubbo.common.utils.CollectionUtils
;
import
com.alibaba.dubbo.common.utils.CollectionUtils
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
...
@@ -37,20 +18,23 @@ import com.gic.enterprise.api.service.StoreService;
...
@@ -37,20 +18,23 @@ import com.gic.enterprise.api.service.StoreService;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.data.api.dto.HaobanDataDTO
;
import
com.gic.haoban.data.api.dto.HaobanDataDTO
;
import
com.gic.haoban.data.api.service.HaobanDataApiService
;
import
com.gic.haoban.data.api.service.HaobanDataApiService
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.StoreFieldEnum
;
import
com.gic.haoban.manage.api.enums.StoreFieldEnum
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.api.service.AuditSettingApiService
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.web.anno.IgnoreLogin
;
import
com.gic.haoban.manage.web.anno.IgnoreLogin
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.StaffStoreVO
;
import
com.gic.haoban.manage.web.vo.StaffStoreVO
;
import
com.gic.haoban.manage.web.vo.StoreDetailVO
;
import
com.gic.haoban.manage.web.vo.StoreDetailVO
;
import
com.gic.haoban.manage.web.vo.StoreVO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RestController
public
class
StoreController
extends
WebBaseController
{
public
class
StoreController
extends
WebBaseController
{
...
@@ -59,10 +43,6 @@ public class StoreController extends WebBaseController{
...
@@ -59,10 +43,6 @@ public class StoreController extends WebBaseController{
@Autowired
@Autowired
private
ClerkService
clerkService
;
private
ClerkService
clerkService
;
@Autowired
@Autowired
private
StaffApiService
staffApiService
;
@Autowired
private
DepartmentApiService
departmentApiService
;
@Autowired
private
StaffDepartmentRelatedApiService
staffDepartmentRelatedApiService
;
private
StaffDepartmentRelatedApiService
staffDepartmentRelatedApiService
;
@Autowired
@Autowired
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
...
@@ -78,9 +58,9 @@ public class StoreController extends WebBaseController{
...
@@ -78,9 +58,9 @@ public class StoreController extends WebBaseController{
private
ClerkMainStoreRelatedApiService
clerkMainStoreRelatedApiService
;
private
ClerkMainStoreRelatedApiService
clerkMainStoreRelatedApiService
;
@Autowired
@Autowired
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
//门店列表
//门店列表
@RequestMapping
(
"/store-list"
)
@RequestMapping
(
"/store-list"
)
public
HaobanResponse
storeList
(
String
staffId
,
String
wxEnterpriseId
,
String
version
)
{
public
HaobanResponse
storeList
(
String
staffId
,
String
wxEnterpriseId
,
String
version
)
{
...
@@ -112,39 +92,37 @@ public class StoreController extends WebBaseController{
...
@@ -112,39 +92,37 @@ public class StoreController extends WebBaseController{
continue
;
continue
;
}
}
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkCode
(
staffClerkRelationDTO
.
getEnterpriseId
(),
staffClerkRelationDTO
.
getClerkCode
());
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkCode
(
staffClerkRelationDTO
.
getEnterpriseId
(),
staffClerkRelationDTO
.
getClerkCode
());
if
(
clerk
!=
null
)
{
if
(
clerk
==
null
)
{
StoreDTO
store
=
storeService
.
getStore
(
clerk
.
getStoreId
());
continue
;
if
(
store
==
null
)
{
}
continue
;
StoreDTO
store
=
storeService
.
getStore
(
clerk
.
getStoreId
());
}
if
(
store
==
null
)
{
//主门店标志
continue
;
int
mainStoreFlag
=
0
;
}
if
(
StringUtils
.
isEmpty
(
storeId
))
{
//主门店标志
mainStoreFlag
=
0
;
int
mainStoreFlag
=
0
;
}
else
if
(
storeId
.
equals
(
store
.
getStoreId
()))
{
if
(
storeId
.
equals
(
store
.
getStoreId
()))
{
mainStoreFlag
=
1
;
mainStoreFlag
=
1
;
}
EnterpriseDetailDTO
enterpriseDetailDTO
=
enterpriseTypeMap
.
get
(
clerk
.
getEnterpriseId
());
staffDepartmentRelatedApiService
.
listByStaffId
(
staffId
);
StaffStoreVO
vo
=
new
StaffStoreVO
();
vo
.
setClerkCode
(
clerk
.
getClerkCode
());
vo
.
setWxEnterpriseType
(
enterpriseDetailDTO
!=
null
?
enterpriseDetailDTO
.
getWxEnterpriseType
()
:
null
);
vo
.
setMemberOpenCardFlag
(
enterpriseDetailDTO
!=
null
?
enterpriseDetailDTO
.
getMemberOpenCardFlag
()
:
null
);
vo
.
setClerkId
(
clerk
.
getClerkId
());
vo
.
setClerkType
(
clerk
.
getClerkType
());
vo
.
setEnterpriseId
(
clerk
.
getEnterpriseId
());
vo
.
setMainStoreFlag
(
mainStoreFlag
);
vo
.
setPhoneNumber
(
clerk
.
getPhoneNumber
());
vo
.
setStaffId
(
staffId
);
vo
.
setStoreId
(
clerk
.
getStoreId
());
vo
.
setStoreImg
(
store
.
getStoreImage
());
vo
.
setStoreName
(
store
.
getStoreName
());
vo
.
setWxEnterpriseId
(
wxEnterpriseId
);
vo
.
setClerkName
(
clerk
.
getClerkName
());
vo
.
setBindFlag
(
1
);
list
.
add
(
vo
);
}
}
EnterpriseDetailDTO
enterpriseDetailDTO
=
enterpriseTypeMap
.
get
(
clerk
.
getEnterpriseId
());
staffDepartmentRelatedApiService
.
listByStaffId
(
staffId
);
StaffStoreVO
vo
=
new
StaffStoreVO
();
vo
.
setClerkCode
(
clerk
.
getClerkCode
());
vo
.
setWxEnterpriseType
(
enterpriseDetailDTO
!=
null
?
enterpriseDetailDTO
.
getWxEnterpriseType
()
:
null
);
vo
.
setMemberOpenCardFlag
(
enterpriseDetailDTO
!=
null
?
enterpriseDetailDTO
.
getMemberOpenCardFlag
()
:
null
);
vo
.
setClerkId
(
clerk
.
getClerkId
());
vo
.
setClerkType
(
clerk
.
getClerkType
());
vo
.
setEnterpriseId
(
clerk
.
getEnterpriseId
());
vo
.
setMainStoreFlag
(
mainStoreFlag
);
vo
.
setPhoneNumber
(
clerk
.
getPhoneNumber
());
vo
.
setStaffId
(
staffId
);
vo
.
setStoreId
(
clerk
.
getStoreId
());
vo
.
setStoreImg
(
store
.
getStoreImage
());
vo
.
setStoreName
(
store
.
getStoreName
());
vo
.
setWxEnterpriseId
(
wxEnterpriseId
);
vo
.
setClerkName
(
clerk
.
getClerkName
());
vo
.
setBindFlag
(
1
);
list
.
add
(
vo
);
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
...
@@ -329,19 +307,15 @@ public class StoreController extends WebBaseController{
...
@@ -329,19 +307,15 @@ public class StoreController extends WebBaseController{
return
true
;
return
true
;
}
}
EnterpriseDTO
enterprise
=
enterpriseService
.
getEnterpriseByEid
(
store
.
getEnterpriseId
());
EnterpriseDTO
enterprise
=
enterpriseService
.
getEnterpriseByEid
(
store
.
getEnterpriseId
());
if
(
enterprise
==
null
||
enterprise
.
getStatus
()
!=
1
)
{
if
(
enterprise
==
null
||
enterprise
.
getStatus
()
!=
1
)
{
return
true
;
return
true
;
}
if
(
enterprise
.
getExpireTime
()
==
null
)
{
if
(
enterprise
.
getEnabledState
()
==
null
)
{
return
false
;
}
else
if
(
enterprise
.
getEnabledState
()
==
1
)
{
return
false
;
}
}
else
if
(
enterprise
.
getExpireTime
().
getTime
()
>
System
.
currentTimeMillis
()
&&
enterprise
.
getEnabledState
()
==
1
)
{
return
false
;
}
}
return
true
;
if
(
enterprise
.
getExpireTime
()
==
null
)
{
if
(
enterprise
.
getEnabledState
()
==
null
)
{
return
false
;
}
else
return
enterprise
.
getEnabledState
()
!=
1
;
}
else
return
enterprise
.
getExpireTime
().
getTime
()
<=
System
.
currentTimeMillis
()
||
enterprise
.
getEnabledState
()
!=
1
;
}
}
...
...
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