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
haoban3.0
haoban-manage3.0
Commits
690bf483
Commit
690bf483
authored
Apr 09, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer_repair_contact20200408' into 'master'
Developer repair contact20200408 See merge request
!39
parents
0188aa4a
72814d98
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
716 additions
and
382 deletions
+716
-382
MemberStoreDTO.java
...in/java/com/gic/haoban/manage/api/dto/MemberStoreDTO.java
+27
-0
MemberUnionidRelatedDTO.java
...om/gic/haoban/manage/api/dto/MemberUnionidRelatedDTO.java
+10
-0
WxEnterpriseDTO.java
...n/java/com/gic/haoban/manage/api/dto/WxEnterpriseDTO.java
+11
-0
DepartmentApiService.java
...m/gic/haoban/manage/api/service/DepartmentApiService.java
+1
-1
MemberUnionidRelatedApiService.java
...an/manage/api/service/MemberUnionidRelatedApiService.java
+3
-0
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+1
-1
pom.xml
haoban-manage3-service/pom.xml
+6
-0
MemberUnionidRelatedMapper.java
...manage/service/dao/mapper/MemberUnionidRelatedMapper.java
+4
-1
StaffDepartmentRelatedMapper.java
...nage/service/dao/mapper/StaffDepartmentRelatedMapper.java
+3
-0
MemberUnionidRelated.java
...ic/haoban/manage/service/entity/MemberUnionidRelated.java
+11
-0
TabHaobanWxEnterprise.java
...c/haoban/manage/service/entity/TabHaobanWxEnterprise.java
+12
-0
MemberUnionRelatedService.java
...ban/manage/service/service/MemberUnionRelatedService.java
+1
-1
StaffDepartmentRelatedService.java
...manage/service/service/StaffDepartmentRelatedService.java
+3
-0
MemberUnionRelatedServiceImpl.java
...e/service/service/impl/MemberUnionRelatedServiceImpl.java
+2
-2
StaffDepartmentRelatedServiceImpl.java
...rvice/service/impl/StaffDepartmentRelatedServiceImpl.java
+6
-1
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+78
-139
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+104
-2
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+28
-11
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+121
-144
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+1
-0
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+2
-5
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-0
MemberUnionidRelatedMapper.xml
.../src/main/resources/mapper/MemberUnionidRelatedMapper.xml
+23
-4
StaffDepartmentRelatedMapper.xml
...rc/main/resources/mapper/StaffDepartmentRelatedMapper.xml
+9
-0
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+14
-3
ServiceTest.java
haoban-manage3-service/src/test/java/ServiceTest.java
+1
-1
AdminController.java
...com/gic/haoban/manage/web/controller/AdminController.java
+1
-1
ApplicationController.java
...c/haoban/manage/web/controller/ApplicationController.java
+11
-6
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+65
-58
HttpLimit.java
...c/main/java/com/gic/haoban/manage/web/anno/HttpLimit.java
+21
-0
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+5
-0
InfoController.java
.../com/gic/haoban/manage/web/controller/InfoController.java
+16
-0
HaoBanErrCode.java
...java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
+2
-0
HttpLimitInterceptor.java
...c/haoban/manage/web/interceptor/HttpLimitInterceptor.java
+94
-0
AppStaffVo.java
...rc/main/java/com/gic/haoban/manage/web/vo/AppStaffVo.java
+8
-0
InfoVo.java
...wx/src/main/java/com/gic/haoban/manage/web/vo/InfoVo.java
+8
-1
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+1
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MemberStoreDTO.java
0 → 100644
View file @
690bf483
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
MemberStoreDTO
implements
Serializable
{
private
String
memberId
;
private
String
storeId
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getMemberId
()
{
return
memberId
;
}
public
void
setMemberId
(
String
memberId
)
{
this
.
memberId
=
memberId
;
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MemberUnionidRelatedDTO.java
View file @
690bf483
...
...
@@ -16,6 +16,8 @@ public class MemberUnionidRelatedDTO implements Serializable{
private
String
unionid
;
private
String
wxEnterpriseId
;
private
String
enterpriseId
;
private
Integer
statusFlag
;
...
...
@@ -147,5 +149,13 @@ public class MemberUnionidRelatedDTO implements Serializable{
this
.
addCreateTime
=
addCreateTime
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WxEnterpriseDTO.java
View file @
690bf483
...
...
@@ -60,6 +60,8 @@ public class WxEnterpriseDTO implements Serializable {
private
String
wxSecretKey
;
private
String
memberSecret
;
private
String
contactSecret
;
private
Date
createTime
;
...
...
@@ -317,6 +319,15 @@ public class WxEnterpriseDTO implements Serializable {
this
.
wxSecretKey
=
wxSecretKey
;
}
public
String
getContactSecret
()
{
return
contactSecret
;
}
public
void
setContactSecret
(
String
contactSecret
)
{
this
.
contactSecret
=
contactSecret
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DepartmentApiService.java
View file @
690bf483
...
...
@@ -120,7 +120,7 @@ public interface DepartmentApiService {
List
<
DepartmentDTO
>
listByChainId
(
String
chainId
,
String
wxEnterpriseId
);
void
initwxDepartment
(
String
corpid
,
String
suiteid
,
String
wxEnterpriseId
);
void
initwxDepartment
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
);
/**
* 回收站的数量
* @param wxEnterpriseId
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MemberUnionidRelatedApiService.java
View file @
690bf483
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.service;
import
java.util.List
;
import
com.gic.haoban.manage.api.dto.MemberStoreDTO
;
import
com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO
;
public
interface
MemberUnionidRelatedApiService
{
...
...
@@ -15,5 +16,7 @@ public interface MemberUnionidRelatedApiService {
MemberUnionidRelatedDTO
getByMemberId
(
String
staffId
,
String
memberId
);
List
<
MemberUnionidRelatedDTO
>
getByWxUserIdAndWxEnterpriseId
(
String
wxUserId
,
String
wxEnterpriseId
);
List
<
MemberStoreDTO
>
listByExTernalUseridAndWxUserId
(
String
externalUserid
,
String
wxUserId
);
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
690bf483
...
...
@@ -47,7 +47,7 @@ public interface StaffApiService {
StaffDepartmentRelatedDTO
getDepartmentIdAndCode
(
String
departmentId
,
String
code
);
void
initWxUser
(
String
corpid
,
String
suiteid
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
);
void
initWxUser
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
);
public
List
<
String
>
listUnBindClerk
(
String
storeId
);
...
...
haoban-manage3-service/pom.xml
View file @
690bf483
...
...
@@ -105,6 +105,12 @@
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-search-engine-api
</artifactId>
<version>
${gic-search-engine-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-member-api
</artifactId>
<version>
3.0-SNAPSHOT
</version>
<scope>
compile
</scope>
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/MemberUnionidRelatedMapper.java
View file @
690bf483
...
...
@@ -26,6 +26,8 @@ public interface MemberUnionidRelatedMapper {
List
<
MemberUnionidRelated
>
getByWxUserIdAndWxEnterpriseId
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
MemberUnionidRelated
getByParams
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"
wxEnterpriseId"
)
String
wxE
nterpriseId
,
MemberUnionidRelated
getByParams
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"
enterpriseId"
)
String
e
nterpriseId
,
@Param
(
"externalName"
)
String
name
,
@Param
(
"addCreateTime"
)
String
createTime
);
List
<
MemberUnionidRelated
>
listByExTernalUseridAndWxUserId
(
@Param
(
"externalUserid"
)
String
externalUserid
,
@Param
(
"wxUserId"
)
String
wxUserId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffDepartmentRelatedMapper.java
View file @
690bf483
...
...
@@ -43,5 +43,7 @@ public interface StaffDepartmentRelatedMapper {
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdByKeyword
(
@Param
(
"departmentId"
)
String
departmentId
,
@Param
(
"keyword"
)
String
keyword
);
int
countByDepartmentIds
(
@Param
(
"departmentIds"
)
List
<
String
>
departmentIds
);
List
<
TabHaobanStaffDepartmentRelated
>
listByWxUserId
(
@Param
(
"wxUserId"
)
String
wxUserId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/MemberUnionidRelated.java
View file @
690bf483
...
...
@@ -11,6 +11,8 @@ public class MemberUnionidRelated implements Serializable {
private
String
unionid
;
private
String
wxEnterpriseId
;
private
String
enterpriseId
;
private
Integer
statusFlag
;
...
...
@@ -126,6 +128,14 @@ public class MemberUnionidRelated implements Serializable {
this
.
addCreateTime
=
addCreateTime
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanWxEnterprise.java
View file @
690bf483
...
...
@@ -59,6 +59,8 @@ public class TabHaobanWxEnterprise implements Serializable {
private
String
wxSecretKey
;
private
String
memberSecret
;
private
String
contactSecret
;
private
Date
createTime
;
...
...
@@ -306,6 +308,15 @@ public class TabHaobanWxEnterprise implements Serializable {
this
.
wxSecretKey
=
wxSecretKey
;
}
public
String
getContactSecret
()
{
return
contactSecret
;
}
public
void
setContactSecret
(
String
contactSecret
)
{
this
.
contactSecret
=
contactSecret
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/MemberUnionRelatedService.java
View file @
690bf483
...
...
@@ -14,7 +14,7 @@ public interface MemberUnionRelatedService {
List
<
MemberUnionidRelatedDTO
>
getByWxUserIdAndWxEnterpriseId
(
String
wxUserId
,
String
wxEnterpriseId
);
MemberUnionidRelatedDTO
getByParams
(
String
wxUserId
,
String
wxE
nterpriseId
,
String
name
,
String
createTime
);
MemberUnionidRelatedDTO
getByParams
(
String
wxUserId
,
String
e
nterpriseId
,
String
name
,
String
createTime
);
void
update
(
MemberUnionidRelatedDTO
exsitDTO
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffDepartmentRelatedService.java
View file @
690bf483
...
...
@@ -25,4 +25,7 @@ public interface StaffDepartmentRelatedService {
int
countByDepartmentId
(
String
departmentId
);
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentIdByKeyword
(
String
departmentId
,
String
keyword
);
List
<
TabHaobanStaffDepartmentRelated
>
listByWxUserId
(
String
wxUserId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MemberUnionRelatedServiceImpl.java
View file @
690bf483
...
...
@@ -46,8 +46,8 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService
}
@Override
public
MemberUnionidRelatedDTO
getByParams
(
String
wxUserId
,
String
wxE
nterpriseId
,
String
name
,
String
createTime
)
{
return
EntityUtil
.
changeEntityByJSON
(
MemberUnionidRelatedDTO
.
class
,
mapper
.
getByParams
(
wxUserId
,
wxE
nterpriseId
,
name
,
createTime
));
public
MemberUnionidRelatedDTO
getByParams
(
String
wxUserId
,
String
e
nterpriseId
,
String
name
,
String
createTime
)
{
return
EntityUtil
.
changeEntityByJSON
(
MemberUnionidRelatedDTO
.
class
,
mapper
.
getByParams
(
wxUserId
,
e
nterpriseId
,
name
,
createTime
));
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffDepartmentRelatedServiceImpl.java
View file @
690bf483
...
...
@@ -20,7 +20,12 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated
@Autowired
private
StaffDepartmentRelatedMapper
mapper
;
@Override
public
List
<
TabHaobanStaffDepartmentRelated
>
listByWxUserId
(
String
wxUserId
){
List
<
TabHaobanStaffDepartmentRelated
>
list
=
mapper
.
listByWxUserId
(
wxUserId
);
return
list
;
}
@Override
public
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentId
(
String
departmentId
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DepartmentApiServiceImpl.java
View file @
690bf483
...
...
@@ -40,11 +40,9 @@ import com.gic.haoban.manage.api.service.DepartmentApiService;
import
com.gic.haoban.manage.service.dao.mapper.DepartmentMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxApplication
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated
;
import
com.gic.haoban.manage.service.service.DepartmentService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.WxApplicationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.wechat.api.service.qywx.QywxDepartmentApiService
;
import
com.github.pagehelper.PageHelper
;
...
...
@@ -66,8 +64,6 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
@Autowired
private
WxApplicationService
wxApplicationService
;
@Autowired
private
StoreService
storeService
;
@Autowired
private
StoreGroupService
storeGroupService
;
...
...
@@ -98,39 +94,36 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
//调微信的新增接口
String
wxDepartmentId
=
""
;
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
department
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
department
.
getWxEnterpriseId
(),
1
);
logger
.
info
(
"【部门新增】enterpriseDTO = {}"
,
JSON
.
toJSONString
(
enterpriseDTO
));
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
Integer
sort
=
department
.
getSort
();
if
(
sort
==
null
)
{
int
maxSort
=
departmentMapper
.
selectMaxSort
(
department
.
getParentDepartmentId
());
department
.
setSort
(
maxSort
+
1
);
}
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
dto
=
new
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
();
dto
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
dto
.
setName
(
department
.
getDepartmentName
());
dto
.
setOrder
(
department
.
getSort
());
TabHaobanDepartment
parent
=
departmentService
.
selectById
(
department
.
getParentDepartmentId
());
dto
.
setParentid
(
Integer
.
valueOf
(
parent
.
getWxDepartmentId
()));
logger
.
info
(
"【部门新增】corpid() = {},siteId={},dto={}"
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
JSON
.
toJSONString
(
dto
));
JSONResponse
jp
=
qywxDepartmentApiService
.
createDepartment
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
dto
);
logger
.
info
(
"【部门新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信新增部门失败"
);
return
hr
;
}
wxDepartmentId
=
jp
.
getResult
().
toString
();
logger
.
info
(
"【部门新增】wxDepartmentId = {}"
,
wxDepartmentId
);
department
.
setWxDepartmentId
(
wxDepartmentId
);
department
.
setLevel
(
parent
.
getLevel
()
+
1
);
setGicEnterpriseId
(
department
);
String
departmentId
=
departmentService
.
add
(
department
);
department
.
setDepartmentId
(
departmentId
);
hr
.
setResult
(
department
);
Integer
sort
=
department
.
getSort
();
if
(
sort
==
null
)
{
int
maxSort
=
departmentMapper
.
selectMaxSort
(
department
.
getParentDepartmentId
());
department
.
setSort
(
maxSort
+
1
);
}
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
dto
=
new
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
();
dto
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
dto
.
setName
(
department
.
getDepartmentName
());
dto
.
setOrder
(
department
.
getSort
());
TabHaobanDepartment
parent
=
departmentService
.
selectById
(
department
.
getParentDepartmentId
());
dto
.
setParentid
(
Integer
.
valueOf
(
parent
.
getWxDepartmentId
()));
logger
.
info
(
"【部门新增】corpid() = {},siteId={},dto={}"
,
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
JSON
.
toJSONString
(
dto
));
JSONResponse
jp
=
qywxDepartmentApiService
.
createSelfDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
dto
);
logger
.
info
(
"【部门新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信新增部门失败"
);
return
hr
;
}
wxDepartmentId
=
jp
.
getResult
().
toString
();
logger
.
info
(
"【部门新增】wxDepartmentId = {}"
,
wxDepartmentId
);
department
.
setWxDepartmentId
(
wxDepartmentId
);
department
.
setLevel
(
parent
.
getLevel
()
+
1
);
setGicEnterpriseId
(
department
);
String
departmentId
=
departmentService
.
add
(
department
);
department
.
setDepartmentId
(
departmentId
);
hr
.
setResult
(
department
);
}
return
hr
;
...
...
@@ -172,23 +165,20 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
}
logger
.
info
(
"【部门修改】tab={}"
,
JSON
.
toJSONString
(
tab
));
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
tab
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
tab
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
dto
=
new
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
();
dto
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
dto
.
setName
(
department
.
getDepartmentName
());
dto
.
setOrder
(
department
.
getSort
());
TabHaobanDepartment
parent
=
departmentService
.
selectById
(
department
.
getParentDepartmentId
());
dto
.
setParentid
(
Integer
.
valueOf
(
parent
.
getWxDepartmentId
()));
dto
.
setId
(
Integer
.
valueOf
(
tab
.
getWxDepartmentId
()));
JSONResponse
jp
=
qywxDepartmentApiService
.
updateDepartment
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
dto
);
logger
.
info
(
"【部门修改】jp={}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信修改部门失败"
);
return
hr
;
}
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
dto
=
new
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
();
dto
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
dto
.
setName
(
department
.
getDepartmentName
());
dto
.
setOrder
(
department
.
getSort
());
TabHaobanDepartment
parent
=
departmentService
.
selectById
(
department
.
getParentDepartmentId
());
dto
.
setParentid
(
Integer
.
valueOf
(
parent
.
getWxDepartmentId
()));
dto
.
setId
(
Integer
.
valueOf
(
tab
.
getWxDepartmentId
()));
JSONResponse
jp
=
qywxDepartmentApiService
.
updateSelfDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
dto
);
logger
.
info
(
"【部门修改】jp={}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信修改部门失败"
);
return
hr
;
}
}
...
...
@@ -224,15 +214,12 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
return
hr
;
}
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
department
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
department
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
JSONResponse
jp
=
qywxDepartmentApiService
.
deleteDepartment
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
Integer
.
parseInt
(
department
.
getWxDepartmentId
()));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信删除部门失败"
);
return
hr
;
}
JSONResponse
jp
=
qywxDepartmentApiService
.
deleteSelfDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
Integer
.
parseInt
(
department
.
getWxDepartmentId
()));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信删除部门失败"
);
return
hr
;
}
}
...
...
@@ -293,15 +280,12 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
//调微信的新增接口
TabHaobanDepartment
department
=
departmentService
.
selectById
(
departmentId
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
department
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
department
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
JSONResponse
jp
=
qywxDepartmentApiService
.
deleteDepartment
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
Integer
.
parseInt
(
department
.
getWxDepartmentId
()));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信删除部门失败"
);
return
hr
;
}
JSONResponse
jp
=
qywxDepartmentApiService
.
deleteSelfDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
Integer
.
parseInt
(
department
.
getWxDepartmentId
()));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信删除部门失败"
);
return
hr
;
}
}
...
...
@@ -349,29 +333,26 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
//调微信的新增接口
String
wxDepartmentId
=
""
;
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
tab
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
tab
.
getWxEnterpriseId
(),
1
);
logger
.
info
(
"【部门新增】enterpriseDTO = {}"
,
JSON
.
toJSONString
(
enterpriseDTO
));
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
dto
=
new
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
();
dto
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
dto
.
setName
(
tab
.
getDepartmentName
());
dto
.
setOrder
(
tab
.
getSort
());
TabHaobanDepartment
parent
=
departmentService
.
selectById
(
parentId
);
dto
.
setParentid
(
Integer
.
valueOf
(
parent
.
getWxDepartmentId
()));
logger
.
info
(
"【部门新增】corpid() = {},siteId={},dto={}"
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
JSON
.
toJSONString
(
dto
));
JSONResponse
jp
=
qywxDepartmentApiService
.
createDepartment
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
dto
);
logger
.
info
(
"【部门新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信新增部门失败"
);
return
hr
;
}
wxDepartmentId
=
jp
.
getResult
().
toString
();
tab
.
setWxDepartmentId
(
wxDepartmentId
);
tab
.
setParentDepartmentId
(
parentId
);
logger
.
info
(
"【部门新增】wxDepartmentId = {}"
,
wxDepartmentId
);
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
dto
=
new
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
();
dto
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
dto
.
setName
(
tab
.
getDepartmentName
());
dto
.
setOrder
(
tab
.
getSort
());
TabHaobanDepartment
parent
=
departmentService
.
selectById
(
parentId
);
dto
.
setParentid
(
Integer
.
valueOf
(
parent
.
getWxDepartmentId
()));
logger
.
info
(
"【部门新增】corpid() = {},siteId={},dto={}"
,
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
JSON
.
toJSONString
(
dto
));
JSONResponse
jp
=
qywxDepartmentApiService
.
createSelfDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
dto
);
logger
.
info
(
"【部门新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信新增部门失败"
);
return
hr
;
}
wxDepartmentId
=
jp
.
getResult
().
toString
();
tab
.
setWxDepartmentId
(
wxDepartmentId
);
tab
.
setParentDepartmentId
(
parentId
);
logger
.
info
(
"【部门新增】wxDepartmentId = {}"
,
wxDepartmentId
);
}
departmentService
.
repairRecycle
(
tab
);
...
...
@@ -495,7 +476,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
}
@Override
public
void
initwxDepartment
(
String
corpid
,
String
suiteid
,
String
wxEnterpriseId
)
{
public
void
initwxDepartment
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
)
{
// List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = this.qywxDepartmentApiService.listDepartment(corpid, suiteid, null);
// logger.info("企业所有部门数据:{}", JSON.toJSONString(list));
//
...
...
@@ -517,56 +498,17 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
//
// DepartmentDTO parent = EntityUtil.changeEntityByJSON(DepartmentDTO.class,departmentService.selectById(parentId));
// this.addSon(subList, wxEnterpriseId, parent,corpid,suiteid);
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
=
this
.
qywxDepartmentApiService
.
list
Department
(
corpid
,
suiteid
,
null
);
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
=
this
.
qywxDepartmentApiService
.
list
SelfDepartment
(
corpid
,
contactSecret
,
null
);
logger
.
info
(
"企业所有部门数据:{}"
,
JSON
.
toJSONString
(
list
));
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
this
.
addAllDepartment
(
list
,
0
,
wxEnterpriseId
,
corpid
,
suiteid
);
}
}
public
void
addSon
(
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
,
String
wxEnterpriseId
,
DepartmentDTO
parent
,
String
corpid
,
String
suiteid
){
for
(
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
departmentDTO
:
list
)
{
String
parentId
=
addDepartment
(
departmentDTO
,
wxEnterpriseId
,
parent
,
corpid
,
suiteid
);
DepartmentDTO
parent2
=
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
departmentService
.
selectById
(
parentId
));
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
subList2
=
new
ArrayList
<>();
for
(
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
departmentDTO2
:
list
)
{
if
(
departmentDTO
.
getId
().
equals
(
departmentDTO2
.
getParentid
())){
subList2
.
add
(
departmentDTO
);
}
}
while
(!
subList2
.
isEmpty
()){
addSon
(
subList2
,
wxEnterpriseId
,
parent2
,
corpid
,
suiteid
);
}
this
.
addAllDepartment
(
list
,
0
,
wxEnterpriseId
,
corpid
,
contactSecret
);
}
}
private
String
addDepartment
(
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
departmentDTO
,
String
wxEnterpriseId
,
DepartmentDTO
parent
,
String
corpid
,
String
suiteid
){
String
parentId
=
""
;
TabHaobanDepartment
exist
=
this
.
departmentService
.
getByWxId
(
departmentDTO
.
getId
()
+
""
,
wxEnterpriseId
);
logger
.
info
(
"分组是否存在:{}"
,
JSON
.
toJSONString
(
exist
));
if
(
exist
==
null
){
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
dto
=
new
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
DepartmentDTO
();
dto
.
setDepartmentName
(
departmentDTO
.
getName
());
dto
.
setLevel
(
parent
.
getLevel
()
+
1
);
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setWxDepartmentId
(
departmentDTO
.
getId
()+
""
);
dto
.
setParentDepartmentId
(
parent
.
getDepartmentId
());
dto
.
setChainId
(
parent
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
parent
.
getDepartmentId
());
dto
.
setChainName
(
parent
.
getChainName
()
+
Constant
.
NAME_SEPARATOR
+
parent
.
getDepartmentName
());
dto
.
setSort
(
departmentDTO
.
getOrder
());
dto
.
setIsStore
(
0
);
parentId
=
this
.
departmentService
.
add
(
dto
);
this
.
staffApiService
.
initWxUser
(
corpid
,
suiteid
,
wxEnterpriseId
,
departmentDTO
.
getId
());
}
else
{
parentId
=
exist
.
getDepartmentId
();
}
return
parentId
;
}
private
void
addAllDepartment
(
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
,
Integer
parentId
,
String
wxEnterpriseId
,
String
corpid
,
String
suiteid
){
String
wxEnterpriseId
,
String
corpid
,
String
contactSecret
){
int
level
=
1
;
String
chainId
=
"0"
;
String
chainName
=
"0"
;
...
...
@@ -597,8 +539,8 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
dto
.
setIsStore
(
0
);
this
.
departmentService
.
add
(
dto
);
}
this
.
addAllDepartment
(
list
,
departmentDTO
.
getId
(),
wxEnterpriseId
,
corpid
,
suiteid
);
this
.
staffApiService
.
initWxUser
(
corpid
,
suiteid
,
wxEnterpriseId
,
departmentDTO
.
getId
());
this
.
addAllDepartment
(
list
,
departmentDTO
.
getId
(),
wxEnterpriseId
,
corpid
,
contactSecret
);
this
.
staffApiService
.
initWxUser
(
corpid
,
contactSecret
,
wxEnterpriseId
,
departmentDTO
.
getId
());
}
}
}
...
...
@@ -650,15 +592,12 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
//调微信的删除接口
TabHaobanDepartment
department
=
departmentService
.
selectById
(
departmentId
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
department
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
department
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
JSONResponse
jp
=
qywxDepartmentApiService
.
deleteDepartment
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
Integer
.
parseInt
(
department
.
getWxDepartmentId
()));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信删除部门失败"
);
return
hr
;
}
JSONResponse
jp
=
qywxDepartmentApiService
.
deleteSelfDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
Integer
.
parseInt
(
department
.
getWxDepartmentId
()));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信删除部门失败"
);
return
hr
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
690bf483
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -20,17 +24,23 @@ import com.gic.clerk.api.service.ClerkService;
import
com.gic.commons.util.MD5Utils
;
import
com.gic.commons.util.Md5Util
;
import
com.gic.commons.util.StringUtil
;
import
com.gic.haoban.contacts.manage.api.dto.SearchDataDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.MemberStoreDTO
;
import
com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper
;
import
com.gic.haoban.manage.service.entity.MemberUnionidRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated
;
import
com.gic.haoban.manage.service.service.MemberUnionRelatedService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
...
...
@@ -40,6 +50,13 @@ import com.gic.member.api.service.MemberOpenCardBusinessService;
import
com.gic.member.api.service.MemberService
;
import
com.gic.redis.data.anno.RedisLock
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.search.engine.api.constant.MemberDataEnum
;
import
com.gic.search.engine.api.constant.OperateEnum
;
import
com.gic.search.engine.api.dto.ESResponseQueryBatch
;
import
com.gic.search.engine.api.dto.ESResponseQuerySingle
;
import
com.gic.search.engine.api.dto.dynamic.DynamicSearchDTO
;
import
com.gic.search.engine.api.filter.NewNodeAddUtil
;
import
com.gic.search.engine.api.service.dynamic.ESDataDynamicOperationApiService
;
@Service
public
class
MemberUnionidRelatedApiServiceImpl
implements
MemberUnionidRelatedApiService
{
...
...
@@ -71,7 +88,91 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
@Autowired
private
DepartmentApiService
departmentApiService
;
@Autowired
private
MemberUnionidRelatedMapper
memberUnionidRelatedMapper
;
@Autowired
private
StaffDepartmentRelatedService
staffDepartmentRelatedService
;
@Autowired
private
ESDataDynamicOperationApiService
eSDataDynamicOperationApiService
;
@Override
public
List
<
MemberStoreDTO
>
listByExTernalUseridAndWxUserId
(
String
externalUserid
,
String
wxUserId
)
{
List
<
MemberUnionidRelated
>
list
=
memberUnionidRelatedMapper
.
listByExTernalUseridAndWxUserId
(
externalUserid
,
wxUserId
);
List
<
MemberStoreDTO
>
result
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isEmpty
(
list
)){
return
null
;
}
//1、查该staff的门店id
List
<
TabHaobanStaffDepartmentRelated
>
relatedIds
=
staffDepartmentRelatedService
.
listByWxUserId
(
wxUserId
);
if
(
CollectionUtil
.
isEmpty
(
relatedIds
)){
log
.
info
(
"staff关联部门不存在1"
);
return
null
;
}
List
<
String
>
departmentIds
=
relatedIds
.
stream
().
map
(
s
->
s
.
getDepartmentId
()).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isEmpty
(
departmentIds
)){
log
.
info
(
"staff部门不存在1"
);
return
null
;
}
List
<
DepartmentDTO
>
stores
=
departmentApiService
.
listByDepartmentIds
(
departmentIds
,
1
);
if
(
CollectionUtil
.
isEmpty
(
stores
)){
log
.
info
(
"staff关联门店不存在1"
);
return
null
;
}
List
<
String
>
storeIds
=
stores
.
stream
().
map
(
s
->
s
.
getRelatedId
()).
collect
(
Collectors
.
toList
());
//2、获取member的storeId
for
(
MemberUnionidRelated
tab
:
list
){
String
memberId
=
tab
.
getMemberId
();
if
(
StringUtils
.
isEmpty
(
memberId
)){
continue
;
}
String
gicEnterpriseId
=
tab
.
getEnterpriseId
();
JSONObject
searchJson
=
new
JSONObject
();
searchJson
=
NewNodeAddUtil
.
addNewNodeForAnd
(
MemberDataEnum
.
member_memberId
.
getCode
(),
OperateEnum
.
OPERATE_EQ
.
getValue
(),
memberId
,
searchJson
);
DynamicSearchDTO
dynamicSearchDTO
=
new
DynamicSearchDTO
();
dynamicSearchDTO
.
setEnterpriseId
(
gicEnterpriseId
);
dynamicSearchDTO
.
setColumnCategoryCode
(
"member"
);
dynamicSearchDTO
.
setSearchJson
(
searchJson
);
dynamicSearchDTO
.
setBegin
(
0
);
dynamicSearchDTO
.
setRecordNumber
(
1
);
log
.
info
(
"gicEnterpriseId=========>{},searchJson=========={}"
,
gicEnterpriseId
,
searchJson
);
ESResponseQueryBatch
responseQuery
=
eSDataDynamicOperationApiService
.
queryDataBatch
(
dynamicSearchDTO
,
false
,
null
);
if
(
null
==
responseQuery
){
log
.
info
(
"会员不存在1"
);
continue
;
}
List
<
JSONObject
>
res
=
responseQuery
.
getRes
();
if
(
CollectionUtil
.
isEmpty
(
res
)){
log
.
info
(
"会员不存在2"
);
continue
;
}
String
storeId
=
""
;
for
(
JSONObject
jsonObject
:
res
)
{
storeId
=
jsonObject
.
get
(
"storeId"
)
==
null
?
""
:
jsonObject
.
get
(
"storeId"
).
toString
();
}
if
(
StringUtils
.
isEmpty
(
storeId
)){
log
.
info
(
"会员门店不存在"
);
continue
;
}
String
[]
memberStoreIds
=
storeId
.
split
(
" "
);
List
<
String
>
memberStoreIdList
=
Arrays
.
asList
(
memberStoreIds
);
//取交集
memberStoreIdList
.
retainAll
(
storeIds
);
if
(
CollectionUtil
.
isEmpty
(
memberStoreIdList
)){
continue
;
}
else
{
for
(
String
resultStoreId
:
memberStoreIdList
){
MemberStoreDTO
dto
=
new
MemberStoreDTO
();
dto
.
setMemberId
(
memberId
);
dto
.
setStoreId
(
resultStoreId
);
result
.
add
(
dto
);
}
}
}
return
result
;
}
@Override
public
MemberUnionidRelatedDTO
getByUnionId
(
String
staffId
,
String
unionid
)
{
TabHaobanStaff
staff
=
staffService
.
selectById
(
staffId
);
...
...
@@ -137,7 +238,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
for
(
TabHaobanWxEnterpriseRelated
tabHaobanWxEnterpriseRelated
:
list
)
{
String
key
=
"external"
+
tabHaobanWxEnterpriseRelated
.
getEnterpriseId
()
+
"_"
+
userId1
+
"_"
+
name
+
"_"
+
createTime
;
RedisUtil
.
lock
(
key
,
2
l
);
dto
.
setWxEnterpriseId
(
tabHaobanWxEnterpriseRelated
.
getEnterpriseId
());
dto
.
setWxEnterpriseId
(
tabHaobanWxEnterpriseRelated
.
getWxEnterpriseId
());
dto
.
setEnterpriseId
(
tabHaobanWxEnterpriseRelated
.
getEnterpriseId
());
MemberDTO
member
=
null
;
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userId1
,
tabHaobanWxEnterpriseRelated
.
getWxEnterpriseId
());
if
(
staff
==
null
){
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
690bf483
...
...
@@ -22,6 +22,7 @@ import com.gic.haoban.manage.service.config.Config;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.wechat.api.service.qywx.QywxDepartmentApiService
;
import
java.util.List
;
...
...
@@ -57,6 +58,10 @@ public class MessageApiServiceImpl implements MessageApiService {
private
WxApplicationService
wxApplicationService
;
@Autowired
private
Config
config
;
@Autowired
private
QywxDepartmentApiService
qywxDepartmentApiService
;
private
final
String
CONTACT_APP
=
"contactSuiteId"
;
@Override
public
void
gicMessageReceive
(
GicMessageDTO
gicMessageDTO
)
{
...
...
@@ -73,7 +78,7 @@ public class MessageApiServiceImpl implements MessageApiService {
public
void
wxMessageReceive
(
QywxCallBackDTO
qywxCallBackDTO
)
{
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
if
(
config
.
getSuiteId
().
equals
(
qywxCallBackDTO
.
getSuiteId
())){
if
(
config
.
getSuiteId
().
equals
(
qywxCallBackDTO
.
getSuiteId
())
||
CONTACT_APP
.
equals
(
qywxCallBackDTO
.
getSuiteId
())
){
log
.
info
(
"发送消息到dealWxMessageMq,{}"
,
JSON
.
toJSONString
(
qywxCallBackDTO
));
clientInstance
.
sendMessage
(
"dealWxMessageMq"
,
JSON
.
toJSONString
(
qywxCallBackDTO
));
}
...
...
@@ -152,18 +157,14 @@ public class MessageApiServiceImpl implements MessageApiService {
QywxCallBackDTO
dto
=
JSON
.
parseObject
(
param
,
QywxCallBackDTO
.
class
);
log
.
info
(
"【处理微信回调】dto={}"
,
JSON
.
toJSONString
(
param
));
if
(
dto
!=
null
){
String
siteId
=
dto
.
getSuiteId
();
String
corpId
=
dto
.
getAuthCorpId
();
TabHaobanWxEnterprise
enterprise
=
this
.
enterpriseService
.
getEnterpriseBycorpId
(
corpId
);
if
(
enterprise
!=
null
){
TabHaobanWxApplication
application
=
wxApplicationService
.
selectBySiteIdAndWxEnterpriseId
(
siteId
,
enterprise
.
getWxEnterpriseId
());
if
(
application
!=
null
&&
application
.
getApplicationType
()
==
1
){
if
(
dto
.
getChangeType
().
endsWith
(
"party"
)){
this
.
dealDepartment
(
dto
);
}
else
{
this
.
dealUser
(
dto
);
}
}
if
(
dto
.
getChangeType
().
endsWith
(
"party"
)){
this
.
dealDepartment
(
dto
);
}
else
{
this
.
dealUser
(
dto
);
}
}
}
}
...
...
@@ -195,7 +196,22 @@ public class MessageApiServiceImpl implements MessageApiService {
}
departmentDTO
.
setWxEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
departmentDTO
.
setWxDepartmentId
(
qywxCallBackDTO
.
getId
()+
""
);
departmentDTO
.
setSort
(
qywxCallBackDTO
.
getOrder
());
if
(
qywxCallBackDTO
.
getParentId
()
!=
null
){
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
=
this
.
qywxDepartmentApiService
.
listDepartment
(
qywxCallBackDTO
.
getAuthCorpId
(),
qywxCallBackDTO
.
getSuiteId
(),
qywxCallBackDTO
.
getParentId
());
if
(
list
!=
null
){
for
(
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
departmentDTO2
:
list
)
{
if
(
departmentDTO2
.
getId
().
equals
(
departmentDTO
.
getDepartmentId
())){
departmentDTO
.
setSort
(
qywxCallBackDTO
.
getOrder
());
}
else
{
TabHaobanDepartment
tab
=
this
.
departmentService
.
getByWxId
(
departmentDTO2
.
getId
()
+
""
,
enterprise
.
getWxEnterpriseId
());
if
(
tab
!=
null
){
tab
.
setSort
(
departmentDTO2
.
getOrder
());
this
.
departmentService
.
edit
(
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
tab
));
}
}
}
}
}
if
(
qywxCallBackDTO
.
getChangeType
().
equals
(
WxEditType
.
ADDDEPART
.
getCode
())){
String
response
=
this
.
departmentService
.
add
(
departmentDTO
);
log
.
info
(
"微信同步新增部门:{}"
,
JSON
.
toJSONString
(
response
));
...
...
@@ -318,6 +334,7 @@ public class MessageApiServiceImpl implements MessageApiService {
if
(
StringUtils
.
isNotBlank
(
staffRelated
.
getClerkCode
())){
staffApiService
.
cleanGicClerk
(
staffRelated
.
getClerkCode
(),
staffRelated
.
getDepartmentId
());
}
this
.
staffDepartmentRelatedService
.
del
(
EntityUtil
.
changeEntityByJSON
(
StaffDepartmentRelatedDTO
.
class
,
staffRelated
));
this
.
staffService
.
delByuserid
(
oldStaff
.
getStaffId
());
}
else
{
log
.
info
(
"微信同步删除的门店不存在,{}"
,
qywxCallBackDTO
.
getUserid
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
690bf483
...
...
@@ -47,17 +47,14 @@ import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxApplication
;
import
com.gic.haoban.manage.service.service.DepartmentService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.UserLoginLogService
;
import
com.gic.haoban.manage.service.service.WxApplicationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.google.i18n.phonenumbers.PhoneNumberUtil
;
@Service
public
class
StaffApiServiceImpl
implements
StaffApiService
{
...
...
@@ -77,8 +74,6 @@ public class StaffApiServiceImpl implements StaffApiService {
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
@Autowired
private
WxApplicationService
wxApplicationService
;
@Autowired
private
DepartmentService
departmentService
;
@Autowired
private
ClerkService
clerkService
;
...
...
@@ -126,41 +121,38 @@ public class StaffApiServiceImpl implements StaffApiService {
//调接口获取
String
wxUserId
=
""
;
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
staff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
Integer
[]
wxDepartmentIdArrIntegers
=
new
Integer
[
departmentIdArr
.
length
];
int
index
=
0
;
for
(
String
string
:
departmentIdArr
)
{
TabHaobanDepartment
tabs
=
departmentService
.
selectById
(
string
);
wxDepartmentIdArrIntegers
[
index
]
=
Integer
.
parseInt
(
tabs
.
getWxDepartmentId
());
index
++;
}
userDTO
.
setDepartment
(
wxDepartmentIdArrIntegers
);
userDTO
.
setGender
(
staff
.
getSex
()
==
null
?
null
:
staff
.
getSex
().
toString
());
userDTO
.
setMobile
(
staff
.
getPhoneNumber
());
userDTO
.
setName
(
staff
.
getStaffName
());
userDTO
.
setUserid
(
staffId
);
userDTO
.
setAlias
(
staff
.
getNickName
());
userDTO
.
setExternal_position
(
tab
.
getExtendPostion
());
userDTO
.
setPosition
(
tab
.
getPostion
());
if
(
activeFlag
==
1
)
{
userDTO
.
setTo_invite
(
true
);
}
logger
.
info
(
"【店员新增】userDTO = {}"
,
JSON
.
toJSONString
(
userDTO
));
JSONResponse
jp
=
qywxUserApiService
.
createWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
());
logger
.
info
(
"【店员新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信新增失败"
);
return
hr
;
}
staffService
.
add
(
tab
);
wxUserId
=
staffId
;
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
Integer
[]
wxDepartmentIdArrIntegers
=
new
Integer
[
departmentIdArr
.
length
];
int
index
=
0
;
for
(
String
string
:
departmentIdArr
)
{
TabHaobanDepartment
tabs
=
departmentService
.
selectById
(
string
);
wxDepartmentIdArrIntegers
[
index
]
=
Integer
.
parseInt
(
tabs
.
getWxDepartmentId
());
index
++;
}
userDTO
.
setDepartment
(
wxDepartmentIdArrIntegers
);
userDTO
.
setGender
(
staff
.
getSex
()
==
null
?
null
:
staff
.
getSex
().
toString
());
userDTO
.
setMobile
(
staff
.
getPhoneNumber
());
userDTO
.
setName
(
staff
.
getStaffName
());
userDTO
.
setUserid
(
staffId
);
userDTO
.
setAlias
(
staff
.
getNickName
());
userDTO
.
setExternal_position
(
tab
.
getExtendPostion
());
userDTO
.
setPosition
(
tab
.
getPostion
());
if
(
activeFlag
==
1
)
{
userDTO
.
setTo_invite
(
true
);
}
logger
.
info
(
"【店员新增】userDTO = {}"
,
JSON
.
toJSONString
(
userDTO
));
JSONResponse
jp
=
qywxUserApiService
.
createSelfWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
());
logger
.
info
(
"【店员新增】jp = {}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
!=
0
)
{
hr
.
setCode
(
0
);
hr
.
setMessage
(
"微信新增失败"
);
return
hr
;
}
staffService
.
add
(
tab
);
wxUserId
=
staffId
;
}
if
(
StringUtils
.
isNotBlank
(
wxUserId
)){
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
...
...
@@ -229,12 +221,9 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
relatedList
.
size
()
==
1
)
{
TabHaobanStaff
staff
=
staffService
.
selectById
(
relatedList
.
get
(
0
).
getStaffId
());
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
staff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
JSONResponse
jp
=
qywxUserApiService
.
deleteWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
staff
.
getWxUserId
());
logger
.
info
(
"【删除成员】jp={}"
,
JSON
.
toJSONString
(
jp
));
}
JSONResponse
jp
=
qywxUserApiService
.
deleteSelfWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
staff
.
getWxUserId
());
logger
.
info
(
"【删除成员】jp={}"
,
JSON
.
toJSONString
(
jp
));
}
staffDepartmentRelatedService
.
del
(
related
);
staffService
.
delByuserid
(
relatedList
.
get
(
0
).
getStaffId
());
...
...
@@ -297,89 +286,77 @@ public class StaffApiServiceImpl implements StaffApiService {
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
if
(
staff
==
null
)
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
application
==
null
){
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
}
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
Date
now
=
new
Date
();
UserDTO
user
=
qywxUserApiService
.
getWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
userId
);
logger
.
info
(
"【新增用户】user={}"
,
JSON
.
toJSONString
(
user
));
TabHaobanStaff
tab
=
new
TabHaobanStaff
();
tab
.
setWxUserId
(
userId
);
tab
.
setCreateTime
(
now
);
tab
.
setUpdateTime
(
now
);
tab
.
setStatusFlag
(
1
);
tab
.
setWxEnterpriseId
(
wxEnterpriseId
);
tab
.
setPhoneNumber
(
user
.
getMobile
());
if
(
StringUtils
.
isNotBlank
(
user
.
getName
()))
{
tab
.
setStaffName
(
EmojiParser
.
removeAllEmojis
(
user
.
getName
()));
}
if
(
StringUtils
.
isNotBlank
(
user
.
getAlias
()))
{
tab
.
setNickName
(
EmojiParser
.
removeAllEmojis
(
user
.
getAlias
()));
}
Date
now
=
new
Date
();
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
userId
);
logger
.
info
(
"【新增用户】user={}"
,
JSON
.
toJSONString
(
user
));
TabHaobanStaff
tab
=
new
TabHaobanStaff
();
tab
.
setWxUserId
(
userId
);
tab
.
setCreateTime
(
now
);
tab
.
setUpdateTime
(
now
);
tab
.
setStatusFlag
(
1
);
tab
.
setWxEnterpriseId
(
wxEnterpriseId
);
tab
.
setPhoneNumber
(
user
.
getMobile
());
if
(
StringUtils
.
isNotBlank
(
user
.
getName
()))
{
tab
.
setStaffName
(
EmojiParser
.
removeAllEmojis
(
user
.
getName
()));
}
if
(
StringUtils
.
isNotBlank
(
user
.
getAlias
()))
{
tab
.
setNickName
(
EmojiParser
.
removeAllEmojis
(
user
.
getAlias
()));
}
// tab.setNickName(user.getAlias());
tab
.
setNationCode
(
"86"
);
tab
.
setSex
(
user
.
getGender
()
==
null
?
1
:
Integer
.
parseInt
(
user
.
getGender
()));
tab
.
setNationCode
(
"86"
);
tab
.
setSex
(
user
.
getGender
()
==
null
?
1
:
Integer
.
parseInt
(
user
.
getGender
()));
tab
.
setActiveFlag
(
1
);
tab
.
setPostion
(
user
.
getPosition
());
tab
.
setExtendPostion
(
user
.
getExternal_position
());
if
(
user
.
getStatus
()
!=
null
&&
user
.
getStatus
()
==
1
){
tab
.
setActiveFlag
(
1
);
tab
.
setPostion
(
user
.
getPosition
());
tab
.
setExtendPostion
(
user
.
getExternal_position
());
if
(
user
.
getStatus
()
!=
null
&&
user
.
getStatus
()
==
1
){
tab
.
setActiveFlag
(
1
);
}
else
{
tab
.
setActiveFlag
(
0
);
}
String
staffId
=
staffService
.
add
(
tab
);
Integer
[]
departmentId
=
user
.
getDepartment
();
for
(
Integer
integer
:
departmentId
)
{
TabHaobanDepartment
tabDepartment
=
departmentService
.
getByWxId
(
integer
.
toString
(),
wxEnterpriseId
);
if
(
tabDepartment
!=
null
){
TabHaobanStaffDepartmentRelated
tabStaff
=
staffDepartmentRelatedService
.
getDepartmentIdAndStaffId
(
tabDepartment
.
getDepartmentId
(),
tab
.
getStaffId
());
if
(
tabStaff
==
null
){
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
dto
.
setPhoneNumber
(
user
.
getMobile
());
dto
.
setWxUserId
(
userId
);
dto
.
setStaffId
(
staffId
);
dto
.
setStaffName
(
user
.
getName
());
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setStatusFlag
(
1
);
dto
.
setDepartmentId
(
tabDepartment
.
getDepartmentId
());
dto
.
setNationCode
(
"86"
);
dto
.
setStaffName
(
user
.
getName
());
staffDepartmentRelatedService
.
add
(
dto
);
}
}
else
{
tab
.
setActiveFlag
(
0
);
}
String
staffId
=
staffService
.
add
(
tab
);
Integer
[]
departmentId
=
user
.
getDepartment
();
for
(
Integer
integer
:
departmentId
)
{
TabHaobanDepartment
tabDepartment
=
departmentService
.
getByWxId
(
integer
.
toString
(),
wxEnterpriseId
);
if
(
tabDepartment
!=
null
){
TabHaobanStaffDepartmentRelated
tabStaff
=
staffDepartmentRelatedService
.
getDepartmentIdAndStaffId
(
tabDepartment
.
getDepartmentId
(),
tab
.
getStaffId
());
if
(
tabStaff
==
null
){
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
dto
.
setPhoneNumber
(
user
.
getMobile
());
dto
.
setWxUserId
(
userId
);
dto
.
setStaffId
(
staffId
);
dto
.
setStaffName
(
user
.
getName
());
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setStatusFlag
(
1
);
dto
.
setDepartmentId
(
tabDepartment
.
getDepartmentId
());
dto
.
setNationCode
(
"86"
);
dto
.
setStaffName
(
user
.
getName
());
staffDepartmentRelatedService
.
add
(
dto
);
}
}
}
}
}
else
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
application
==
null
){
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
}
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
user
=
qywxUserApiService
.
getWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
userId
);
logger
.
info
(
"【修改用户】user={}"
,
JSON
.
toJSONString
(
user
));
Integer
[]
departmentId
=
user
.
getDepartment
();
String
departmentIds
=
""
;
for
(
Integer
integer
:
departmentId
)
{
TabHaobanDepartment
tabDepartment
=
departmentService
.
getByWxId
(
integer
.
toString
(),
wxEnterpriseId
);
if
(
tabDepartment
!=
null
){
departmentIds
+=
tabDepartment
.
getDepartmentId
()
+
","
;
}
}
if
(
StringUtils
.
isNotBlank
(
departmentIds
)){
departmentIds
=
departmentIds
.
substring
(
1
,
departmentIds
.
length
()
-
1
);
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
userId
);
logger
.
info
(
"【修改用户】user={}"
,
JSON
.
toJSONString
(
user
));
Integer
[]
departmentId
=
user
.
getDepartment
();
String
departmentIds
=
""
;
for
(
Integer
integer
:
departmentId
)
{
TabHaobanDepartment
tabDepartment
=
departmentService
.
getByWxId
(
integer
.
toString
(),
wxEnterpriseId
);
if
(
tabDepartment
!=
null
){
departmentIds
+=
tabDepartment
.
getDepartmentId
()
+
","
;
}
StaffDTO
staffDTO
=
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
);
staffDTO
.
setWeixinPush
(
true
);
this
.
staffEdit
(
staffDTO
,
departmentIds
);
//String staffId = staffService.add(tab);
}
if
(
StringUtils
.
isNotBlank
(
departmentIds
)){
departmentIds
=
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
);
}
StaffDTO
staffDTO
=
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
);
staffDTO
.
setWeixinPush
(
true
);
this
.
staffEdit
(
staffDTO
,
departmentIds
);
//String staffId = staffService.add(tab);
}
}
}
...
...
@@ -456,7 +433,7 @@ public class StaffApiServiceImpl implements StaffApiService {
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByCodeNoStatus
(
enterpriseId
,
related
.
getClerkCode
());
//if(!staffDTO.getPhoneNumber().equals(related.getPhoneNumber())||!staffDTO.getStaffName().equals(clerkDTO.getStaffName())){
String
headPic
=
staffDTO
.
getHeadImg
();
if
(
clerkDTO
!=
null
&&
(!
clerkDTO
.
getClerkName
().
equals
(
staffName
)
||
!
staffDTO
.
getPhoneNumber
().
equals
(
clerkDTO
.
getPhoneNumber
()))
if
(
clerkDTO
!=
null
&&
(
StringUtils
.
isNotBlank
(
staffName
)
&&
!
clerkDTO
.
getClerkName
().
equals
(
staffName
)
||
!
staffDTO
.
getPhoneNumber
().
equals
(
clerkDTO
.
getPhoneNumber
()))
||
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
headPic
)
&&
!
headPic
.
equals
(
clerkDTO
.
getImageUrl
()))
||
!
staffDTO
.
getSex
().
equals
(
clerkDTO
.
getClerkGender
())){
logger
.
info
(
"【员工修改】clerkDTO={}"
,
JSON
.
toJSONString
(
clerkDTO
));
...
...
@@ -492,31 +469,28 @@ public class StaffApiServiceImpl implements StaffApiService {
Boolean
weixinPush
=
staffDTO
.
getWeixinPush
();
if
(
weixinPush
==
null
||
!
weixinPush
){
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
oldStaff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
oldStaff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
userDTO
.
setAlias
(
staffDTO
.
getNickName
());
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
Integer
[]
wxDepartmentIdArrIntegers
=
new
Integer
[
departmentIdArr
.
length
];
int
index
=
0
;
for
(
String
string
:
departmentIdArr
)
{
TabHaobanDepartment
tabs
=
departmentService
.
selectById
(
string
);
wxDepartmentIdArrIntegers
[
index
]
=
Integer
.
parseInt
(
tabs
.
getWxDepartmentId
());
index
++;
}
userDTO
.
setDepartment
(
wxDepartmentIdArrIntegers
);
userDTO
.
setGender
(
staffDTO
.
getSex
()
==
null
?
""
:
staffDTO
.
getSex
().
toString
());
userDTO
.
setMobile
(
staffDTO
.
getPhoneNumber
());
userDTO
.
setName
(
staffDTO
.
getStaffName
());
userDTO
.
setUserid
(
oldStaff
.
getWxUserId
());
userDTO
.
setPosition
(
staffDTO
.
getPostion
());
userDTO
.
setExternal_position
(
staffDTO
.
getExtendPostion
());
JSONResponse
jp
=
qywxUserApiService
.
updateWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
());
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
userDTO
.
setAlias
(
staffDTO
.
getNickName
());
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
Integer
[]
wxDepartmentIdArrIntegers
=
new
Integer
[
departmentIdArr
.
length
];
int
index
=
0
;
for
(
String
string
:
departmentIdArr
)
{
TabHaobanDepartment
tabs
=
departmentService
.
selectById
(
string
);
wxDepartmentIdArrIntegers
[
index
]
=
Integer
.
parseInt
(
tabs
.
getWxDepartmentId
());
index
++;
}
userDTO
.
setDepartment
(
wxDepartmentIdArrIntegers
);
userDTO
.
setGender
(
staffDTO
.
getSex
()
==
null
?
""
:
staffDTO
.
getSex
().
toString
());
userDTO
.
setMobile
(
staffDTO
.
getPhoneNumber
());
userDTO
.
setName
(
staffDTO
.
getStaffName
());
userDTO
.
setUserid
(
oldStaff
.
getWxUserId
());
userDTO
.
setPosition
(
staffDTO
.
getPostion
());
userDTO
.
setExternal_position
(
staffDTO
.
getExtendPostion
());
JSONResponse
jp
=
qywxUserApiService
.
updateSelfWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
());
}
}
}
...
...
@@ -624,12 +598,15 @@ public class StaffApiServiceImpl implements StaffApiService {
continue
;
}
if
(
"postionName"
.
equals
(
name
))
{
if
(
"pos
i
tionName"
.
equals
(
name
))
{
clerkMid
.
setPostionName
(
value
);
continue
;
}
if
(
"nationcode"
.
equals
(
name
))
{
if
(
StringUtils
.
isNotBlank
(
value
)
&&
value
.
startsWith
(
"+"
)){
value
=
value
.
replace
(
"+"
,
""
);
}
clerkMid
.
setNationcode
((
StringUtils
.
isBlank
(
value
)
?
"86"
:
value
));
continue
;
}
...
...
@@ -719,6 +696,7 @@ public class StaffApiServiceImpl implements StaffApiService {
//修改
}
else
{
staff
.
setHeadImg
(
headPic
);
//staff.setPostion(postion);
// staff.setStaffName(staffName);
if
(
staff
.
getActiveFlag
()
!=
null
&&
staff
.
getActiveFlag
()
!=
1
){
staff
.
setStaffName
(
staffName
);
...
...
@@ -773,12 +751,11 @@ public class StaffApiServiceImpl implements StaffApiService {
return
staff
;
}
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
null
==
enterpriseDTO
||
application
==
null
)
{
if
(
null
==
enterpriseDTO
)
{
return
null
;
}
String
userId
=
qywxUserApiService
.
get
WxUserIdByPhonenumber
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
phoneNumber
);
String
userId
=
qywxUserApiService
.
get
SelfWxUserIdByPhonenumber
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
phoneNumber
);
logger
.
info
(
"获取userId:{},{}"
,
phoneNumber
,
userId
);
if
(
userId
==
null
)
{
return
null
;
...
...
@@ -793,8 +770,8 @@ public class StaffApiServiceImpl implements StaffApiService {
}
@Override
public
void
initWxUser
(
String
corpid
,
String
suiteid
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
)
{
List
<
UserDTO
>
list
=
this
.
qywxUserApiService
.
list
DepartmentUser
(
corpid
,
suiteid
,
wxDepartmentId
.
toString
(),
0
);
public
void
initWxUser
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
)
{
List
<
UserDTO
>
list
=
this
.
qywxUserApiService
.
list
SelfDepartmentUser
(
corpid
,
contactSecret
,
wxDepartmentId
.
toString
(),
0
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
for
(
UserDTO
dto
:
list
){
this
.
wxGetAdd
(
dto
.
getUserid
(),
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
690bf483
...
...
@@ -28,6 +28,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
private
StaffDepartmentRelatedService
staffDepartmentRelatedService
;
@Autowired
private
StaffDepartmentRelatedMapper
staffDepartmentRelatedMapper
;
@Override
public
List
<
StaffDepartmentRelatedDTO
>
listByDepartmentId
(
String
departmentId
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
690bf483
...
...
@@ -47,10 +47,6 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
private
WxEnterpriseMapper
wxEnterpriseMapper
;
@Autowired
private
WxApplicationService
wxApplicationService
;
@Autowired
private
QywxDepartmentApiService
qywxDepartmentApiService
;
@Autowired
private
DepartmentService
departmentService
;
@Override
public
void
callbackReviceEnterprise
(
QywxCorpInfoSimpleDTO
dto
)
{
...
...
@@ -63,8 +59,9 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
wxDTO
.
setWxEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
wxDTO
.
setStatusFlag
(
1
);
wxEnterpriseService
.
update
(
wxDTO
);
}
else
{
wxEnterpriseId
=
wxEnterpriseService
.
add
(
wxDTO
);
}
wxEnterpriseId
=
wxEnterpriseService
.
add
(
wxDTO
);
String
userId
=
dto
.
getUserid
();
String
name
=
dto
.
getName
();
if
(
StringUtils
.
isNotBlank
(
userId
))
{
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
690bf483
...
...
@@ -50,6 +50,7 @@
<dubbo:reference
interface=
"com.gic.enterprise.api.service.StoreService"
id=
"storeService"
/>
<dubbo:reference
interface=
"com.gic.member.api.service.MemberOpenCardBusinessService"
id=
"memberOpenCardBusinessService"
/>
<dubbo:reference
id=
"eSDataDynamicOperationApiService"
interface=
"com.gic.search.engine.api.service.dynamic.ESDataDynamicOperationApiService"
timeout=
"10000"
/>
</beans>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/MemberUnionidRelatedMapper.xml
View file @
690bf483
...
...
@@ -6,6 +6,7 @@
<result
column=
"member_id"
property=
"memberId"
jdbcType=
"VARCHAR"
/>
<result
column=
"unionid"
property=
"unionid"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"enterprise_id"
property=
"enterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"external_userid"
property=
"externalUserid"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_user_id"
property=
"wxUserId"
jdbcType=
"VARCHAR"
/>
...
...
@@ -17,7 +18,7 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
member_unionid_related_id, member_id, unionid, wx_enterprise_id, status_flag, external_userid,
wx_user_id, create_time, update_time,add_create_time,self_external_userid,external_name
wx_user_id, create_time, update_time,add_create_time,self_external_userid,external_name
,enterprise_id
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -33,11 +34,11 @@
insert into tab_haoban_member_unionid_related (member_unionid_related_id, member_id,
unionid, wx_enterprise_id, status_flag,
external_userid, wx_user_id, create_time,
update_time,add_create_time,self_external_userid,external_name)
update_time,add_create_time,self_external_userid,external_name
,enterprise_id
)
values (#{memberUnionidRelatedId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR},
#{unionid,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{externalUserid,jdbcType=VARCHAR}, #{wxUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},#{addCreateTime},#{selfExternalUserid},#{externalName})
#{updateTime,jdbcType=TIMESTAMP},#{addCreateTime},#{selfExternalUserid},#{externalName}
,#{enterpriseId}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.MemberUnionidRelated"
>
insert into tab_haoban_member_unionid_related
...
...
@@ -54,6 +55,9 @@
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
...
...
@@ -92,6 +96,9 @@
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
...
...
@@ -130,6 +137,9 @@
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
...
...
@@ -162,6 +172,7 @@
set member_id = #{memberId,jdbcType=VARCHAR},
unionid = #{unionid,jdbcType=VARCHAR},
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
external_userid = #{externalUserid,jdbcType=VARCHAR},
wx_user_id = #{wxUserId,jdbcType=VARCHAR},
...
...
@@ -198,6 +209,14 @@
and status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
</select>
<select
id=
"listByExTernalUseridAndWxUserId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_member_unionid_related
where wx_user_id = #{wxUserId}
and status_flag = 1
and external_userid = #{externalUserid}
</select>
<select
id=
"getByParams"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -205,7 +224,7 @@
from tab_haoban_member_unionid_related
where wx_user_id = #{wxUserId}
and status_flag = 1
and
wx_enterprise_id = #{wxE
nterpriseId}
and
enterprise_id = #{e
nterpriseId}
and external_name = #{externalName}
and add_create_time = #{addCreateTime}
</select>
...
...
haoban-manage3-service/src/main/resources/mapper/StaffDepartmentRelatedMapper.xml
View file @
690bf483
...
...
@@ -213,6 +213,7 @@
from tab_haoban_staff_department_related
where staff_id = #{staffId,jdbcType=VARCHAR}
and status_flag = 1
group by department_id
</select>
<update
id=
"delByUserid"
>
update tab_haoban_staff_department_related
...
...
@@ -232,6 +233,14 @@
limit 1
</select>
<select
id=
"listByWxUserId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_department_related
where wx_user_id = #{wxUserId}
and status_flag = 1
</select>
<select
id=
"countByDepartmentId"
resultType=
"java.lang.Integer"
parameterType=
"java.lang.String"
>
select
...
...
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
690bf483
...
...
@@ -26,6 +26,7 @@
<result
column=
"round_logo_url"
property=
"roundLogoUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_secret_key"
property=
"wxSecretKey"
jdbcType=
"VARCHAR"
/>
<result
column=
"member_secret"
property=
"memberSecret"
jdbcType=
"VARCHAR"
/>
<result
column=
"contact_secret"
property=
"contactSecret"
jdbcType=
"VARCHAR"
/>
<result
column=
"level"
property=
"level"
jdbcType=
"INTEGER"
/>
<result
column=
"contact_flag"
property=
"contactFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"bind_flag"
property=
"bindFlag"
jdbcType=
"INTEGER"
/>
...
...
@@ -38,7 +39,7 @@
corp_user_max, corp_full_name, subject_type, verified_end_time, corp_wxqrcode, corp_scale,
corp_industry, corp_sub_industry, location, auth_info, agent, agentid, appid, name,
square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time,contact_flag,wx_secret_key
,member_secret
,member_secret
,contact_secret
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -59,7 +60,7 @@
auth_info, agent, agentid,
appid, name, square_logo_url,
round_logo_url, level, bind_flag,
status_flag, create_time, update_time,contact_flag,wx_secret_key
status_flag, create_time, update_time,contact_flag,wx_secret_key
,contact_secret
)
values (#{wxEnterpriseId,jdbcType=VARCHAR}, #{corpid,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR},
#{corpName,jdbcType=VARCHAR}, #{corpType,jdbcType=VARCHAR}, #{corpSquareLogoUrl,jdbcType=VARCHAR},
...
...
@@ -69,7 +70,7 @@
#{authInfo,jdbcType=VARCHAR}, #{agent,jdbcType=VARCHAR}, #{agentid,jdbcType=VARCHAR},
#{appid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{squareLogoUrl,jdbcType=VARCHAR},
#{roundLogoUrl,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{bindFlag,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{contactFlag},#{wxSecretKey}
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{contactFlag},#{wxSecretKey}
,#{contactSecret}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise"
>
...
...
@@ -162,6 +163,9 @@
<if
test=
"wxSecretKey != null"
>
wx_secret_key,
</if>
<if
test=
"contactSecret != null"
>
contact_secret,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"wxEnterpriseId != null"
>
...
...
@@ -251,6 +255,9 @@
<if
test=
"wxSecretKey != null"
>
#{wxSecretKey,jdbcType=TIMESTAMP},
</if>
<if
test=
"contactSecret != null"
>
#{contactSecret,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise"
>
...
...
@@ -340,6 +347,9 @@
<if
test=
"wxSecretKey != null"
>
wx_secret_key = #{wxSecretKey,jdbcType=VARCHAR},
</if>
<if
test=
"contactSecret != null"
>
contact_secret = #{contactSecret,jdbcType=VARCHAR},
</if>
</set>
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</update>
...
...
@@ -372,6 +382,7 @@
contact_flag = #{contactFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
wx_secret_key = #{wxSecretKey,jdbcType=VARCHAR},
contact_secret = #{contactSecret,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</update>
...
...
haoban-manage3-service/src/test/java/ServiceTest.java
View file @
690bf483
...
...
@@ -19,7 +19,7 @@ public class ServiceTest {
@Test
public
void
test
()
{
wxEnterpriseRelatedApiService
.
listEnterpriseByWxEnterpriseId
(
"073e89a37eb14acabf258e59a57359b6"
);
//
wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId("073e89a37eb14acabf258e59a57359b6");
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AdminController.java
View file @
690bf483
...
...
@@ -48,7 +48,7 @@ public class AdminController extends WebBaseController{
public
HaobanResponse
adminList
()
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
WxEnterpriseDTO
enterprise
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
logger
.
info
(
"【管理员查询】corpid={},siteId={},agentId={}"
,
enterprise
.
getCorpid
(),
application
.
getSiteId
(),
application
.
getAgentId
());
String
adminList
=
qywxSuiteApiService
.
getAdminList
(
enterprise
.
getCorpid
(),
application
.
getSiteId
(),
Integer
.
parseInt
(
application
.
getAgentId
()));
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ApplicationController.java
View file @
690bf483
...
...
@@ -102,13 +102,18 @@ public class ApplicationController extends WebBaseController{
}
@RequestMapping
(
"has-bind-contract"
)
public
HaobanResponse
hasBindContract
(){
LoginVO
login
=
AuthRequestUtil
.
getSessio
nUser
();
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLogi
nUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
WxApplicationDTO
wxApplicationDTO
=
this
.
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
wxApplicationDTO
!=
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
true
);
WxEnterpriseDTO
enterpriseDTO
=
this
.
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
enterpriseDTO
!=
null
){
if
(
StringUtils
.
isNotBlank
(
enterpriseDTO
.
getContactSecret
())
&&
enterpriseDTO
.
getContactFlag
()
!=
null
&&
enterpriseDTO
.
getContactFlag
()
==
0
){
this
.
departmentApiService
.
initwxDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
enterpriseDTO
.
getWxEnterpriseId
());
enterpriseDTO
.
setContactFlag
(
1
);
wxEnterpriseApiService
.
update
(
enterpriseDTO
);
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
false
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
true
);
}
@RequestMapping
(
"get-auth-url"
)
...
...
@@ -136,7 +141,7 @@ public class ApplicationController extends WebBaseController{
applicationDTO
.
setAgentName
(
dto
.
getAgentName
());
applicationDTO
.
setSiteId
(
dto
.
getSuiteId
());
wxApplicationApiService
.
addSuite
(
applicationDTO
);
this
.
departmentApiService
.
initwxDepartment
(
dto
.
getCorpid
(),
suiteId
,
enterpriseDTO
.
getWxEnterpriseId
());
this
.
departmentApiService
.
initwxDepartment
(
dto
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
()
,
enterpriseDTO
.
getWxEnterpriseId
());
enterpriseDTO
.
setContactFlag
(
1
);
wxEnterpriseApiService
.
update
(
enterpriseDTO
);
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
690bf483
...
...
@@ -689,40 +689,68 @@ public class DepartmentContoller extends WebBaseController{
List
<
ClerkListDTO
>
list
=
clerkService
.
getClerkByStoreId
(
store
.
getEnterpriseId
(),
storeId
);
logger
.
info
(
"【处理门店下导购】list={}"
,
JSON
.
toJSONString
(
list
));
for
(
ClerkListDTO
clerkListDTO
:
list
)
{
String
nationcode
=
clerkListDTO
.
getNationcode
();
String
phoneNumber
=
clerkListDTO
.
getPhoneNumber
();
if
(
StringUtils
.
isBlank
(
phoneNumber
)){
continue
;
}
String
clerkCode
=
clerkListDTO
.
getClerkCode
();
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
if
(
staff
==
null
){
staff
=
new
StaffDTO
();
staff
.
setNationCode
(
nationcode
);
staff
.
setActiveFlag
(
1
);
staff
.
setDepartmentIds
(
departmentId
);
staff
.
setBindFlag
(
1
);
staff
.
setClerkCode
(
clerkCode
);
staff
.
setNickName
(
clerkListDTO
.
getClerkName
());
staff
.
setStaffName
(
clerkListDTO
.
getClerkName
());
staff
.
setPostion
(
clerkListDTO
.
getPositionName
());
staff
.
setWxEnterpriseId
(
wxEnterpriseId
);
staff
.
setPhoneNumber
(
phoneNumber
);
try
{
staff
.
setSex
(
clerkListDTO
.
getClerkGender
()
==
null
?
null
:
Integer
.
parseInt
(
clerkListDTO
.
getClerkGender
()));
}
catch
(
Exception
e
)
{
logger
.
info
(
"【同步店员】设置性别错误sex={}"
,
clerkListDTO
.
getClerkGender
());
try
{
String
nationcode
=
clerkListDTO
.
getNationcode
();
if
(
StringUtils
.
isNotBlank
(
nationcode
)
&&
nationcode
.
startsWith
(
"+"
)){
nationcode
=
nationcode
.
replace
(
"+"
,
""
);
}
String
phoneNumber
=
clerkListDTO
.
getPhoneNumber
();
if
(
StringUtils
.
isBlank
(
phoneNumber
)){
continue
;
}
staff
.
setSyncPostionFlag
(
1
);
ServiceResponse
hr
=
staffApiService
.
add
(
staff
,
departmentId
);
if
(
hr
.
getCode
()
==
1
){
StaffDepartmentRelatedDTO
staffRelated
=
staffApiService
.
getDepartmentIdAndStaffId
(
departmentId
,
hr
.
getResult
().
toString
());
String
clerkCode
=
clerkListDTO
.
getClerkCode
();
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
if
(
staff
==
null
){
staff
=
new
StaffDTO
();
staff
.
setNationCode
(
nationcode
);
staff
.
setActiveFlag
(
1
);
staff
.
setDepartmentIds
(
departmentId
);
staff
.
setBindFlag
(
1
);
staff
.
setClerkCode
(
clerkCode
);
staff
.
setNickName
(
clerkListDTO
.
getClerkName
());
staff
.
setStaffName
(
clerkListDTO
.
getClerkName
());
staff
.
setPostion
(
clerkListDTO
.
getPositionName
());
staff
.
setWxEnterpriseId
(
wxEnterpriseId
);
staff
.
setPhoneNumber
(
phoneNumber
);
try
{
staff
.
setSex
(
clerkListDTO
.
getClerkGender
()
==
null
?
null
:
Integer
.
parseInt
(
clerkListDTO
.
getClerkGender
()));
}
catch
(
Exception
e
)
{
logger
.
info
(
"【同步店员】设置性别错误sex={}"
,
clerkListDTO
.
getClerkGender
());
}
staff
.
setSyncPostionFlag
(
1
);
ServiceResponse
hr
=
staffApiService
.
add
(
staff
,
departmentId
);
if
(
hr
.
getCode
()
==
1
){
StaffDepartmentRelatedDTO
staffRelated
=
staffApiService
.
getDepartmentIdAndStaffId
(
departmentId
,
hr
.
getResult
().
toString
());
StaffDepartmentRelatedDTO
isCodeExist
=
staffApiService
.
getDepartmentIdAndCode
(
departmentId
,
clerkCode
);
if
(
staffRelated
!=
null
&&
isCodeExist
==
null
){
staffRelated
.
setClerkCode
(
clerkCode
);
staffDepartmentRelatedApiService
.
updateById
(
staffRelated
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByCodeNoStatus
(
enterpriseId
,
clerkCode
);
if
(
clerkDTO
!=
null
&&
(!
clerkDTO
.
getClerkName
().
equals
(
staff
.
getStaffName
())
||
!
staff
.
getPhoneNumber
().
equals
(
clerkDTO
.
getPhoneNumber
()))){
logger
.
info
(
"【员工修改】clerkDTO={}"
,
JSON
.
toJSONString
(
clerkDTO
));
clerkDTO
.
setClerkName
(
staff
.
getStaffName
());
clerkDTO
.
setPhoneNumber
(
staff
.
getPhoneNumber
());
clerkService
.
updateClerk
(
clerkDTO
);
}
}
}
}
else
{
String
staffId
=
staff
.
getStaffId
();
List
<
StaffDepartmentRelatedDTO
>
relatedList
=
staffApiService
.
listStaffDepartmentByStaffId
(
staffId
);
String
departmentIds
=
departmentId
;
for
(
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
:
relatedList
)
{
departmentIds
+=
","
+
staffDepartmentRelatedDTO
.
getDepartmentId
();
}
Map
<
String
,
StaffDepartmentRelatedDTO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
relatedList
,
"departmentId"
);
if
(
map
.
get
(
departmentId
)
==
null
){
staffApiService
.
staffEdit
(
staff
,
departmentIds
);
}
StaffDepartmentRelatedDTO
staffRelated
=
staffApiService
.
getDepartmentIdAndStaffId
(
departmentId
,
staffId
);
//如果这个人是未绑定的 则绑定clerk
StaffDepartmentRelatedDTO
isCodeExist
=
staffApiService
.
getDepartmentIdAndCode
(
departmentId
,
clerkCode
);
if
(
staffRelated
!=
null
&&
isCodeExist
==
null
){
staffRelated
.
setClerkCode
(
clerkCode
);
staffDepartmentRelatedApiService
.
updateById
(
staffRelated
);
if
(
StringUtils
.
isBlank
(
staffRelated
.
getClerkCode
())
&&
isCodeExist
==
null
){
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByCodeNoStatus
(
enterpriseId
,
clerkCode
);
if
(
clerkDTO
!=
null
&&
(!
clerkDTO
.
getClerkName
().
equals
(
staff
.
getStaffName
())
||
!
staff
.
getPhoneNumber
().
equals
(
clerkDTO
.
getPhoneNumber
()))){
logger
.
info
(
"【员工修改】clerkDTO={}"
,
JSON
.
toJSONString
(
clerkDTO
));
...
...
@@ -730,34 +758,13 @@ public class DepartmentContoller extends WebBaseController{
clerkDTO
.
setPhoneNumber
(
staff
.
getPhoneNumber
());
clerkService
.
updateClerk
(
clerkDTO
);
}
staffRelated
.
setClerkCode
(
clerkCode
);
staffDepartmentRelatedApiService
.
updateById
(
staffRelated
);
}
}
}
else
{
String
staffId
=
staff
.
getStaffId
();
List
<
StaffDepartmentRelatedDTO
>
relatedList
=
staffApiService
.
listStaffDepartmentByStaffId
(
staffId
);
String
departmentIds
=
departmentId
;
for
(
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
:
relatedList
)
{
departmentIds
+=
","
+
staffDepartmentRelatedDTO
.
getDepartmentId
();
}
Map
<
String
,
StaffDepartmentRelatedDTO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
relatedList
,
"departmentId"
);
if
(
map
.
get
(
departmentId
)
==
null
){
staffApiService
.
staffEdit
(
staff
,
departmentIds
);
}
StaffDepartmentRelatedDTO
staffRelated
=
staffApiService
.
getDepartmentIdAndStaffId
(
departmentId
,
staffId
);
//如果这个人是未绑定的 则绑定clerk
StaffDepartmentRelatedDTO
isCodeExist
=
staffApiService
.
getDepartmentIdAndCode
(
departmentId
,
clerkCode
);
if
(
StringUtils
.
isBlank
(
staffRelated
.
getClerkCode
())
&&
isCodeExist
==
null
){
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByCodeNoStatus
(
enterpriseId
,
clerkCode
);
if
(
clerkDTO
!=
null
&&
(!
clerkDTO
.
getClerkName
().
equals
(
staff
.
getStaffName
())
||
!
staff
.
getPhoneNumber
().
equals
(
clerkDTO
.
getPhoneNumber
()))){
logger
.
info
(
"【员工修改】clerkDTO={}"
,
JSON
.
toJSONString
(
clerkDTO
));
clerkDTO
.
setClerkName
(
staff
.
getStaffName
());
clerkDTO
.
setPhoneNumber
(
staff
.
getPhoneNumber
());
clerkService
.
updateClerk
(
clerkDTO
);
}
staffRelated
.
setClerkCode
(
clerkCode
);
staffDepartmentRelatedApiService
.
updateById
(
staffRelated
);
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"同步失败"
);
}
}
}
else
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/anno/HttpLimit.java
0 → 100644
View file @
690bf483
package
com
.
gic
.
haoban
.
manage
.
web
.
anno
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
java.util.concurrent.TimeUnit
;
/**
* 访问限制
* 默认1秒
* @author hzw
*
*/
@Target
({
ElementType
.
METHOD
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
HttpLimit
{
long
time
()
default
1L
;
TimeUnit
unit
()
default
TimeUnit
.
SECONDS
;
int
times
()
default
2
;
}
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
690bf483
...
...
@@ -30,6 +30,7 @@ import com.gic.haoban.manage.api.service.BindApiService;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.web.anno.HttpLimit
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.interceptor.WebInterceptor
;
import
com.gic.haoban.manage.web.vo.ClerkVo
;
...
...
@@ -166,6 +167,7 @@ public class ClerkController extends WebBaseController{
}
//成员绑定
@HttpLimit
@RequestMapping
(
"/staff-bind"
)
public
HaobanResponse
staffBind
(
String
departmentId
,
String
fromClerkCode
,
String
fromStaffDepartmentRelatedId
)
{
if
(
StringUtils
.
isAnyBlank
(
departmentId
,
fromClerkCode
,
fromStaffDepartmentRelatedId
)){
...
...
@@ -175,6 +177,7 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//成员解除绑定
@HttpLimit
@RequestMapping
(
"/clerk-single-unbind"
)
public
HaobanResponse
clerkSingleUnbind
(
String
fromClerkCode
,
String
departmentId
)
{
if
(
StringUtils
.
isAnyBlank
(
fromClerkCode
)){
...
...
@@ -184,6 +187,7 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//成员换绑定
@HttpLimit
@RequestMapping
(
"/clerk-unbind"
)
public
HaobanResponse
clerkUnbind
(
String
departmentId
,
String
fromClerkCode
,
String
toStaffId
,
String
manager
)
{
if
(
StringUtils
.
isAnyBlank
(
fromClerkCode
,
toStaffId
)){
...
...
@@ -197,6 +201,7 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//店长转让
@HttpLimit
@RequestMapping
(
"/clerk-manager-tranfer"
)
public
HaobanResponse
clerkManagerTranfer
(
String
departmentId
,
String
fromClerkCode
,
String
toStaffDepartmentRelatedId
)
{
logger
.
info
(
"===========================》111111111111111"
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/InfoController.java
View file @
690bf483
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
...
...
@@ -9,6 +10,7 @@ import com.gic.haoban.common.utils.HaobanResponse;
import
com.gic.haoban.contacts.manage.api.service.StoreService
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
...
...
@@ -21,6 +23,7 @@ import com.gic.haoban.manage.web.vo.StoreVO;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -55,6 +58,9 @@ public class InfoController extends WebBaseController{
@Autowired
private
com
.
gic
.
enterprise
.
api
.
service
.
StoreService
storeService
;
@Autowired
private
MemberUnionidRelatedApiService
memberUnionidRelatedApiService
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
InfoController
.
class
);
@Autowired
...
...
@@ -96,6 +102,7 @@ public class InfoController extends WebBaseController{
infoVo
.
setStaffName
(
loginStaff
.
getStaffName
());
infoVo
.
setPhoneNumber
(
loginStaff
.
getPhoneNumber
());
infoVo
.
setNationcode
(
loginStaff
.
getNationCode
());
infoVo
.
setWxUserId
(
loginStaff
.
getWxUserId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
infoVo
);
}
...
...
@@ -165,6 +172,15 @@ public class InfoController extends WebBaseController{
}
@RequestMapping
(
"get-member-store"
)
public
HaobanResponse
getMemberStore
(
String
externalUserid
,
String
wxUserId
)
{
if
(
StringUtils
.
isAnyBlank
(
externalUserid
,
wxUserId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
List
<
MemberStoreDTO
>
result
=
memberUnionidRelatedApiService
.
listByExTernalUseridAndWxUserId
(
externalUserid
,
wxUserId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
);
}
@RequestMapping
(
"get-staff-info"
)
public
HaobanResponse
getStaffInfo
(
String
phoneNumber
)
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
View file @
690bf483
...
...
@@ -68,6 +68,8 @@ public enum HaoBanErrCode {
ERR_21
(
21
,
"验证码已过期或者错误"
),
ERR_22
(
22
,
"验证码一分钟只能请求一次"
),
ERR_10008
(
10008
,
"请不要过于频繁点击"
),
/**
* 员工档案模块
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/interceptor/HttpLimitInterceptor.java
0 → 100644
View file @
690bf483
package
com
.
gic
.
haoban
.
manage
.
web
.
interceptor
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.anno.HttpLimit
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 测试登录拦截器
*
* @author zhurz
*/
public
class
HttpLimitInterceptor
extends
HandlerInterceptorAdapter
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
HttpLimitInterceptor
.
class
);
private
void
errorResult
(
HttpServletResponse
httpServletResponse
,
HaoBanErrCode
errCode
)
{
HaobanResponse
response
=
new
HaobanResponse
();
response
.
setErrorCode
(
errCode
.
getCode
());
response
.
setMessage
(
errCode
.
getMsg
());
PrintWriter
writer
=
null
;
try
{
httpServletResponse
.
setHeader
(
"Content-type"
,
"application/json;charset=UTF-8"
);
writer
=
httpServletResponse
.
getWriter
();
writer
.
append
(
JSONObject
.
toJSONString
(
response
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
boolean
preHandle
(
HttpServletRequest
httpServletRequest
,
HttpServletResponse
httpServletResponse
,
Object
o
)
throws
Exception
{
String
requestURI
=
httpServletRequest
.
getRequestURI
();
logger
.
info
(
"post-url:{}"
,
requestURI
);
Map
<
String
,
String
[]>
parameterMap
=
httpServletRequest
.
getParameterMap
();
logger
.
info
(
"post-params:{}"
,
JSONObject
.
toJSONString
(
parameterMap
));
if
(!(
o
instanceof
HandlerMethod
))
{
return
true
;
}
HandlerMethod
handler
=
(
HandlerMethod
)
o
;
HttpLimit
httpLimit
=
handler
.
getMethodAnnotation
(
HttpLimit
.
class
);
if
(
httpLimit
!=
null
)
{
String
ip
=
getIpAddress
(
httpServletRequest
);
String
url
=
httpServletRequest
.
getRequestURL
().
toString
();
String
key
=
"http_limit_"
.
concat
(
url
);
key
=
key
+
ip
;
if
(
RedisUtil
.
getCache
(
key
)!=
null
){
this
.
errorResult
(
httpServletResponse
,
HaoBanErrCode
.
ERR_10008
);
logger
.
info
(
"过于频繁点击"
);
return
false
;
}
else
{
RedisUtil
.
setCache
(
key
,
1
,
httpLimit
.
time
());
}
}
return
true
;
}
private
String
getIpAddress
(
HttpServletRequest
request
)
{
String
ip
=
request
.
getHeader
(
"x-forwarded-for"
);
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"WL-Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_CLIENT_IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_X_FORWARDED_FOR"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getRemoteAddr
();
}
return
ip
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/AppStaffVo.java
View file @
690bf483
...
...
@@ -18,6 +18,14 @@ public class AppStaffVo implements Serializable {
private
String
phoneNumber
;
private
String
wxEnterpriseId
;
private
String
wxEnterpriseName
;
private
String
wxUserId
;
public
String
getWxUserId
()
{
return
wxUserId
;
}
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
;
}
public
String
getStaffId
()
{
return
staffId
;
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/InfoVo.java
View file @
690bf483
...
...
@@ -15,7 +15,14 @@ public class InfoVo implements Serializable {
private
String
staffName
;
private
String
phoneNumber
;
private
String
nationcode
;
private
String
wxUserId
;
public
String
getWxUserId
()
{
return
wxUserId
;
}
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
;
}
public
String
getStaffId
()
{
return
staffId
;
}
...
...
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
690bf483
...
...
@@ -34,6 +34,7 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.AuditSettingApiService"
id=
"auditSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.dict.api.service.ManagerDictService"
id=
"managerDictService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ApplicationSettingApiService"
id=
"applicationSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService"
id=
"memberUnionidRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.communicate.api.service.valid.ValidationCodeService"
id=
"validationCodeService"
/>
...
...
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