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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
14 deletions
+50
-14
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+15
-1
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+24
-13
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
;
...
@@ -20,23 +22,24 @@ import java.util.Set;
...
@@ -20,23 +22,24 @@ import java.util.Set;
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
private
WxEnterpriseMapper
wxEnterpriseMapper
;
@Override
@Override
public
TabHaobanStaff
selectById
(
String
id
)
{
public
TabHaobanStaff
selectById
(
String
id
)
{
return
mapper
.
selectByPrimaryKey
(
id
);
return
mapper
.
selectByPrimaryKey
(
id
);
}
}
@Override
@Override
public
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
)
{
public
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
)
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
return
null
;
return
null
;
}
}
return
mapper
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
return
mapper
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
}
}
@Override
@Override
...
@@ -44,7 +47,7 @@ public class StaffServiceImpl implements StaffService {
...
@@ -44,7 +47,7 @@ public class StaffServiceImpl implements StaffService {
Date
now
=
new
Date
();
Date
now
=
new
Date
();
tab
.
setCreateTime
(
now
);
tab
.
setCreateTime
(
now
);
tab
.
setUpdateTime
(
now
);
tab
.
setUpdateTime
(
now
);
if
(
StringUtils
.
isBlank
(
tab
.
getStaffId
()))
{
if
(
StringUtils
.
isBlank
(
tab
.
getStaffId
()))
{
tab
.
setStaffId
(
StringUtil
.
randomUUID
());
tab
.
setStaffId
(
StringUtil
.
randomUUID
());
}
}
tab
.
setStatusFlag
(
1
);
tab
.
setStatusFlag
(
1
);
...
@@ -58,13 +61,21 @@ public class StaffServiceImpl implements StaffService {
...
@@ -58,13 +61,21 @@ public class StaffServiceImpl implements StaffService {
@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
;
}
String
corpid
=
tabHaobanWxEnterprise
.
getCorpid
();
if
(
corpid
.
length
()
>
20
)
{
return
mapper
.
selectByOpenUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
}
else
{
return
mapper
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
}
}
}
@Override
@Override
...
@@ -83,13 +94,13 @@ public class StaffServiceImpl implements StaffService {
...
@@ -83,13 +94,13 @@ public class StaffServiceImpl implements StaffService {
@Override
@Override
public
List
<
StaffDTO
>
listByUserIdsAndWxEnterpriseId
(
List
<
String
>
userIds
,
String
wxEnterpriseId
)
{
public
List
<
StaffDTO
>
listByUserIdsAndWxEnterpriseId
(
List
<
String
>
userIds
,
String
wxEnterpriseId
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
this
.
mapper
.
listByUserIdsAndWxEnterpriseId
(
userIds
,
wxEnterpriseId
));
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
this
.
mapper
.
listByUserIdsAndWxEnterpriseId
(
userIds
,
wxEnterpriseId
));
}
}
@Override
@Override
public
int
cleanStaff
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
public
int
cleanStaff
(
String
wxEnterpriseId
,
List
<
String
>
staffIds
)
{
memberUnionRelatedService
.
cleanStaffRelated
(
wxEnterpriseId
,
staffIds
);
memberUnionRelatedService
.
cleanStaffRelated
(
wxEnterpriseId
,
staffIds
);
return
mapper
.
cleanStaff
(
wxEnterpriseId
,
staffIds
);
return
mapper
.
cleanStaff
(
wxEnterpriseId
,
staffIds
);
}
}
@Override
@Override
...
...
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