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
a220f89c
Commit
a220f89c
authored
Feb 21, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:合并代码
parent
c0397cca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
135 deletions
+91
-135
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+11
-10
StaffVO.java
...x/src/main/java/com/gic/haoban/manage/web/vo/StaffVO.java
+80
-125
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
a220f89c
...
@@ -35,7 +35,6 @@ import com.gic.haoban.manage.web.qo.CommonQO;
...
@@ -35,7 +35,6 @@ import com.gic.haoban.manage.web.qo.CommonQO;
import
com.gic.haoban.manage.web.vo.*
;
import
com.gic.haoban.manage.web.vo.*
;
import
com.gic.haoban.manage.web.vo.notify.CustomerFriendMemberVO
;
import
com.gic.haoban.manage.web.vo.notify.CustomerFriendMemberVO
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -185,6 +184,7 @@ public class ClerkController extends WebBaseController {
...
@@ -185,6 +184,7 @@ public class ClerkController extends WebBaseController {
/**
/**
* 会员小程序-获取后台认证配置
* 会员小程序-获取后台认证配置
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
...
@@ -203,6 +203,7 @@ public class ClerkController extends WebBaseController {
...
@@ -203,6 +203,7 @@ public class ClerkController extends WebBaseController {
/**
/**
* 会员小程序-获取后台认证配置
* 会员小程序-获取后台认证配置
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @param staffId
* @param staffId
* @return
* @return
...
@@ -661,7 +662,7 @@ public class ClerkController extends WebBaseController {
...
@@ -661,7 +662,7 @@ public class ClerkController extends WebBaseController {
//精确查,根据手机号或者code,查找
//精确查,根据手机号或者code,查找
@RequestMapping
(
"query-clerk-list-by-code"
)
@RequestMapping
(
"query-clerk-list-by-code"
)
public
HaobanResponse
queryClerkListByCode
(
String
keyword
,
String
wxEnterpriseId
,
String
staffId
)
{
public
HaobanResponse
queryClerkListByCode
(
String
keyword
,
String
wxEnterpriseId
,
String
staffId
)
{
if
(
StringUtils
.
isAnyBlank
(
staffId
,
wxEnterpriseId
,
keyword
))
{
if
(
StringUtils
.
isAnyBlank
(
staffId
,
wxEnterpriseId
,
keyword
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
List
<
EnterpriseDetailDTO
>
list
=
wxEnterpriseRelatedApiService
.
listEnterpriseByWxEnterpriseId
(
wxEnterpriseId
);
List
<
EnterpriseDetailDTO
>
list
=
wxEnterpriseRelatedApiService
.
listEnterpriseByWxEnterpriseId
(
wxEnterpriseId
);
...
@@ -765,7 +766,7 @@ public class ClerkController extends WebBaseController {
...
@@ -765,7 +766,7 @@ public class ClerkController extends WebBaseController {
if
(
staffDTO
!=
null
)
{
if
(
staffDTO
!=
null
)
{
String
phoneNumber
=
staffDTO
.
getPhoneNumber
();
String
phoneNumber
=
staffDTO
.
getPhoneNumber
();
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
logger
.
error
(
"手机号为空,staffId:{}"
,
staffId
);
logger
.
error
(
"手机号为空,staffId:{}"
,
staffId
);
return
ret
;
return
ret
;
}
}
List
<
ClerkDTO
>
clerkList
=
clerkNewService
.
listClerkByEnterpriseIdAndSearch
(
enterpriseIdList
,
storeIdList
,
phoneNumber
);
List
<
ClerkDTO
>
clerkList
=
clerkNewService
.
listClerkByEnterpriseIdAndSearch
(
enterpriseIdList
,
storeIdList
,
phoneNumber
);
...
@@ -794,7 +795,7 @@ public class ClerkController extends WebBaseController {
...
@@ -794,7 +795,7 @@ public class ClerkController extends WebBaseController {
return
ret
;
return
ret
;
}
}
return
ret
.
stream
().
filter
(
mid
->
(!
clerkIds
.
contains
(
mid
.
getClerkId
()))).
collect
(
return
ret
.
stream
().
filter
(
mid
->
(!
clerkIds
.
contains
(
mid
.
getClerkId
()))).
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
n
->
n
.
getClerkId
()))),
ArrayList:
:
new
));
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
n
->
n
.
getClerkId
()))),
ArrayList:
:
new
));
}
}
//绑定
//绑定
...
@@ -1188,7 +1189,7 @@ public class ClerkController extends WebBaseController {
...
@@ -1188,7 +1189,7 @@ public class ClerkController extends WebBaseController {
CustomerFriendMemberVO
ret
=
new
CustomerFriendMemberVO
();
CustomerFriendMemberVO
ret
=
new
CustomerFriendMemberVO
();
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
qo
.
getStaffId
());
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
qo
.
getStaffId
());
if
(
staffDTO
==
null
)
{
if
(
staffDTO
==
null
)
{
return
RestResponse
.
failure
(
HaoBanErrCode
.
ERR_6
.
getCode
()
+
""
,
HaoBanErrCode
.
ERR_6
.
getMsg
());
return
RestResponse
.
failure
(
HaoBanErrCode
.
ERR_6
.
getCode
()
+
""
,
HaoBanErrCode
.
ERR_6
.
getMsg
());
}
}
int
friendCount
=
externalClerkRelatedApiService
.
countFriendCountByClerkId
(
qo
.
getWxEnterpriseId
(),
qo
.
getEnterpriseId
(),
staffDTO
.
getWxUserId
(),
qo
.
getClerkId
());
int
friendCount
=
externalClerkRelatedApiService
.
countFriendCountByClerkId
(
qo
.
getWxEnterpriseId
(),
qo
.
getEnterpriseId
(),
staffDTO
.
getWxUserId
(),
qo
.
getClerkId
());
int
memberCount
=
customerApiService
.
countMember
(
qo
.
getEnterpriseId
(),
qo
.
getStoreId
(),
qo
.
getClerkId
());
int
memberCount
=
customerApiService
.
countMember
(
qo
.
getEnterpriseId
(),
qo
.
getStoreId
(),
qo
.
getClerkId
());
...
@@ -1229,14 +1230,14 @@ public class ClerkController extends WebBaseController {
...
@@ -1229,14 +1230,14 @@ public class ClerkController extends WebBaseController {
* @author mozhu
* @author mozhu
* @date 2021-12-29 10:42:24
* @date 2021-12-29 10:42:24
*/
*/
@RequestMapping
(
value
=
"getOpenIdByStaffId"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@RequestMapping
(
value
=
"getOpenIdByStaffId"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
RestResponse
<
String
>
getOpenIdByStaffId
()
{
public
RestResponse
<
String
>
getOpenIdByStaffId
()
{
String
staffId
=
this
.
getLoginUser
().
getStaffId
();
String
staffId
=
this
.
getLoginUser
().
getStaffId
();
String
wxEnterpriseId
=
this
.
getLoginUser
().
getWxEnterpriseId
();
String
wxEnterpriseId
=
this
.
getLoginUser
().
getWxEnterpriseId
();
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffId
);
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffId
);
if
(
staffDTO
==
null
)
{
if
(
staffDTO
==
null
)
{
int
code
=
HaoBanErrCode
.
ERR_6
.
getCode
();
int
code
=
HaoBanErrCode
.
ERR_6
.
getCode
();
return
RestResponse
.
failure
(
String
.
valueOf
(
code
),
HaoBanErrCode
.
ERR_6
.
getMsg
());
return
RestResponse
.
failure
(
String
.
valueOf
(
code
),
HaoBanErrCode
.
ERR_6
.
getMsg
());
}
}
String
wxOpenId
=
staffDTO
.
getWxOpenId
();
String
wxOpenId
=
staffDTO
.
getWxOpenId
();
if
(
StringUtils
.
isNotBlank
(
wxOpenId
))
{
if
(
StringUtils
.
isNotBlank
(
wxOpenId
))
{
...
@@ -1245,15 +1246,15 @@ public class ClerkController extends WebBaseController {
...
@@ -1245,15 +1246,15 @@ public class ClerkController extends WebBaseController {
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
==
null
)
{
if
(
wxEnterpriseDTO
==
null
)
{
int
code
=
HaoBanErrCode
.
ERR_400002
.
getCode
();
int
code
=
HaoBanErrCode
.
ERR_400002
.
getCode
();
return
RestResponse
.
failure
(
String
.
valueOf
(
code
),
HaoBanErrCode
.
ERR_400002
.
getMsg
());
return
RestResponse
.
failure
(
String
.
valueOf
(
code
),
HaoBanErrCode
.
ERR_400002
.
getMsg
());
}
}
String
wxUserId
=
staffDTO
.
getWxUserId
();
String
wxUserId
=
staffDTO
.
getWxUserId
();
String
openid
=
qywxUserApiService
.
getSelfOpenIdByUserId
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
wxUserId
);
String
openid
=
qywxUserApiService
.
getSelfOpenIdByUserId
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
wxUserId
);
if
(
StringUtils
.
isBlank
(
openid
))
{
if
(
StringUtils
.
isBlank
(
openid
))
{
int
code
=
HaoBanErrCode
.
ERR_600003
.
getCode
();
int
code
=
HaoBanErrCode
.
ERR_600003
.
getCode
();
return
RestResponse
.
failure
(
String
.
valueOf
(
code
),
HaoBanErrCode
.
ERR_600003
.
getMsg
());
return
RestResponse
.
failure
(
String
.
valueOf
(
code
),
HaoBanErrCode
.
ERR_600003
.
getMsg
());
}
}
staffApiService
.
updateOpenIdByStaffId
(
staffId
,
openid
);
staffApiService
.
updateOpenIdByStaffId
(
staffId
,
openid
);
return
RestResponse
.
successResult
(
openid
);
return
RestResponse
.
successResult
(
openid
);
}
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/StaffVO.java
View file @
a220f89c
...
@@ -6,14 +6,10 @@ import java.io.Serializable;
...
@@ -6,14 +6,10 @@ import java.io.Serializable;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
<<<<<<<
HEAD
public
class
StaffVO
implements
Serializable
{
=======
public
class
StaffVO
implements
Serializable
{
public
class
StaffVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
>>>>>>>
fixbug_0221
/**
/**
* 员工id
* 员工id
*/
*/
...
@@ -25,83 +21,60 @@ public class StaffVO implements Serializable {
...
@@ -25,83 +21,60 @@ public class StaffVO implements Serializable {
/**
/**
* 微信用户id
* 微信用户id
*/
*/
<<<<<<<
HEAD
private
String
wxUserId
;
/**
* 手机号
*/
private
String
phoneNumber
;
=======
private
String
wxUserId
;
private
String
wxUserId
;
/**
/**
* 手机号
* 手机号
*/
*/
private
String
phoneNumber
;
private
String
phoneNumber
;
>>>>>>>
fixbug_0221
/**
/**
* 员工姓名
* 员工姓名
*/
*/
private
String
staffName
;
private
String
staffName
;
/**
/**
* 国家码
* 国家码
*/
*/
private
String
nationCode
;
private
String
nationCode
;
/**
/**
* 昵称
* 昵称
*/
*/
private
String
nickName
;
private
String
nickName
;
/**
/**
* 性别
* 性别
*/
*/
private
Integer
sex
;
private
Integer
sex
;
/**
/**
* 职位
* 职位
*/
*/
private
String
postion
;
private
String
postion
;
/**
/**
* 激活状态
* 激活状态
*/
*/
private
Integer
activeFlag
;
private
Integer
activeFlag
;
/**
/**
* 对外职务
* 对外职务
*/
*/
private
String
extendPostion
;
private
String
extendPostion
;
/**
/**
* 状态
* 状态
*/
*/
private
Integer
statusFlag
;
private
Integer
statusFlag
;
private
Date
createTime
;
private
Date
createTime
;
private
Date
updateTime
;
private
Date
updateTime
;
private
String
departmentIds
;
private
String
departmentIds
;
private
String
headImg
;
private
String
headImg
;
private
Integer
sort
;
private
Integer
sort
;
private
List
<
DepartmentDTO
>
departmentList
;
private
List
<
DepartmentDTO
>
departmentList
;
private
int
bindFlag
;
private
int
bindFlag
;
private
String
clerkCode
;
private
String
clerkCode
;
<<<<<<<
HEAD
private
String
staffDepartmentRelatedId
;
private
int
clerkType
;
private
Integer
syncPostionFlag
;
private
Integer
superManagerFlag
;
private
Boolean
weixinPush
;
private
int
memberCount
;
private
String
clerkId
;
=======
private
String
staffDepartmentRelatedId
;
private
String
staffDepartmentRelatedId
;
private
int
clerkType
;
private
int
clerkType
;
...
@@ -115,25 +88,18 @@ public class StaffVO implements Serializable {
...
@@ -115,25 +88,18 @@ public class StaffVO implements Serializable {
private
Integer
memberCount
;
private
Integer
memberCount
;
private
String
clerkId
;
private
String
clerkId
;
>>>>>>>
fixbug_0221
/**
/**
* 关联状态 1 已关联 0 未关联
* 关联状态 1 已关联 0 未关联
* 关联状态为 员工是否关联某门店导购
* 关联状态为 员工是否关联某门店导购
*/
*/
private
Integer
relationFlag
;
private
Integer
relationFlag
;
<<<<<<<
HEAD
private
static
final
long
serialVersionUID
=
1L
;
public
String
getClerkId
()
{
=======
private
String
wxOpenUseId
;
private
String
wxOpenUseId
;
private
String
wxOpenId
;
private
String
wxOpenId
;
private
String
qrCode
;
private
String
qrCode
;
public
String
getClerkId
()
{
public
String
getClerkId
()
{
>>>>>>>
fixbug_0221
return
clerkId
;
return
clerkId
;
}
}
...
@@ -175,16 +141,16 @@ public class StaffVO implements Serializable {
...
@@ -175,16 +141,16 @@ public class StaffVO implements Serializable {
}
}
public
String
getStaffId
()
{
public
String
getStaffId
()
{
return
staffId
;
return
staffId
;
}
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
==
null
?
null
:
staffId
.
trim
();
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
==
null
?
null
:
staffId
.
trim
();
}
public
String
getWxEnterpriseId
()
{
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
return
wxEnterpriseId
;
}
}
...
@@ -225,68 +191,68 @@ public class StaffVO implements Serializable {
...
@@ -225,68 +191,68 @@ public class StaffVO implements Serializable {
}
}
public
String
getWxUserId
()
{
public
String
getWxUserId
()
{
return
wxUserId
;
return
wxUserId
;
}
}
public
void
setWxUserId
(
String
wxUserId
)
{
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
==
null
?
null
:
wxUserId
.
trim
();
this
.
wxUserId
=
wxUserId
==
null
?
null
:
wxUserId
.
trim
();
}
}
public
String
getPhoneNumber
()
{
public
String
getPhoneNumber
()
{
return
phoneNumber
;
return
phoneNumber
;
}
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
==
null
?
null
:
phoneNumber
.
trim
();
this
.
phoneNumber
=
phoneNumber
==
null
?
null
:
phoneNumber
.
trim
();
}
}
public
String
getStaffName
()
{
public
String
getStaffName
()
{
return
staffName
;
return
staffName
;
}
}
public
void
setStaffName
(
String
staffName
)
{
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
==
null
?
null
:
staffName
.
trim
();
this
.
staffName
=
staffName
==
null
?
null
:
staffName
.
trim
();
}
}
public
String
getNationCode
()
{
public
String
getNationCode
()
{
return
nationCode
;
return
nationCode
;
}
}
public
void
setNationCode
(
String
nationCode
)
{
public
void
setNationCode
(
String
nationCode
)
{
this
.
nationCode
=
nationCode
==
null
?
null
:
nationCode
.
trim
();
this
.
nationCode
=
nationCode
==
null
?
null
:
nationCode
.
trim
();
}
}
public
String
getNickName
()
{
public
String
getNickName
()
{
return
nickName
;
return
nickName
;
}
}
public
void
setNickName
(
String
nickName
)
{
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
==
null
?
null
:
nickName
.
trim
();
this
.
nickName
=
nickName
==
null
?
null
:
nickName
.
trim
();
}
}
public
Integer
getSex
()
{
public
Integer
getSex
()
{
return
sex
;
return
sex
;
}
}
public
void
setSex
(
Integer
sex
)
{
public
void
setSex
(
Integer
sex
)
{
this
.
sex
=
sex
;
this
.
sex
=
sex
;
}
}
public
String
getPostion
()
{
public
String
getPostion
()
{
return
postion
;
return
postion
;
}
}
public
void
setPostion
(
String
postion
)
{
public
void
setPostion
(
String
postion
)
{
this
.
postion
=
postion
==
null
?
null
:
postion
.
trim
();
this
.
postion
=
postion
==
null
?
null
:
postion
.
trim
();
}
}
public
Integer
getActiveFlag
()
{
public
Integer
getActiveFlag
()
{
return
activeFlag
;
return
activeFlag
;
}
}
public
void
setActiveFlag
(
Integer
activeFlag
)
{
public
void
setActiveFlag
(
Integer
activeFlag
)
{
this
.
activeFlag
=
activeFlag
;
this
.
activeFlag
=
activeFlag
;
}
}
public
String
getDepartmentIds
()
{
public
String
getDepartmentIds
()
{
return
departmentIds
;
return
departmentIds
;
...
@@ -344,19 +310,11 @@ public class StaffVO implements Serializable {
...
@@ -344,19 +310,11 @@ public class StaffVO implements Serializable {
this
.
weixinPush
=
weixinPush
;
this
.
weixinPush
=
weixinPush
;
}
}
<<<<<<<
HEAD
public
int
getMemberCount
()
{
return
memberCount
;
}
public
void
setMemberCount
(
int
memberCount
)
{
=======
public
Integer
getMemberCount
()
{
public
Integer
getMemberCount
()
{
return
memberCount
;
return
memberCount
;
}
}
public
void
setMemberCount
(
Integer
memberCount
)
{
public
void
setMemberCount
(
Integer
memberCount
)
{
>>>>>>>
fixbug_0221
this
.
memberCount
=
memberCount
;
this
.
memberCount
=
memberCount
;
}
}
...
@@ -367,8 +325,6 @@ public class StaffVO implements Serializable {
...
@@ -367,8 +325,6 @@ public class StaffVO implements Serializable {
public
void
setRelationFlag
(
Integer
relationFlag
)
{
public
void
setRelationFlag
(
Integer
relationFlag
)
{
this
.
relationFlag
=
relationFlag
;
this
.
relationFlag
=
relationFlag
;
}
}
<<<<<<<
HEAD
=======
public
String
getWxOpenUseId
()
{
public
String
getWxOpenUseId
()
{
return
wxOpenUseId
;
return
wxOpenUseId
;
...
@@ -393,5 +349,4 @@ public class StaffVO implements Serializable {
...
@@ -393,5 +349,4 @@ public class StaffVO implements Serializable {
public
void
setQrCode
(
String
qrCode
)
{
public
void
setQrCode
(
String
qrCode
)
{
this
.
qrCode
=
qrCode
;
this
.
qrCode
=
qrCode
;
}
}
>>>>>>>
fixbug_0221
}
}
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