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
b4902703
Commit
b4902703
authored
Nov 03, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_xgh_bug_11月' into 'master'
Master xgh bug 11月 See merge request
!396
parents
93d1fee5
22c1347b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
114 additions
and
48 deletions
+114
-48
HaobanMenuQDTO.java
...m/gic/haoban/manage/api/dto/qdto/role/HaobanMenuQDTO.java
+9
-0
ExternalClerkRelatedApiService.java
...an/manage/api/service/ExternalClerkRelatedApiService.java
+2
-3
TabHaobanExternalClerkRelatedMapper.java
...rvice/dao/mapper/TabHaobanExternalClerkRelatedMapper.java
+3
-0
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+1
-2
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+1
-1
ExternalClerkRelatedApiServiceImpl.java
.../service/out/impl/ExternalClerkRelatedApiServiceImpl.java
+7
-2
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-5
TabHaobanExternalClerkRelatedMapper.xml
.../resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
+7
-2
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+24
-12
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+58
-21
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/role/HaobanMenuQDTO.java
View file @
b4902703
...
...
@@ -47,6 +47,15 @@ public class HaobanMenuQDTO implements Serializable {
private
String
routePath
;
private
String
ownerShip
;
private
Integer
statusFlag
=
1
;
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
String
getMenuCode
()
{
return
menuCode
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/ExternalClerkRelatedApiService.java
View file @
b4902703
...
...
@@ -296,8 +296,7 @@ public interface ExternalClerkRelatedApiService {
*/
void
initWxEnterpriseFriend
(
String
wxEnterpriseId
);
int
getCountExternalClerk
(
String
wxEnterpriseId
,
String
staffId
,
List
<
Integer
>
statusFlags
);
int
updateExternalStatus
(
String
wxEnterpriseId
,
String
externalUserid
,
int
status
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanExternalClerkRelatedMapper.java
View file @
b4902703
...
...
@@ -383,4 +383,6 @@ public interface TabHaobanExternalClerkRelatedMapper {
void
updateClerkInfo
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"oldClerkId"
)
String
oldClerkId
,
@Param
(
"newClerkId"
)
String
newClerkId
,
@Param
(
"storeId"
)
String
storeId
);
int
updateExternalStatus
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"externalUserid"
)
String
externalUserid
,
@Param
(
"status"
)
int
status
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
b4902703
...
...
@@ -64,8 +64,7 @@ public interface TabHaobanStaffClerkRelationMapper {
* @author mozhu
* @date 2022-01-13 11:36:11
*/
List
<
TabHaobanStaffClerkRelation
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
b4902703
...
...
@@ -273,7 +273,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
Collections
.
EMPTY_LIST
;
}
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
mapper
.
listByClerkIds
(
clerkList
,
null
)
);
return
mapper
.
listByClerkIds
(
clerkList
,
null
);
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ExternalClerkRelatedApiServiceImpl.java
View file @
b4902703
...
...
@@ -397,9 +397,9 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
}
else
if
(
type
==
1
)
{
//合并会员,会员会先调删除,在调合并。顺序不能调换
log
.
info
(
"合并会员,memberId:{},新memberId={}"
,
memberId
,
mergeMemberId
);
tabHaobanExternalClerkRelatedMapper
.
updateMemberIdByMemberId
(
mergeMemberId
,
memberId
,
enterpriseId
);
int
i
=
tabHaobanExternalClerkRelatedMapper
.
countByMemberId
(
mergeMemberId
,
enterpriseId
);
int
i
=
tabHaobanExternalClerkRelatedMapper
.
countByMemberId
(
memberId
,
enterpriseId
);
if
(
i
>
0
)
{
tabHaobanExternalClerkRelatedMapper
.
updateMemberIdByMemberId
(
mergeMemberId
,
memberId
,
enterpriseId
);
log
.
info
(
"会员合并 ,更新为企微好友,新memberId:{}"
,
mergeMemberId
);
this
.
memberApiService
.
updateMemberQywxFlag
(
enterpriseId
,
mergeMemberId
,
1
);
}
...
...
@@ -724,4 +724,9 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
public
int
getCountExternalClerk
(
String
wxEnterpriseId
,
String
staffId
,
List
<
Integer
>
statusFlags
)
{
return
tabHaobanExternalClerkRelatedMapper
.
getCountExternalClerk
(
wxEnterpriseId
,
staffId
,
statusFlags
);
}
@Override
public
int
updateExternalStatus
(
String
wxEnterpriseId
,
String
externalUserid
,
int
status
)
{
return
this
.
tabHaobanExternalClerkRelatedMapper
.
updateExternalStatus
(
wxEnterpriseId
,
externalUserid
,
status
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
b4902703
...
...
@@ -233,10 +233,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override
public
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkIds
)
{
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
return
Collections
.
emptyList
();
}
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
null
));
return
this
.
listByClerkIdsWxEnterpriseId
(
clerkIds
,
null
)
;
}
@Override
...
...
@@ -244,7 +241,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
return
Collections
.
emptyList
();
}
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
wxEnterpriseId
)
);
return
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
wxEnterpriseId
);
}
@Override
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
View file @
b4902703
...
...
@@ -551,10 +551,9 @@
UPDATE
tab_haoban_external_clerk_related
SET member_id=#{memberId},
status_flag = 1,
update_time = now()
where member_id = #{oldMemberId}
and enterprise_id = #{enterpriseId}
and enterprise_id = #{enterpriseId}
and status_flag = 1
</update>
<update
id=
"updateStatusByMemberId"
>
...
...
@@ -750,5 +749,10 @@
and clerk_id = #{oldClerkId}
and status_flag in (1,3,4)
</update>
<update
id=
"updateExternalStatus"
>
update tab_haoban_external_clerk_related set external_status = #{status} where
external_user_id = #{externalUserid} and wx_enterprise_id = #{wxEnterpriseId}
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
b4902703
...
...
@@ -131,22 +131,32 @@
and store_id = #{storeId,jdbcType=VARCHAR}
and status_flag = 1
</update>
<select
id=
"listByClerkIds"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_haoban_staff_clerk_relation
where status_flag=1
<select
id=
"listByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
parameterType=
"java.lang.String"
>
select a.staff_clerk_relation_id staffClerkRelationId,
a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
a.open_concat_flag openConcatFlag ,
a.clerk_type clerkType ,
a.manage_flag manageFlag ,
b.wx_user_id qwUserId,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.status_flag=1 and b.status_flag = 1
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
and
a.
wx_enterprise_id = #{wxEnterpriseId}
</if>
and clerk_id in
and
a.
clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
@@ -278,10 +288,12 @@
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
a.open_concat_flag openConcatFlag ,
a.clerk_type clerkType ,
a.manage_flag manageFlag ,
b.wx_user_id qwUserId,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id
from tab_haoban_staff_clerk_relation a left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and a.store_id = #{storeId}
and a.status_flag = 1
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
b4902703
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.convert.Convert
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
...
...
@@ -12,18 +31,38 @@ import com.gic.clerk.api.service.ClerkService;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.ExcelUtils
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
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.*
;
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.*
;
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
;
...
...
@@ -31,19 +70,9 @@ import com.gic.haoban.manage.web.vo.StaffExportVO;
import
com.gic.haoban.manage.web.vo.StaffVO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.convert.Convert
;
@RestController
...
...
@@ -79,7 +108,7 @@ public class StaffController extends WebBaseController {
@Autowired
private
DealSyncOperationApiService
dealSyncOperationApiService
;
@Autowired
private
StoreWidgetService
storeWidget
Service
;
private
EnterpriseService
enterprise
Service
;
@RequestMapping
(
"set-default-gicenterprise"
)
...
...
@@ -421,11 +450,19 @@ public class StaffController extends WebBaseController {
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_10010
.
getCode
()),
HaoBanErrCode
.
ERR_10010
.
getMsg
());
}
List
<
String
>
enterpriseIds
=
list
.
stream
().
filter
(
dto
->
{
boolean
over
=
wxEnterpriseApiService
.
enterpriseIsOver
(
dto
.
getEnterpriseId
());
boolean
over
=
wxEnterpriseApiService
.
haobanIsStop
(
dto
.
getEnterpriseId
());
return
!
over
;
}).
map
(
EnterpriseDetailDTO:
:
getEnterpriseId
).
collect
(
Collectors
.
toList
());
List
<
ClerkDTO
>
clerkDTOList
=
clerkService
.
listClerkEnableHaoban
(
enterpriseIds
,
null
);
boolean
flag
=
CollectionUtils
.
isNotEmpty
(
clerkDTOList
);
boolean
flag
=
false
;
if
(
CollectionUtils
.
isNotEmpty
(
enterpriseIds
))
{
for
(
String
eid
:
enterpriseIds
)
{
EnterpriseSettingDTO
enterpriseSetting
=
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
eid
)
;
if
(
enterpriseSetting
.
getEnableAccessControl
()
!=
null
&&
enterpriseSetting
.
getEnableAccessControl
()
==
1
)
{
flag
=
true
;
break
;
}
}
}
return
RestResponse
.
successResult
(
flag
);
}
...
...
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