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
37c75c2f
Commit
37c75c2f
authored
Feb 02, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通讯录接口开发
parent
a835cfdc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
31 deletions
+98
-31
TransferActiveCodeQDTO.java
...ic/haoban/manage/api/dto/qdto/TransferActiveCodeQDTO.java
+38
-0
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+6
-0
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+9
-2
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+6
-1
WxEnterpriseActiveDataServiceImpl.java
...rvice/service/impl/WxEnterpriseActiveDataServiceImpl.java
+10
-1
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+19
-0
TabHaobanWxEnterpriseActiveDataMapper.xml
...esources/mapper/TabHaobanWxEnterpriseActiveDataMapper.xml
+2
-2
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+8
-25
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/TransferActiveCodeQDTO.java
0 → 100644
View file @
37c75c2f
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
qdto
;
import
java.io.Serializable
;
/**
* @description: 通讯录转移许可QO
* @Author: wenhua
* @Date: 2023/1/30 20:39
*/
public
class
TransferActiveCodeQDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 转移成员的userid。只支持加密的userid
*/
private
String
handover_userid
;
/**
* 接收成员的userid。只支持加密的userid
*/
private
String
takeover_userid
;
public
String
getHandover_userid
()
{
return
handover_userid
;
}
public
void
setHandover_userid
(
String
handover_userid
)
{
this
.
handover_userid
=
handover_userid
;
}
public
String
getTakeover_userid
()
{
return
takeover_userid
;
}
public
void
setTakeover_userid
(
String
takeover_userid
)
{
this
.
takeover_userid
=
takeover_userid
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
37c75c2f
...
...
@@ -4,6 +4,7 @@ import com.gic.api.base.commons.Page;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.qdto.TransferActiveCodeQDTO
;
import
com.gic.haoban.manage.api.dto.role.StoreRoleDTO
;
import
java.util.List
;
...
...
@@ -318,4 +319,9 @@ public interface StaffApiService {
* @date 2022-10-21 00:25:46
*/
List
<
StaffDTO
>
listBindStoreIds
(
List
<
String
>
storeIds
,
String
wxEnterpriseId
);
/**
* 转移员工许可
*/
ServiceResponse
<
Integer
>
batchTransferLicense
(
List
<
TransferActiveCodeQDTO
>
transferActiveCodeQOList
,
String
wxEnterpriseId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
37c75c2f
...
...
@@ -150,6 +150,13 @@ public interface StaffService {
* @author xgh331
* @throws
*/
void
activedAccountTimer
(
String
wxEid
);
void
activedAccountTimer
(
String
wxEid
);
/**
* 查询其他占用许可总数
*/
Integer
getOccupyNum
();
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
37c75c2f
...
...
@@ -211,7 +211,12 @@ public class StaffServiceImpl implements StaffService {
}
}
}
@Override
public
Integer
getOccupyNum
()
{
return
mapper
.
getOccupyNum
();
}
private
void
listAccount
(
TabHaobanWxEnterprise
wxEnterprise
,
int
limit
,
String
cursor
)
{
String
wxEnterpriseId
=
wxEnterprise
.
getWxEnterpriseId
()
;
String
openCorpid
=
wxEnterprise
.
getOpenCorpid
()
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseActiveDataServiceImpl.java
View file @
37c75c2f
...
...
@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.dto.StaffActiveDataDTO;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanWxEnterpriseActiveDataMapper
;
import
com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeOrderAccountMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseActiveData
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseActiveDataService
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -35,6 +36,9 @@ public class WxEnterpriseActiveDataServiceImpl implements WxEnterpriseActiveData
@Autowired
private
TabHaobanQywxFeeOrderAccountMapper
tabHaobanQywxFeeOrderAccountMapper
;
@Autowired
private
StaffService
staffService
;
@Override
public
Integer
saveOrUpdate
(
String
wxEnterpriseId
)
{
if
(
StrUtil
.
isBlank
(
wxEnterpriseId
))
...
...
@@ -111,6 +115,11 @@ public class WxEnterpriseActiveDataServiceImpl implements WxEnterpriseActiveData
public
StaffActiveDataDTO
getWxEnterpriseActiveDataByWxEnterpriseId
(
String
wxEnterpriseId
)
{
if
(
StrUtil
.
isBlank
(
wxEnterpriseId
))
return
null
;
return
EntityUtil
.
changeEntityByJSON
(
StaffActiveDataDTO
.
class
,
tabHaobanWxEnterpriseActiveDataMapper
.
getWxEnterpriseActiveDataById
(
wxEnterpriseId
));
StaffActiveDataDTO
staffActiveDataDTO
=
EntityUtil
.
changeEntityByJSON
(
StaffActiveDataDTO
.
class
,
tabHaobanWxEnterpriseActiveDataMapper
.
getWxEnterpriseActiveDataById
(
wxEnterpriseId
));
//查询其他占用许可总数
Integer
occupy
=
0
;
occupy
=
staffService
.
getOccupyNum
();
staffActiveDataDTO
.
setOccupy
(
occupy
);
return
staffActiveDataDTO
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
37c75c2f
...
...
@@ -2,6 +2,7 @@ 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.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
...
...
@@ -22,6 +23,7 @@ import com.gic.haoban.common.utils.PageUtil;
import
com.gic.haoban.common.utils.RolesListUtils
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.qdto.TransferActiveCodeQDTO
;
import
com.gic.haoban.manage.api.dto.role.StoreRoleDTO
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
...
...
@@ -41,6 +43,8 @@ import com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum;
import
com.gic.thirdparty.cloudfile.pojo.CloudFileInfo
;
import
com.gic.wechat.api.dto.qywx.QywxNewUseridDTO
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.dto.qywx.fee.AccountTransferUserDTO
;
import
com.gic.wechat.api.service.qywx.QywxOrderApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -97,6 +101,8 @@ public class StaffApiServiceImpl implements StaffApiService {
private
EnterpriseService
enterpriseService
;
@Autowired
private
Config
config
;
@Autowired
private
QywxOrderApiService
qywxOrderApiService
;
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
...
...
@@ -991,4 +997,17 @@ public class StaffApiServiceImpl implements StaffApiService {
public
List
<
StaffDTO
>
listBindStoreIds
(
List
<
String
>
storeIds
,
String
wxEnterpriseId
)
{
return
staffMapper
.
listBindStoreIds
(
storeIds
,
wxEnterpriseId
);
}
@Override
public
ServiceResponse
<
Integer
>
batchTransferLicense
(
List
<
TransferActiveCodeQDTO
>
transferActiveCodeQOList
,
String
wxEnterpriseId
)
{
WxEnterpriseDTO
wxEnterpriseDTO
=
this
.
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
String
openCorpid
=
wxEnterpriseDTO
.
getOpenCorpid
();
String
serviceCorpid
=
config
.
getCorpid
();
List
<
AccountTransferUserDTO
>
accountTransferUserDTOList
=
JSONArray
.
parseArray
(
transferActiveCodeQOList
.
toString
(),
AccountTransferUserDTO
.
class
);
qywxOrderApiService
.
batchTransferLicense
(
serviceCorpid
,
openCorpid
,
accountTransferUserDTOList
);
return
null
;
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanWxEnterpriseActiveDataMapper.xml
View file @
37c75c2f
...
...
@@ -16,9 +16,9 @@
</resultMap>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseActiveData"
>
insert into tab_haoban_wx_enterprise_active_data (id, wx_enterprise_id, purchased,used,
inactive, transfer, activated,expired,create_time,delete_flag)
inactive, transfer, activated,expired,create_time,
update_time,
delete_flag)
values (#{id,jdbcType=BIGINT}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{purchased,jdbcType=INTEGER},#{used,jdbcType=INTEGER},#{inactive,jdbcType=INTEGER},
#{transfer,jdbcType=INTEGER},#{activated,jdbcType=INTEGER},#{expired,jdbcType=INTEGER},now(),0)
#{transfer,jdbcType=INTEGER},#{activated,jdbcType=INTEGER},#{expired,jdbcType=INTEGER},now(),
now(),
0)
</insert>
<select
id=
"getWxEnterpriseActiveDataById"
resultMap=
"BaseResultMap"
>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
37c75c2f
...
...
@@ -6,6 +6,8 @@ import java.util.stream.Collectors;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.web.qo.TransferActiveCodeQO
;
import
com.gic.haoban.manage.web.vo.StaffActiveDataVO
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -35,28 +37,7 @@ import com.gic.haoban.common.utils.AuthWebRequestUtil;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.EnterpriseDetailDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkBindLogDetailDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkInfoDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.WxApplicationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.enums.ChannelCodeEnum
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.api.service.DealSyncOperationApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.HaobanUserApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxApplicationApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.qo.StaffEditJsonQO
;
import
com.gic.haoban.manage.web.vo.ClerkInfoVo
;
...
...
@@ -103,6 +84,8 @@ public class StaffController extends WebBaseController {
private
DealSyncOperationApiService
dealSyncOperationApiService
;
@Autowired
private
EnterpriseService
enterpriseService
;
@Autowired
private
WxEnterpriseActiveDataApiService
wxEnterpriseActiveDataApiService
;
@RequestMapping
(
"set-default-gicenterprise"
)
...
...
@@ -615,10 +598,9 @@ public class StaffController extends WebBaseController {
public
RestResponse
<
StaffActiveDataVO
>
getStaffActiveData
()
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
StaffActiveDataVO
staffActiveDataVo
=
new
StaffActiveDataVO
();
return
RestResponse
.
successResult
(
staffActiveDataVo
);
ServiceResponse
<
StaffActiveDataDTO
>
StaffActiveDataDTO
=
wxEnterpriseActiveDataApiService
.
getWxEnterpriseActiveDataByWxEnterpriseId
(
wxEnterpriseId
);
StaffActiveDataVO
staffActiveDataVO
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
StaffActiveDataDTO
.
getResult
()),
StaffActiveDataVO
.
class
);
return
RestResponse
.
successResult
(
staffActiveDataVO
);
}
/**
* 通讯录许可转移
...
...
@@ -628,6 +610,7 @@ public class StaffController extends WebBaseController {
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
StaffActiveDataVO
staffActiveDataVo
=
new
StaffActiveDataVO
();
return
RestResponse
.
successResult
();
}
...
...
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