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
bb294ddc
Commit
bb294ddc
authored
Dec 21, 2021
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:bug修改
parent
afc23ea3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
96 deletions
+132
-96
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+15
-1
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+106
-95
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+11
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
bb294ddc
...
@@ -26,7 +26,8 @@ public interface StaffMapper {
...
@@ -26,7 +26,8 @@ public interface StaffMapper {
Page
<
TabHaobanStaff
>
pageStaff
(
@Param
(
"staffIds"
)
Set
<
String
>
staffIds
,
@Param
(
"activeFlag"
)
Integer
activeFlag
,
@Param
(
"keyword"
)
String
keyword
);
Page
<
TabHaobanStaff
>
pageStaff
(
@Param
(
"staffIds"
)
Set
<
String
>
staffIds
,
@Param
(
"activeFlag"
)
Integer
activeFlag
,
@Param
(
"keyword"
)
String
keyword
);
TabHaobanStaff
selectByUserIdAndEnterpriseId
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaff
selectByUserIdAndEnterpriseId
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaff
selectSuperByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaff
selectSuperByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
...
@@ -80,4 +81,16 @@ public interface StaffMapper {
...
@@ -80,4 +81,16 @@ public interface StaffMapper {
int
updateOpenUserIdsByUserId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
int
updateOpenUserIdsByUserId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"wxOpenUseId"
)
String
wxOpenUseId
);
@Param
(
"wxOpenUseId"
)
String
wxOpenUseId
);
/**
* 选择通过打开用户id和企业标识
*
* @param wxOpenUseId wx开放使用id
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @author mozhu
* @date 2021-12-21 21:13:56
*/
TabHaobanStaff
selectByOpenUserIdAndEnterpriseId
(
@Param
(
"wxOpenUseId"
)
String
wxOpenUseId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
bb294ddc
...
@@ -4,7 +4,9 @@ import com.gic.commons.util.EntityUtil;
...
@@ -4,7 +4,9 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.service.MemberUnionRelatedService
;
import
com.gic.haoban.manage.service.service.MemberUnionRelatedService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
...
@@ -18,102 +20,111 @@ import java.util.Set;
...
@@ -18,102 +20,111 @@ import java.util.Set;
@Service
@Service
public
class
StaffServiceImpl
implements
StaffService
{
public
class
StaffServiceImpl
implements
StaffService
{
@Autowired
@Autowired
StaffMapper
mapper
;
private
StaffMapper
mapper
;
@Autowired
@Autowired
private
MemberUnionRelatedService
memberUnionRelatedService
;
private
MemberUnionRelatedService
memberUnionRelatedService
;
@Autowired
@Override
private
WxEnterpriseMapper
wxEnterpriseMapper
;
public
TabHaobanStaff
selectById
(
String
id
)
{
@Override
return
mapper
.
selectByPrimaryKey
(
id
);
public
TabHaobanStaff
selectById
(
String
id
)
{
}
return
mapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
)
{
@Override
if
(
StringUtils
.
isBlank
(
phoneNumber
)){
public
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
)
{
return
null
;
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
}
return
null
;
return
mapper
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
}
}
return
mapper
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
}
@Override
public
String
add
(
TabHaobanStaff
tab
)
{
@Override
Date
now
=
new
Date
();
public
String
add
(
TabHaobanStaff
tab
)
{
tab
.
setCreateTime
(
now
);
Date
now
=
new
Date
();
tab
.
setUpdateTime
(
now
);
tab
.
setCreateTime
(
now
);
if
(
StringUtils
.
isBlank
(
tab
.
getStaffId
())){
tab
.
setUpdateTime
(
now
);
tab
.
setStaffId
(
StringUtil
.
randomUUID
());
if
(
StringUtils
.
isBlank
(
tab
.
getStaffId
()))
{
}
tab
.
setStaffId
(
StringUtil
.
randomUUID
());
tab
.
setStatusFlag
(
1
);
}
tab
.
setStatusFlag
(
1
);
// if(StringUtils.isBlank(tab.getWxUserId())){
// if(StringUtils.isBlank(tab.getWxUserId())){
// tab.setWxUserId(tab.getStaffId());
// tab.setWxUserId(tab.getStaffId());
// }
// }
mapper
.
insertSelective
(
tab
);
mapper
.
insertSelective
(
tab
);
return
tab
.
getStaffId
();
return
tab
.
getStaffId
();
}
}
@Override
@Override
public
Page
<
TabHaobanStaff
>
pageStaff
(
Set
<
String
>
staffIds
,
Integer
activeFlag
,
String
keyword
)
{
public
Page
<
TabHaobanStaff
>
pageStaff
(
Set
<
String
>
staffIds
,
Integer
activeFlag
,
String
keyword
)
{
return
mapper
.
pageStaff
(
staffIds
,
activeFlag
,
keyword
);
return
mapper
.
pageStaff
(
staffIds
,
activeFlag
,
keyword
);
}
}
@Override
@Override
public
TabHaobanStaff
selectByUserIdAndEnterpriseId
(
String
userId
,
String
wxEnterpriseId
)
{
public
TabHaobanStaff
selectByUserIdAndEnterpriseId
(
String
userId
,
String
wxEnterpriseId
)
{
TabHaobanWxEnterprise
tabHaobanWxEnterprise
=
wxEnterpriseMapper
.
selectByPrimaryKey
(
wxEnterpriseId
);
return
mapper
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
if
(
tabHaobanWxEnterprise
==
null
)
{
}
return
null
;
}
@Override
String
corpid
=
tabHaobanWxEnterprise
.
getCorpid
();
public
void
updateByPrimaryKey
(
TabHaobanStaff
tab
)
{
if
(
corpid
.
length
()
>
20
)
{
tab
.
setUpdateTime
(
new
Date
());
return
mapper
.
selectByOpenUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
mapper
.
updateByPrimaryKeySelective
(
tab
);
}
else
{
}
return
mapper
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
}
@Override
}
public
int
delByuserid
(
String
staffId
)
{
TabHaobanStaff
staff
=
new
TabHaobanStaff
();
@Override
staff
.
setStaffId
(
staffId
);
public
void
updateByPrimaryKey
(
TabHaobanStaff
tab
)
{
staff
.
setStatusFlag
(
0
);
tab
.
setUpdateTime
(
new
Date
());
return
this
.
mapper
.
updateByPrimaryKeySelective
(
staff
);
mapper
.
updateByPrimaryKeySelective
(
tab
);
}
}
@Override
@Override
public
List
<
StaffDTO
>
listByUserIdsAndWxEnterpriseId
(
List
<
String
>
userIds
,
String
wxEnterpriseId
)
{
public
int
delByuserid
(
String
staffId
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
this
.
mapper
.
listByUserIdsAndWxEnterpriseId
(
userIds
,
wxEnterpriseId
));
TabHaobanStaff
staff
=
new
TabHaobanStaff
();
}
staff
.
setStaffId
(
staffId
);
staff
.
setStatusFlag
(
0
);
@Override
return
this
.
mapper
.
updateByPrimaryKeySelective
(
staff
);
public
int
cleanStaff
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
}
memberUnionRelatedService
.
cleanStaffRelated
(
wxEnterpriseId
,
staffIds
);
return
mapper
.
cleanStaff
(
wxEnterpriseId
,
staffIds
);
@Override
}
public
List
<
StaffDTO
>
listByUserIdsAndWxEnterpriseId
(
List
<
String
>
userIds
,
String
wxEnterpriseId
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
this
.
mapper
.
listByUserIdsAndWxEnterpriseId
(
userIds
,
wxEnterpriseId
));
@Override
}
public
TabHaobanStaff
getWxStaffByOne
(
String
wxEnterpriseId
)
{
return
mapper
.
getWxStaffByOne
(
wxEnterpriseId
);
@Override
}
public
int
cleanStaff
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
memberUnionRelatedService
.
cleanStaffRelated
(
wxEnterpriseId
,
staffIds
);
@Override
return
mapper
.
cleanStaff
(
wxEnterpriseId
,
staffIds
);
public
List
<
String
>
listDelUserStaffId
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
}
return
mapper
.
listUserStaffId
(
wxEnterpriseId
,
staffIds
);
}
@Override
public
TabHaobanStaff
getWxStaffByOne
(
String
wxEnterpriseId
)
{
@Override
return
mapper
.
getWxStaffByOne
(
wxEnterpriseId
);
public
List
<
TabHaobanStaff
>
listNoStatusByStaffIds
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
}
return
mapper
.
listNoStatusStaffIds
(
wxEnterpriseId
,
staffIds
);
}
@Override
public
List
<
String
>
listDelUserStaffId
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
@Override
return
mapper
.
listUserStaffId
(
wxEnterpriseId
,
staffIds
);
public
List
<
StaffDTO
>
listByOpenUserIdsAndWxEnterpriseId
(
List
<
String
>
openUserIds
,
String
wxEnterpriseId
)
{
}
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
mapper
.
listByOpenUserIdsAndWxEnterpriseId
(
openUserIds
,
wxEnterpriseId
));
}
@Override
public
List
<
TabHaobanStaff
>
listNoStatusByStaffIds
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
@Override
return
mapper
.
listNoStatusStaffIds
(
wxEnterpriseId
,
staffIds
);
public
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
)
{
}
return
mapper
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
}
@Override
public
List
<
StaffDTO
>
listByOpenUserIdsAndWxEnterpriseId
(
List
<
String
>
openUserIds
,
String
wxEnterpriseId
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
mapper
.
listByOpenUserIdsAndWxEnterpriseId
(
openUserIds
,
wxEnterpriseId
));
}
@Override
public
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
)
{
return
mapper
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
}
}
}
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
bb294ddc
...
@@ -405,4 +405,14 @@
...
@@ -405,4 +405,14 @@
where wx_enterprise_id = #{wxEnterpriseId}
where wx_enterprise_id = #{wxEnterpriseId}
and wx_user_id = #{wxUserId}
and wx_user_id = #{wxUserId}
</update>
</update>
<select
id=
"selectByOpenUserIdAndEnterpriseId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff
where wx_open_user_id = #{wxOpenUseId}
and wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1 limit 1
</select>
</mapper>
</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