Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QianQiXiang
haoban-manage3.0
Commits
d6132963
Commit
d6132963
authored
Jun 30, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
离职继承fix
parent
7b8944a7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
4 deletions
+95
-4
HandoverStaffFriendCountDTO.java
...ic/haoban/manage/api/dto/HandoverStaffFriendCountDTO.java
+38
-0
HandoverExternalMapper.java
...ban/manage/service/dao/mapper/HandoverExternalMapper.java
+11
-0
HandoverService.java
...om/gic/haoban/manage/service/service/HandoverService.java
+9
-0
HandoverServiceImpl.java
...oban/manage/service/service/impl/HandoverServiceImpl.java
+7
-0
HandoverOperationApiServiceImpl.java
...ice/service/out/impl/HandoverOperationApiServiceImpl.java
+8
-4
HandoverExternalMapper.xml
...vice/src/main/resources/mapper/HandoverExternalMapper.xml
+22
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/HandoverStaffFriendCountDTO.java
0 → 100644
View file @
d6132963
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
/**
* Created 2021/6/16.
*
* @author hua
*/
public
class
HandoverStaffFriendCountDTO
implements
Serializable
{
private
String
staffId
;
private
Integer
friendCount
;
private
Integer
haobanFriendCount
;
public
Integer
getHaobanFriendCount
()
{
return
haobanFriendCount
;
}
public
void
setHaobanFriendCount
(
Integer
haobanFriendCount
)
{
this
.
haobanFriendCount
=
haobanFriendCount
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
Integer
getFriendCount
()
{
return
friendCount
;
}
public
void
setFriendCount
(
Integer
friendCount
)
{
this
.
friendCount
=
friendCount
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/HandoverExternalMapper.java
View file @
d6132963
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.service.entity.TabHandoverExternal
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -85,4 +86,13 @@ public interface HandoverExternalMapper {
/**
*/
int
delNoTransferExternal
(
@Param
(
"userIds"
)
List
<
String
>
userIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
* 查询待分配客户列表
*
* @param wxEnterpriseId
* @return
*/
List
<
HandoverStaffFriendCountDTO
>
listPreCountByStaffIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/HandoverService.java
View file @
d6132963
...
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.HandoverExternalDTO
;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.service.entity.TabHandoverExternal
;
import
com.gic.haoban.manage.service.entity.TabHandoverStaff
;
import
com.gic.haoban.manage.service.entity.TabHandoverTransfer
;
...
...
@@ -112,4 +113,12 @@ public interface HandoverService {
*/
public
boolean
dealResult
(
String
wxEnterpriseId
,
String
transferId
,
List
<
QywxTransferCustomerInfoDTO
>
list
);
/**
* 还未分配的客户数量
*
* @param wxEnterpriseId
* @return
*/
public
List
<
HandoverStaffFriendCountDTO
>
listFriendCountByWxStaffIds
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/HandoverServiceImpl.java
View file @
d6132963
...
...
@@ -6,6 +6,7 @@ import com.gic.commons.util.ToolUtil;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.HandoverExternalDTO
;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.entity.*
;
...
...
@@ -301,4 +302,10 @@ public class HandoverServiceImpl implements HandoverService {
});
return
true
;
}
@Override
public
List
<
HandoverStaffFriendCountDTO
>
listFriendCountByWxStaffIds
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
List
<
HandoverStaffFriendCountDTO
>
ret
=
handoverExternalMapper
.
listPreCountByStaffIds
(
wxEnterpriseId
,
staffIds
);
return
ret
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HandoverOperationApiServiceImpl.java
View file @
d6132963
...
...
@@ -161,12 +161,16 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
logger
.
info
(
"不存在staff列表"
);
return
null
;
}
List
<
HandoverStaffFriendCountDTO
>
friendCountList
=
handoverService
.
listFriendCountByWxStaffIds
(
wxEnterpriseId
,
staffIds
);
Map
<
String
,
HandoverStaffFriendCountDTO
>
staffFriendCountMap
=
friendCountList
.
stream
().
collect
(
Collectors
.
toMap
(
dto
->
dto
.
getStaffId
(),
dto
->
dto
));
List
<
HandoverStaffInfoDTO
>
retList
=
EntityUtil
.
changeEntityListByJSON
(
HandoverStaffInfoDTO
.
class
,
tabHaobanStaffs
);
retList
.
forEach
(
dto
->
{
TabHandoverStaff
handoverStaff
=
handoverStaffMap
.
get
(
dto
.
getStaffId
());
dto
.
setDimissionTime
(
handoverStaff
.
getDimissionTime
());
dto
.
setFriendCount
(
handoverStaff
.
getFriendCount
());
dto
.
setHaobanFriendCount
(
handoverStaff
.
getHaobanFriendCount
());
HandoverStaffFriendCountDTO
staffFriend
=
staffFriendCountMap
.
get
(
dto
.
getStaffId
());
TabHandoverStaff
tabHandoverStaff
=
handoverStaffMap
.
get
(
dto
.
getStaffId
());
dto
.
setDimissionTime
(
tabHandoverStaff
.
getDimissionTime
());
dto
.
setFriendCount
(
staffFriend
.
getFriendCount
());
dto
.
setHaobanFriendCount
(
staffFriend
.
getHaobanFriendCount
());
});
return
retList
;
}
...
...
haoban-manage3-service/src/main/resources/mapper/HandoverExternalMapper.xml
View file @
d6132963
...
...
@@ -19,6 +19,12 @@
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"FiendCountResultMap"
type=
"com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO"
>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"friendCount"
jdbcType=
"INTEGER"
property=
"friendCount"
/>
<result
column=
"haobanFriendCount"
jdbcType=
"INTEGER"
property=
"haobanFriendCount"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
handover_external_id, wx_enterprise_id, staff_id, user_id, external_user_id, external_user_name, relation_id,
haoban_friend_flag, external_head_url, status_flag, handover_transfer_id, takeover_time,
...
...
@@ -339,4 +345,19 @@
</if>
and status_flag=1
</update>
<select
id=
"listPreCountByStaffIds"
resultMap=
"FiendCountResultMap"
>
select
staff_id ,
COUNT(external_user_id) friendCount,
sum(haoban_friend_flag) haobanFriendCount
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id in
<foreach
collection=
"staffIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
and status_flag=1
group by staff_id
</select>
</mapper>
\ No newline at end of file
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