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
a18b04fc
Commit
a18b04fc
authored
Feb 25, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:删除好办登录错误代码
parent
3f86c03d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
83 deletions
+1
-83
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+0
-10
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+0
-72
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
a18b04fc
...
@@ -44,16 +44,6 @@ public interface StaffApiService {
...
@@ -44,16 +44,6 @@ public interface StaffApiService {
void
wxGetAdd
(
String
userId
,
String
wxEnterpriseId
);
void
wxGetAdd
(
String
userId
,
String
wxEnterpriseId
);
/**
* 好办登录-如果无该员工新增员工
*
* @param wxOpenUserId wx openuser id
* @param wxEnterpriseId wx企业标识
* @author mozhu
* @date 2022-02-25 14:08:06
*/
void
getHaobanWxSave
(
String
wxOpenUserId
,
String
wxEnterpriseId
);
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
);
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
);
/**
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
a18b04fc
...
@@ -544,81 +544,9 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -544,81 +544,9 @@ public class StaffApiServiceImpl implements StaffApiService {
logger
.
info
(
"信息:{}"
,
JSONObject
.
toJSONString
(
wxSaveNew
));
logger
.
info
(
"信息:{}"
,
JSONObject
.
toJSONString
(
wxSaveNew
));
}
}
@Override
public
void
getHaobanWxSave
(
String
wxOpenUserId
,
String
wxEnterpriseId
)
{
RedisUtil
.
lock
(
"haoban_add_user"
+
wxEnterpriseId
+
wxOpenUserId
,
2L
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
null
==
enterpriseDTO
)
{
logger
.
info
(
"企业不存在:{}:{}"
,
wxEnterpriseId
,
wxOpenUserId
);
return
;
}
SecretSettingDTO
secretSetting
=
secretSettingService
.
getSecretSetting
(
wxEnterpriseId
,
SecretTypeEnum
.
HAOBAN_HELP
.
getVal
());
if
(
null
==
secretSetting
||
secretSetting
.
getCheckFlag
()
==
0
)
{
logger
.
info
(
"没有配置secret:{}"
,
JSONObject
.
toJSONString
(
enterpriseDTO
));
return
;
}
String
corpid
=
enterpriseDTO
.
getCorpid
();
UserDTO
user
=
qywxUserApiService
.
getWorkWxUser
(
corpid
,
config
.
getWxSuiteid
(),
wxOpenUserId
);
if
(
null
==
user
)
{
logger
.
info
(
"企业微信用户不存在:{}:{}"
,
wxEnterpriseId
,
wxOpenUserId
);
return
;
}
String
imageUrl
=
changeHeaderImageUrl
(
user
.
getAvatar
());
String
mobile
=
user
.
getMobile
();
String
[]
arr
=
getNationCodeAndPhoneNumber
(
mobile
);
String
nationCode
=
arr
[
0
];
String
phoneNumber
=
arr
[
1
];
TabHaobanStaff
staff
=
staffService
.
selectByPhoneNumberOrUserIdAndEnterpriseId
(
phoneNumber
,
wxOpenUserId
,
wxEnterpriseId
);
if
(
staff
!=
null
)
{
staffService
.
delOtherStaffByWxUserId
(
staff
.
getWxUserId
(),
staff
.
getStaffId
(),
wxEnterpriseId
);
}
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
String
userid
=
qywxUserApiService
.
getSelfWxUserIdByPhonenumber
(
corpid
,
secretSetting
.
getSecretVal
(),
phoneNumber
);
logger
.
info
(
"获取到的userid:{}"
,
userid
);
staff
.
setWxUserId
(
userid
);
staff
.
setWxOpenUseId
(
wxOpenUserId
);
staff
.
setUpdateTime
(
new
Date
());
staff
.
setStatusFlag
(
1
);
staff
.
setWxEnterpriseId
(
wxEnterpriseId
);
if
(
StringUtils
.
isNotBlank
(
user
.
getAvatar
()))
{
staff
.
setHeadImg
(
imageUrl
);
}
if
(
StringUtils
.
isNotBlank
(
user
.
getName
()))
{
user
.
setName
(
EmojiFilterUtil
.
removeAllEmoji
(
user
.
getName
()));
staff
.
setStaffName
((
user
.
getName
()));
}
if
(
StringUtils
.
isNotBlank
(
user
.
getAlias
()))
{
user
.
setAlias
(
EmojiFilterUtil
.
removeAllEmoji
(
user
.
getAlias
()));
staff
.
setNickName
((
user
.
getAlias
()));
}
staff
.
setPhoneNumber
(
phoneNumber
);
staff
.
setNationCode
(
nationCode
);
staff
.
setSex
(
user
.
getGender
()
==
null
?
1
:
Integer
.
parseInt
(
user
.
getGender
()));
staff
.
setPostion
(
user
.
getPosition
());
staff
.
setExtendPostion
(
user
.
getExternal_position
());
String
qr_code
=
user
.
getQr_code
();
if
(
StringUtils
.
isNotBlank
(
qr_code
))
{
staff
.
setQrCode
(
qr_code
);
}
//成员更改或更新
if
(
StringUtils
.
isBlank
(
staff
.
getStaffId
()))
{
logger
.
info
(
"新增成员"
);
staff
.
setActiveFlag
(
0
);
staff
.
setCreateTime
(
new
Date
());
staffService
.
add
(
staff
);
}
else
{
staffService
.
updateByPrimaryKey
(
staff
);
}
logger
.
info
(
"门店变更保存:{}"
,
JSONObject
.
toJSONString
(
user
));
staffDepartChange
(
staff
,
wxEnterpriseId
,
user
);
}
@Deprecated
@Deprecated
public
void
wxGetAddOld
(
String
userId
,
String
wxEnterpriseId
)
{
public
void
wxGetAddOld
(
String
userId
,
String
wxEnterpriseId
)
{
//获取微信用户信息
//获取微信用户信息
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
if
(
staff
==
null
)
{
if
(
staff
==
null
)
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
a18b04fc
...
@@ -115,7 +115,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -115,7 +115,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
//手机号不存在
//手机号不存在
if
(
loginStaff
==
null
)
{
if
(
loginStaff
==
null
)
{
if
(
enterprise
!=
null
)
{
if
(
enterprise
!=
null
)
{
staffApiService
.
getHaobanWxSave
(
userId
,
enterprise
.
getWxEnterpriseId
());
staffApiService
.
wxGetAdd
(
userId
,
enterprise
.
getWxEnterpriseId
());
loginStaff
=
staffApiService
.
selectByUserIdAndEnterpriseId
(
userId
,
enterprise
.
getWxEnterpriseId
());
loginStaff
=
staffApiService
.
selectByUserIdAndEnterpriseId
(
userId
,
enterprise
.
getWxEnterpriseId
());
}
}
}
}
...
...
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