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
a5b1f236
Commit
a5b1f236
authored
Dec 20, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into feature-daiban-12-14
parents
030e1f53
02639d67
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
1905 additions
and
517 deletions
+1905
-517
HandoverStaffInfoDTO.java
...a/com/gic/haoban/manage/api/dto/HandoverStaffInfoDTO.java
+1
-0
LoginDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/LoginDTO.java
+0
-3
StaffDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
+4
-3
StaffLoginDTO.java
...ain/java/com/gic/haoban/manage/api/dto/StaffLoginDTO.java
+151
-0
StaffPrivacyUseLogDTO.java
.../com/gic/haoban/manage/api/dto/StaffPrivacyUseLogDTO.java
+182
-0
WelcomeDTO.java
...c/main/java/com/gic/haoban/manage/api/dto/WelcomeDTO.java
+9
-8
WellDoneLoginDTO.java
.../java/com/gic/haoban/manage/api/dto/WellDoneLoginDTO.java
+53
-0
DictApiService.java
...ava/com/gic/haoban/manage/api/service/DictApiService.java
+10
-0
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+45
-31
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+9
-0
WebInterceptor.java
...com/gic/haoban/manage/web/interceptor/WebInterceptor.java
+1
-14
DictMapper.java
.../com/gic/haoban/manage/service/dao/mapper/DictMapper.java
+0
-2
PendingTaskMapper.java
...c/haoban/manage/service/dao/mapper/PendingTaskMapper.java
+2
-1
StaffPrivacyUseLogMapper.java
...n/manage/service/dao/mapper/StaffPrivacyUseLogMapper.java
+45
-0
TabStaffPrivacyUseLog.java
...c/haoban/manage/service/entity/TabStaffPrivacyUseLog.java
+182
-0
TabWelcome.java
...java/com/gic/haoban/manage/service/entity/TabWelcome.java
+10
-10
StaffPrivacyUseLogBO.java
...c/haoban/manage/service/pojo/bo/StaffPrivacyUseLogBO.java
+181
-0
TabStaffPrivacyUseLogVO.java
...aoban/manage/service/pojo/vo/TabStaffPrivacyUseLogVO.java
+184
-0
MiniprogramSettingService.java
...ban/manage/service/service/MiniprogramSettingService.java
+7
-7
StaffPrivacyUseLogService.java
...ban/manage/service/service/StaffPrivacyUseLogService.java
+42
-0
StaffPrivacyUseLogServiceImpl.java
...e/service/service/impl/StaffPrivacyUseLogServiceImpl.java
+49
-0
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+1
-4
DictApiServiceImpl.java
...n/manage/service/service/out/impl/DictApiServiceImpl.java
+8
-5
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+49
-58
MiniprogramSettingServiceImpl.java
...rvice/service/out/impl/MiniprogramSettingServiceImpl.java
+0
-5
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+7
-17
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-2
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+19
-5
DictMapper.xml
...-manage3-service/src/main/resources/mapper/DictMapper.xml
+5
-4
StaffPrivacyUseLogMapper.xml
...ce/src/main/resources/mapper/StaffPrivacyUseLogMapper.xml
+149
-0
TabHaobanWelcomeMapper.xml
...vice/src/main/resources/mapper/TabHaobanWelcomeMapper.xml
+1
-1
AuthRequestUtil.java
.../java/com/gic/haoban/manage/web/auth/AuthRequestUtil.java
+1
-10
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+6
-8
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+9
-8
GlobalExceptionHandler.java
...c/haoban/manage/web/exception/GlobalExceptionHandler.java
+75
-16
pom.xml
haoban-manage3-wx/pom.xml
+0
-1
HttpLimit.java
...c/main/java/com/gic/haoban/manage/web/anno/HttpLimit.java
+0
-21
IgnoreLogin.java
...main/java/com/gic/haoban/manage/web/anno/IgnoreLogin.java
+0
-12
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+1
-1
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+17
-24
DictController.java
.../com/gic/haoban/manage/web/controller/DictController.java
+18
-4
MaidianLogController.java
...ic/haoban/manage/web/controller/MaidianLogController.java
+8
-7
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+12
-4
UploadController.java
...om/gic/haoban/manage/web/controller/UploadController.java
+12
-17
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+0
-0
HaoBanErrCode.java
...java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
+3
-1
ControllerException.java
.../gic/haoban/manage/web/exception/ControllerException.java
+0
-10
GlobalExceptionHandler.java
...c/haoban/manage/web/exception/GlobalExceptionHandler.java
+90
-39
MyApplicationContextAware.java
...gic/haoban/manage/web/init/MyApplicationContextAware.java
+5
-6
HttpLimitInterceptor.java
...c/haoban/manage/web/interceptor/HttpLimitInterceptor.java
+7
-30
MobileWebInterceptor.java
...c/haoban/manage/web/interceptor/MobileWebInterceptor.java
+28
-10
ResponseInterceptor.java
...ic/haoban/manage/web/interceptor/ResponseInterceptor.java
+0
-41
TestLoginInterceptor.java
...c/haoban/manage/web/interceptor/TestLoginInterceptor.java
+0
-36
ClerkLoginQO.java
.../main/java/com/gic/haoban/manage/web/qo/ClerkLoginQO.java
+0
-27
StaffLoginQO.java
.../main/java/com/gic/haoban/manage/web/qo/StaffLoginQO.java
+142
-0
IPAddressUtil.java
...n/java/com/gic/haoban/manage/web/utils/IPAddressUtil.java
+38
-0
StaffStoreVO.java
.../main/java/com/gic/haoban/manage/web/vo/StaffStoreVO.java
+10
-2
WellDoneLoginInfoVO.java
...ava/com/gic/haoban/manage/web/vo/WellDoneLoginInfoVO.java
+13
-1
spring-interceptor.xml
...manage3-wx/src/main/webapp/WEB-INF/spring-interceptor.xml
+2
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/HandoverStaffInfoDTO.java
View file @
a5b1f236
...
...
@@ -8,6 +8,7 @@ import java.util.Date;
* @author hua
*/
public
class
HandoverStaffInfoDTO
extends
StaffDTO
{
private
Integer
friendCount
;
private
Integer
haobanFriendCount
;
private
Date
dimissionTime
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/LoginDTO.java
View file @
a5b1f236
...
...
@@ -4,9 +4,6 @@ import java.io.Serializable;
public
class
LoginDTO
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
private
StaffDTO
staffDTO
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
View file @
a5b1f236
...
...
@@ -4,7 +4,10 @@ import java.io.Serializable;
import
java.util.Date
;
import
java.util.List
;
public
class
StaffDTO
implements
Serializable
{
public
class
StaffDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 员工id
*/
...
...
@@ -89,8 +92,6 @@ public class StaffDTO implements Serializable{
*/
private
Integer
relationFlag
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getClerkId
()
{
return
clerkId
;
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffLoginDTO.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
/**
* 员工登录
*
* @author mozhu
* @date 2021/12/10 15:00
*/
public
class
StaffLoginDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
170574390217887304L
;
private
String
staffId
;
private
String
wxEnterpriseId
;
private
String
phoneNumber
;
private
String
nationcode
;
private
String
wxUserId
;
/**
* 是否同意隐私协议,1:是;0:否
*/
private
Integer
privacyUseFlag
;
/**
* 好办版本
*/
private
String
welldoneVersion
;
/**
* 企微版本
*/
private
String
weworkVersion
;
/**
* 用户手机品牌
*/
private
String
staffPhoneBrand
;
/**
* 用户手机型号
*/
private
String
staffPhoneModel
;
/**
* 用户手机版本
*/
private
String
staffPhoneVersion
;
/**
* 登录ip
*/
private
String
staffIp
;
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getNationcode
()
{
return
nationcode
;
}
public
void
setNationcode
(
String
nationcode
)
{
this
.
nationcode
=
nationcode
;
}
public
String
getWxUserId
()
{
return
wxUserId
;
}
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
;
}
public
Integer
getPrivacyUseFlag
()
{
return
privacyUseFlag
;
}
public
void
setPrivacyUseFlag
(
Integer
privacyUseFlag
)
{
this
.
privacyUseFlag
=
privacyUseFlag
;
}
public
String
getWelldoneVersion
()
{
return
welldoneVersion
;
}
public
void
setWelldoneVersion
(
String
welldoneVersion
)
{
this
.
welldoneVersion
=
welldoneVersion
;
}
public
String
getWeworkVersion
()
{
return
weworkVersion
;
}
public
void
setWeworkVersion
(
String
weworkVersion
)
{
this
.
weworkVersion
=
weworkVersion
;
}
public
String
getStaffPhoneBrand
()
{
return
staffPhoneBrand
;
}
public
void
setStaffPhoneBrand
(
String
staffPhoneBrand
)
{
this
.
staffPhoneBrand
=
staffPhoneBrand
;
}
public
String
getStaffPhoneModel
()
{
return
staffPhoneModel
;
}
public
void
setStaffPhoneModel
(
String
staffPhoneModel
)
{
this
.
staffPhoneModel
=
staffPhoneModel
;
}
public
String
getStaffPhoneVersion
()
{
return
staffPhoneVersion
;
}
public
void
setStaffPhoneVersion
(
String
staffPhoneVersion
)
{
this
.
staffPhoneVersion
=
staffPhoneVersion
;
}
public
String
getStaffIp
()
{
return
staffIp
;
}
public
void
setStaffIp
(
String
staffIp
)
{
this
.
staffIp
=
staffIp
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffPrivacyUseLogDTO.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author mozhu
* @date 2021/12/16 19:50
*/
public
class
StaffPrivacyUseLogDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
9137221776834569940L
;
/**
* id
*/
private
Long
id
;
/**
* 员工id
*/
private
String
staffId
;
/**
* 微信企业id
*/
private
String
wxEnterpriseId
;
/**
* 是否同意隐私协议,1:是;0:否
*/
private
Integer
privacyUseFlag
;
/**
* 手机号
*/
private
String
phoneNumber
;
/**
* 好办版本
*/
private
String
welldoneVersion
;
/**
* 企微版本
*/
private
String
weworkVersion
;
/**
* 用户手机品牌
*/
private
String
staffPhoneBrand
;
/**
* 用户手机型号
*/
private
String
staffPhoneModel
;
/**
* 用户手机版本
*/
private
String
staffPhoneVersion
;
/**
* 登录ip
*/
private
String
staffIp
;
/**
* create_time
*/
private
Date
createTime
;
/**
* update_time
*/
private
Date
updateTime
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
Integer
getPrivacyUseFlag
()
{
return
privacyUseFlag
;
}
public
void
setPrivacyUseFlag
(
Integer
privacyUseFlag
)
{
this
.
privacyUseFlag
=
privacyUseFlag
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getWelldoneVersion
()
{
return
welldoneVersion
;
}
public
void
setWelldoneVersion
(
String
welldoneVersion
)
{
this
.
welldoneVersion
=
welldoneVersion
;
}
public
String
getWeworkVersion
()
{
return
weworkVersion
;
}
public
void
setWeworkVersion
(
String
weworkVersion
)
{
this
.
weworkVersion
=
weworkVersion
;
}
public
String
getStaffPhoneBrand
()
{
return
staffPhoneBrand
;
}
public
void
setStaffPhoneBrand
(
String
staffPhoneBrand
)
{
this
.
staffPhoneBrand
=
staffPhoneBrand
;
}
public
String
getStaffPhoneModel
()
{
return
staffPhoneModel
;
}
public
void
setStaffPhoneModel
(
String
staffPhoneModel
)
{
this
.
staffPhoneModel
=
staffPhoneModel
;
}
public
String
getStaffPhoneVersion
()
{
return
staffPhoneVersion
;
}
public
void
setStaffPhoneVersion
(
String
staffPhoneVersion
)
{
this
.
staffPhoneVersion
=
staffPhoneVersion
;
}
public
String
getStaffIp
()
{
return
staffIp
;
}
public
void
setStaffIp
(
String
staffIp
)
{
this
.
staffIp
=
staffIp
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WelcomeDTO.java
View file @
a5b1f236
...
...
@@ -90,14 +90,6 @@ public class WelcomeDTO implements Serializable {
this
.
welcomeContent
=
welcomeContent
;
}
public
String
getWelcomeImg
()
{
return
welcomeImg
;
}
public
void
setWelcomeImg
(
String
welcomeImg
)
{
this
.
welcomeImg
=
welcomeImg
;
}
public
Integer
getOpenFlag
()
{
return
openFlag
;
}
...
...
@@ -129,4 +121,12 @@ public class WelcomeDTO implements Serializable {
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getWelcomeImg
()
{
return
welcomeImg
;
}
public
void
setWelcomeImg
(
String
welcomeImg
)
{
this
.
welcomeImg
=
welcomeImg
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WellDoneLoginDTO.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
/**
* 好办登录信息
*
* @author mozhu
* @date 2021/12/14 17:37
*/
public
class
WellDoneLoginDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8035522410061849606L
;
/**
* 员工id
*/
private
String
staffId
;
/**
* wx企业id
*/
private
String
wxEnterpriseId
;
/**
* 导购电话号码
*/
private
String
phoneNumber
;
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DictApiService.java
View file @
a5b1f236
...
...
@@ -25,4 +25,14 @@ public interface DictApiService {
* @return
*/
List
<
DictDTO
>
queryList
(
List
<
String
>
dictKeys
);
/**
* 根据key 获取一条
*
* @param dictKey dict关键
* @return {@link DictDTO }
* @author mozhu
* @date 2021-12-15 19:47:51
*/
DictDTO
findOneDictByKey
(
String
dictKey
);
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
a5b1f236
...
...
@@ -9,63 +9,64 @@ import java.util.List;
public
interface
StaffApiService
{
public
StaffDTO
selectById
(
String
staffId
);
StaffDTO
selectById
(
String
staffId
);
public
StaffDTO
selectSuperByWxEnterpriseId
(
String
wxEnterpriseId
);
StaffDTO
selectSuperByWxEnterpriseId
(
String
wxEnterpriseId
);
public
List
<
StaffDTO
>
listByIds
(
List
<
String
>
staffIds
);
List
<
StaffDTO
>
listByIds
(
List
<
String
>
staffIds
);
public
List
<
StaffDTO
>
listByWxUserId
(
String
wxUserId
);
List
<
StaffDTO
>
listByWxUserId
(
String
wxUserId
);
public
StaffDTO
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
);
StaffDTO
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
);
public
ServiceResponse
add
(
StaffDTO
staff
,
String
departmentIds
);
ServiceResponse
add
(
StaffDTO
staff
,
String
departmentIds
);
public
List
<
StaffDepartmentRelatedDTO
>
listStaffDepartmentByStaffId
(
String
staffId
);
List
<
StaffDepartmentRelatedDTO
>
listStaffDepartmentByStaffId
(
String
staffId
);
public
Page
<
StaffDTO
>
pageStaff
(
List
<
String
>
departmentId
,
Integer
activeFlag
,
String
keyword
,
BasePageInfo
pageInfo
,
Integer
relationFlag
);
Page
<
StaffDTO
>
pageStaff
(
List
<
String
>
departmentId
,
Integer
activeFlag
,
String
keyword
,
BasePageInfo
pageInfo
,
Integer
relationFlag
);
public
void
del
(
String
staffDepartmentStaffRelatedId
);
void
del
(
String
staffDepartmentStaffRelatedId
);
/**
* 获取微信成员
*
* @param userId
* @param wxEnterpriseId
* @return
*/
public
ServiceResponse
getWxSaveNew
(
String
userId
,
String
wxEnterpriseId
);
ServiceResponse
getWxSaveNew
(
String
userId
,
String
wxEnterpriseId
);
public
void
wxGetAdd
(
String
userId
,
String
wxEnterpriseId
);
void
wxGetAdd
(
String
userId
,
String
wxEnterpriseId
);
public
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
);
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
);
public
void
syscGicClerk
(
String
fieldListString
);
void
syscGicClerk
(
String
fieldListString
);
public
StaffDTO
selectByUserIdAndEnterpriseId
(
String
userId
,
String
wxEnterpriseId
);
StaffDTO
selectByUserIdAndEnterpriseId
(
String
userId
,
String
wxEnterpriseId
);
public
StaffDepartmentRelatedDTO
getDepartmentIdAndStaffId
(
String
departmentId
,
String
staffId
);
StaffDepartmentRelatedDTO
getDepartmentIdAndStaffId
(
String
departmentId
,
String
staffId
);
public
int
countByDepartmentId
(
String
departmentId
);
int
countByDepartmentId
(
String
departmentId
);
public
void
syncGicClerk
(
String
fieldListString
);
void
syncGicClerk
(
String
fieldListString
);
public
void
addGicClerk
(
GicClerkDTO
clerkDTO
);
void
addGicClerk
(
GicClerkDTO
clerkDTO
);
StaffDepartmentRelatedDTO
getDepartmentIdAndCode
(
String
departmentId
,
String
code
);
void
initWxUser
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
,
String
taskId
);
void
initWxUser
(
String
corpid
,
String
contactSecret
,
String
wxEnterpriseId
,
Integer
wxDepartmentId
,
String
taskId
);
public
List
<
String
>
listUnBindClerk
(
String
storeId
);
List
<
String
>
listUnBindClerk
(
String
storeId
);
public
void
cleanGicClerk
(
String
clerkCode
,
String
departmentId
);
void
cleanGicClerk
(
String
clerkCode
,
String
departmentId
);
public
String
insertUserLoginLog
(
UserLoginLogDTO
userLoginLogDTO
);
String
insertUserLoginLog
(
UserLoginLogDTO
userLoginLogDTO
);
public
int
countByDepartmentIds
(
List
<
String
>
departmentIds
);
int
countByDepartmentIds
(
List
<
String
>
departmentIds
);
public
List
<
StaffDTO
>
listByPhoneNumber
(
String
phoneNumber
);
List
<
StaffDTO
>
listByPhoneNumber
(
String
phoneNumber
);
public
List
<
StaffDTO
>
listByUserIdsAndWxEnterpriseId
(
List
<
String
>
userIds
,
String
wxEnterpriseId
);
List
<
StaffDTO
>
listByUserIdsAndWxEnterpriseId
(
List
<
String
>
userIds
,
String
wxEnterpriseId
);
/**
* 保存gic成员
...
...
@@ -73,7 +74,7 @@ public interface StaffApiService {
* @param clerkDTO
* @return
*/
public
ServiceResponse
saveSyncStaffByGic
(
GicClerkDTO
clerkDTO
);
ServiceResponse
saveSyncStaffByGic
(
GicClerkDTO
clerkDTO
);
/**
* 获取成员头像
...
...
@@ -82,31 +83,44 @@ public interface StaffApiService {
* @param storeId
* @return
*/
public
ServiceResponse
<
String
>
getStaffQrcode
(
String
clerkCode
,
String
storeId
);
ServiceResponse
<
String
>
getStaffQrcode
(
String
clerkCode
,
String
storeId
);
void
wxFristAdd
(
String
userJson
,
String
wxEnterpriseId
);
List
<
String
>
listBindClerkUserId
(
String
storeId
);
public
List
<
StaffClerkRelationDTO
>
listBindRelationUserId
(
String
storeId
);
List
<
StaffClerkRelationDTO
>
listBindRelationUserId
(
String
storeId
);
/**
* 激活
*
* @param staffId
* @return
*/
public
boolean
activeStaff
(
String
staffId
);
boolean
activeStaff
(
String
staffId
);
/**
* 获取一个staff
*
* @param wxEnterpriseId
* @return
*/
public
StaffDTO
getWxStaffOne
(
String
wxEnterpriseId
);
StaffDTO
getWxStaffOne
(
String
wxEnterpriseId
);
/**
* @param wxEnterpriseId
* @return
*/
public
StaffDTO
getAndAddSupperAdmin
(
String
wxEnterpriseId
);
StaffDTO
getAndAddSupperAdmin
(
String
wxEnterpriseId
);
/**
* 是否隐私
*
* @param staffId 员工id
* @return {@link StaffPrivacyUseLogDTO }
* @author mozhu
* @date 2021-12-16 19:53:48
*/
StaffPrivacyUseLogDTO
getStaffPrivacyByStaffId
(
String
staffId
);
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
a5b1f236
...
...
@@ -154,4 +154,13 @@ public interface WxEnterpriseApiService {
* @date 2021-11-30 19:14:08
*/
void
agreeExternalUseridCallBack
(
String
corpId
,
String
serviceCorpId
);
/**
* 好办登录
*
* @param staffLoginDTO 员工登录dto
* @author mozhu
* @date 2021-12-15 11:02:52
*/
void
wellDoneLogin
(
StaffLoginDTO
staffLoginDTO
);
}
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/interceptor/WebInterceptor.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
interceptor
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.auth.api.anno.MenuCheck
;
import
com.gic.haoban.auth.api.dto.UserRightDetailDTO
;
import
com.gic.haoban.auth.api.enums.RoleCodeEnum
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.auth.AuthRequestUtil
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
...
...
@@ -19,7 +12,6 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
...
...
@@ -29,11 +21,7 @@ import java.util.Map;
*/
public
class
WebInterceptor
extends
HandlerInterceptorAdapter
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
WebInterceptor
.
class
);
// @Autowired
// private ClerkRightManageService clerkRightManageService;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WebInterceptor
.
class
);
private
void
errorResult
(
HttpServletResponse
httpServletResponse
,
HaoBanErrCode
errCode
)
{
HaobanResponse
response
=
new
HaobanResponse
();
...
...
@@ -55,7 +43,6 @@ public class WebInterceptor extends HandlerInterceptorAdapter {
logger
.
info
(
"post-url:{}"
,
requestURI
);
Map
<
String
,
String
[]>
parameterMap
=
httpServletRequest
.
getParameterMap
();
logger
.
info
(
"post-params:{}"
,
JSONObject
.
toJSONString
(
parameterMap
));
return
true
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/DictMapper.java
View file @
a5b1f236
...
...
@@ -26,5 +26,4 @@ public interface DictMapper {
TabHaobanDict
selectByDictKey
(
String
dictKey
);
TabHaobanDict
selectByDictName
(
String
dictKey
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/PendingTaskMapper.java
View file @
a5b1f236
...
...
@@ -60,7 +60,8 @@ public interface PendingTaskMapper {
* @param endDate
* @return
*/
public
List
<
TabPendingTask
>
listPendingTaskByCreateTime
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkId"
)
String
clerkId
,
public
List
<
TabPendingTask
>
listPendingTaskByCreateTime
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffPrivacyUseLogMapper.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
com.gic.haoban.manage.service.entity.TabStaffPrivacyUseLog
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author xuwenqian
* @date 2021/12/15 10:35
*/
@Mapper
public
interface
StaffPrivacyUseLogMapper
{
/**
* 新增
*
* @param tabStaffPrivacyUseLog 选项卡的员工隐私使用日志
* @return int
* @author mozhu
* @date 2021-12-15 10:41:51
*/
int
insert
(
TabStaffPrivacyUseLog
tabStaffPrivacyUseLog
);
/**
* 更新
*
* @param tabStaffPrivacyUseLog 选项卡的员工隐私使用日志
* @return int
* @author mozhu
* @date 2021-12-15 10:44:22
*/
int
update
(
TabStaffPrivacyUseLog
tabStaffPrivacyUseLog
);
/**
* 查询
*
* @param staffId 员工id
* @return {@link List<TabStaffPrivacyUseLog> }
* @author mozhu
* @date 2021-12-15 10:49:02
*/
TabStaffPrivacyUseLog
getByStaffId
(
@Param
(
"staffId"
)
String
staffId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabStaffPrivacyUseLog.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author mozhu
* @date 2021/12/15 10:34
*/
public
class
TabStaffPrivacyUseLog
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
5237810468345263967L
;
/**
* id
*/
private
Long
id
;
/**
* 员工id
*/
private
String
staffId
;
/**
* 微信企业id
*/
private
String
wxEnterpriseId
;
/**
* 是否同意隐私协议,1:是;0:否
*/
private
Integer
privacyUseFlag
;
/**
* 手机号
*/
private
String
phoneNumber
;
/**
* 好办版本
*/
private
String
welldoneVersion
;
/**
* 企微版本
*/
private
String
weworkVersion
;
/**
* 用户手机品牌
*/
private
String
staffPhoneBrand
;
/**
* 用户手机型号
*/
private
String
staffPhoneModel
;
/**
* 用户手机版本
*/
private
String
staffPhoneVersion
;
/**
* 登录ip
*/
private
String
staffIp
;
/**
* create_time
*/
private
Date
createTime
;
/**
* update_time
*/
private
Date
updateTime
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
Integer
getPrivacyUseFlag
()
{
return
privacyUseFlag
;
}
public
void
setPrivacyUseFlag
(
Integer
privacyUseFlag
)
{
this
.
privacyUseFlag
=
privacyUseFlag
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getWelldoneVersion
()
{
return
welldoneVersion
;
}
public
void
setWelldoneVersion
(
String
welldoneVersion
)
{
this
.
welldoneVersion
=
welldoneVersion
;
}
public
String
getWeworkVersion
()
{
return
weworkVersion
;
}
public
void
setWeworkVersion
(
String
weworkVersion
)
{
this
.
weworkVersion
=
weworkVersion
;
}
public
String
getStaffPhoneBrand
()
{
return
staffPhoneBrand
;
}
public
void
setStaffPhoneBrand
(
String
staffPhoneBrand
)
{
this
.
staffPhoneBrand
=
staffPhoneBrand
;
}
public
String
getStaffPhoneModel
()
{
return
staffPhoneModel
;
}
public
void
setStaffPhoneModel
(
String
staffPhoneModel
)
{
this
.
staffPhoneModel
=
staffPhoneModel
;
}
public
String
getStaffPhoneVersion
()
{
return
staffPhoneVersion
;
}
public
void
setStaffPhoneVersion
(
String
staffPhoneVersion
)
{
this
.
staffPhoneVersion
=
staffPhoneVersion
;
}
public
String
getStaffIp
()
{
return
staffIp
;
}
public
void
setStaffIp
(
String
staffIp
)
{
this
.
staffIp
=
staffIp
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabWelcome.java
View file @
a5b1f236
...
...
@@ -4,7 +4,6 @@ import java.io.Serializable;
import
java.util.Date
;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 欢迎语配置表
*
...
...
@@ -39,7 +38,7 @@ public class TabWelcome implements Serializable {
private
String
welcomeImg
;
/**
* 0
删除 1正常
* 0
关闭 1开启
*/
private
Integer
openFlag
;
...
...
@@ -90,14 +89,6 @@ public class TabWelcome implements Serializable {
this
.
welcomeContent
=
welcomeContent
;
}
public
String
getWelcomeImg
()
{
return
welcomeImg
;
}
public
void
setWelcomeImg
(
String
welcomeImg
)
{
this
.
welcomeImg
=
welcomeImg
;
}
public
Integer
getOpenFlag
()
{
return
openFlag
;
}
...
...
@@ -129,4 +120,12 @@ public class TabWelcome implements Serializable {
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getWelcomeImg
()
{
return
welcomeImg
;
}
public
void
setWelcomeImg
(
String
welcomeImg
)
{
this
.
welcomeImg
=
welcomeImg
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/StaffPrivacyUseLogBO.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
.
bo
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author mozhu
* @date 2021/12/15 10:47
*/
public
class
StaffPrivacyUseLogBO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6881666081809981502L
;
/**
* id
*/
private
Long
id
;
/**
* 员工id
*/
private
String
staffId
;
/**
* 微信企业id
*/
private
String
wxEnterpriseId
;
/**
* 是否同意隐私协议,1:是;0:否
*/
private
Integer
privacyUseFlag
;
/**
* 手机号
*/
private
String
phoneNumber
;
/**
* 好办版本
*/
private
String
welldoneVersion
;
/**
* 企微版本
*/
private
String
weworkVersion
;
/**
* 用户手机品牌
*/
private
String
staffPhoneBrand
;
/**
* 用户手机型号
*/
private
String
staffPhoneModel
;
/**
* 用户手机版本
*/
private
String
staffPhoneVersion
;
/**
* 登录ip
*/
private
String
staffIp
;
/**
* create_time
*/
private
Date
createTime
;
/**
* update_time
*/
private
Date
updateTime
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
Integer
getPrivacyUseFlag
()
{
return
privacyUseFlag
;
}
public
void
setPrivacyUseFlag
(
Integer
privacyUseFlag
)
{
this
.
privacyUseFlag
=
privacyUseFlag
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getWelldoneVersion
()
{
return
welldoneVersion
;
}
public
void
setWelldoneVersion
(
String
welldoneVersion
)
{
this
.
welldoneVersion
=
welldoneVersion
;
}
public
String
getWeworkVersion
()
{
return
weworkVersion
;
}
public
void
setWeworkVersion
(
String
weworkVersion
)
{
this
.
weworkVersion
=
weworkVersion
;
}
public
String
getStaffPhoneBrand
()
{
return
staffPhoneBrand
;
}
public
void
setStaffPhoneBrand
(
String
staffPhoneBrand
)
{
this
.
staffPhoneBrand
=
staffPhoneBrand
;
}
public
String
getStaffPhoneModel
()
{
return
staffPhoneModel
;
}
public
void
setStaffPhoneModel
(
String
staffPhoneModel
)
{
this
.
staffPhoneModel
=
staffPhoneModel
;
}
public
String
getStaffPhoneVersion
()
{
return
staffPhoneVersion
;
}
public
void
setStaffPhoneVersion
(
String
staffPhoneVersion
)
{
this
.
staffPhoneVersion
=
staffPhoneVersion
;
}
public
String
getStaffIp
()
{
return
staffIp
;
}
public
void
setStaffIp
(
String
staffIp
)
{
this
.
staffIp
=
staffIp
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/vo/TabStaffPrivacyUseLogVO.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 选项卡员工隐私使用日志签证官
*
* @author xuwenqian
* @date 2021/12/15 10:50
*/
public
class
TabStaffPrivacyUseLogVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7052985210668349045L
;
/**
* id
*/
private
Long
id
;
/**
* 员工id
*/
private
String
staffId
;
/**
* 微信企业id
*/
private
String
wxEnterpriseId
;
/**
* 是否同意隐私协议,1:是;0:否
*/
private
Integer
privacyUseFlag
;
/**
* 手机号
*/
private
String
phoneNumber
;
/**
* 好办版本
*/
private
String
welldoneVersion
;
/**
* 企微版本
*/
private
String
weworkVersion
;
/**
* 用户手机品牌
*/
private
String
staffPhoneBrand
;
/**
* 用户手机型号
*/
private
String
staffPhoneModel
;
/**
* 用户手机版本
*/
private
String
staffPhoneVersion
;
/**
* 登录ip
*/
private
String
staffIp
;
/**
* create_time
*/
private
Date
createTime
;
/**
* update_time
*/
private
Date
updateTime
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
Integer
getPrivacyUseFlag
()
{
return
privacyUseFlag
;
}
public
void
setPrivacyUseFlag
(
Integer
privacyUseFlag
)
{
this
.
privacyUseFlag
=
privacyUseFlag
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getWelldoneVersion
()
{
return
welldoneVersion
;
}
public
void
setWelldoneVersion
(
String
welldoneVersion
)
{
this
.
welldoneVersion
=
welldoneVersion
;
}
public
String
getWeworkVersion
()
{
return
weworkVersion
;
}
public
void
setWeworkVersion
(
String
weworkVersion
)
{
this
.
weworkVersion
=
weworkVersion
;
}
public
String
getStaffPhoneBrand
()
{
return
staffPhoneBrand
;
}
public
void
setStaffPhoneBrand
(
String
staffPhoneBrand
)
{
this
.
staffPhoneBrand
=
staffPhoneBrand
;
}
public
String
getStaffPhoneModel
()
{
return
staffPhoneModel
;
}
public
void
setStaffPhoneModel
(
String
staffPhoneModel
)
{
this
.
staffPhoneModel
=
staffPhoneModel
;
}
public
String
getStaffPhoneVersion
()
{
return
staffPhoneVersion
;
}
public
void
setStaffPhoneVersion
(
String
staffPhoneVersion
)
{
this
.
staffPhoneVersion
=
staffPhoneVersion
;
}
public
String
getStaffIp
()
{
return
staffIp
;
}
public
void
setStaffIp
(
String
staffIp
)
{
this
.
staffIp
=
staffIp
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/MiniprogramSettingService.java
View file @
a5b1f236
...
...
@@ -12,11 +12,11 @@ import java.util.List;
public
interface
MiniprogramSettingService
{
/**
*
保存素材
*
小程序保存
*
* @param miniprogramSetting
*/
public
void
saveMiniprogramSetting
(
TabMiniprogramSetting
miniprogramSetting
);
void
saveMiniprogramSetting
(
TabMiniprogramSetting
miniprogramSetting
);
/**
* 小程序列表
...
...
@@ -24,7 +24,7 @@ public interface MiniprogramSettingService {
* @param wxEnterpriseId
* @return
*/
public
List
<
TabMiniprogramSetting
>
listMiniprogram
(
String
wxEnterpriseId
);
List
<
TabMiniprogramSetting
>
listMiniprogram
(
String
wxEnterpriseId
);
/**
* 获取单个配置信息
...
...
@@ -33,7 +33,7 @@ public interface MiniprogramSettingService {
* @param enterpriseId
* @return
*/
public
TabMiniprogramSetting
getMiniprogramSetting
(
String
wxEnterpriseId
,
String
enterpriseId
);
TabMiniprogramSetting
getMiniprogramSetting
(
String
wxEnterpriseId
,
String
enterpriseId
);
/**
* 获取单个配置信息 无需操作企业微信media
...
...
@@ -42,7 +42,7 @@ public interface MiniprogramSettingService {
* @param enterpriseId
* @return
*/
public
TabMiniprogramSetting
getMiniprogramSettingNoMedia
(
String
wxEnterpriseId
,
String
enterpriseId
);
TabMiniprogramSetting
getMiniprogramSettingNoMedia
(
String
wxEnterpriseId
,
String
enterpriseId
);
/**
* 删除
...
...
@@ -50,7 +50,7 @@ public interface MiniprogramSettingService {
* @param id
* @return
*/
public
boolean
delMiniprogramSetting
(
String
id
);
boolean
delMiniprogramSetting
(
String
id
);
/**
* 获取单个配置信息
...
...
@@ -59,7 +59,7 @@ public interface MiniprogramSettingService {
* @param appId
* @return
*/
public
TabMiniprogramSetting
getMiniprogramSettingByAppId
(
String
wxEnterpriseId
,
String
appId
);
TabMiniprogramSetting
getMiniprogramSettingByAppId
(
String
wxEnterpriseId
,
String
appId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffPrivacyUseLogService.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
com.gic.haoban.manage.service.pojo.bo.StaffPrivacyUseLogBO
;
import
com.gic.haoban.manage.service.pojo.vo.TabStaffPrivacyUseLogVO
;
import
java.util.List
;
/**
* @author xuwenqian
* @date 2021/12/15 10:46
*/
public
interface
StaffPrivacyUseLogService
{
/**
* 新增
*
* @param staffPrivacyUseLogBO 选项卡员工隐私使用日志bo
* @return int
* @author mozhu
* @date 2021-12-15 10:51:51
*/
int
insert
(
StaffPrivacyUseLogBO
staffPrivacyUseLogBO
);
/**
* 更新
*
* @param staffPrivacyUseLogBO 选项卡员工隐私使用日志bo
* @return int
* @author mozhu
* @date 2021-12-15 10:51:53
*/
int
update
(
StaffPrivacyUseLogBO
staffPrivacyUseLogBO
);
/**
* 查询
*
* @param staffId 员工id
* @return {@link List<TabStaffPrivacyUseLogVO> }
* @author mozhu
* @date 2021-12-15 10:51:32
*/
StaffPrivacyUseLogBO
getByStaffId
(
String
staffId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffPrivacyUseLogServiceImpl.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.service.dao.mapper.StaffPrivacyUseLogMapper
;
import
com.gic.haoban.manage.service.entity.TabStaffPrivacyUseLog
;
import
com.gic.haoban.manage.service.pojo.bo.StaffPrivacyUseLogBO
;
import
com.gic.haoban.manage.service.service.StaffPrivacyUseLogService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
* @author xuwenqian
* @date 2021/12/15 10:46
*/
@Service
public
class
StaffPrivacyUseLogServiceImpl
implements
StaffPrivacyUseLogService
{
@Autowired
private
StaffPrivacyUseLogMapper
staffPrivacyUseLogMapper
;
@Override
public
int
insert
(
StaffPrivacyUseLogBO
staffPrivacyUseLogBO
)
{
TabStaffPrivacyUseLog
tabStaffPrivacyUseLog
=
new
TabStaffPrivacyUseLog
();
BeanUtils
.
copyProperties
(
staffPrivacyUseLogBO
,
tabStaffPrivacyUseLog
);
Date
date
=
new
Date
();
tabStaffPrivacyUseLog
.
setCreateTime
(
date
);
tabStaffPrivacyUseLog
.
setUpdateTime
(
date
);
return
staffPrivacyUseLogMapper
.
insert
(
tabStaffPrivacyUseLog
);
}
@Override
public
int
update
(
StaffPrivacyUseLogBO
staffPrivacyUseLogBO
)
{
TabStaffPrivacyUseLog
tabStaffPrivacyUseLog
=
new
TabStaffPrivacyUseLog
();
BeanUtils
.
copyProperties
(
staffPrivacyUseLogBO
,
tabStaffPrivacyUseLog
);
Date
date
=
new
Date
();
tabStaffPrivacyUseLog
.
setUpdateTime
(
date
);
return
staffPrivacyUseLogMapper
.
update
(
tabStaffPrivacyUseLog
);
}
@Override
public
StaffPrivacyUseLogBO
getByStaffId
(
String
staffId
)
{
TabStaffPrivacyUseLog
tabStaffPrivacyUseLog
=
staffPrivacyUseLogMapper
.
getByStaffId
(
staffId
);
return
EntityUtil
.
changeEntityByOrika
(
StaffPrivacyUseLogBO
.
class
,
tabStaffPrivacyUseLog
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
a5b1f236
...
...
@@ -6,7 +6,6 @@ import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -15,10 +14,9 @@ import java.util.List;
@Service
public
class
WxEnterpriseServiceImpl
implements
WxEnterpriseService
{
@Autowired
private
WxEnterpriseMapper
mapper
;
@Autowired
private
QywxUserApiService
qywxUserApiService
;
@Override
public
String
add
(
WxEnterpriseDTO
wxDTO
)
{
...
...
@@ -31,7 +29,6 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
tabHaobanWxEnterprise
.
setBindFlag
(
1
);
mapper
.
insertSelective
(
tabHaobanWxEnterprise
);
return
wxDTO
.
getWxEnterpriseId
();
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DictApiServiceImpl.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DictDTO
;
import
com.gic.haoban.manage.api.service.DictApiService
;
import
com.gic.haoban.manage.service.dao.mapper.DictMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDict
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -73,4 +71,9 @@ public class DictApiServiceImpl implements DictApiService{
List
<
TabHaobanDict
>
list
=
dictMapper
.
queryList
(
dictKeys
);
return
EntityUtil
.
changeEntityListByJSON
(
DictDTO
.
class
,
list
);
}
@Override
public
DictDTO
findOneDictByKey
(
String
dictKey
)
{
return
EntityUtil
.
changeEntity
(
DictDTO
.
class
,
dictMapper
.
selectByDictKey
(
dictKey
));
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
a5b1f236
...
...
@@ -46,17 +46,25 @@ import com.gic.member.api.service.MemberOpenCardBusinessService;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.dto.qywx.*
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalMessageBaseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxImageExternalBaseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxMiniprogramExternalBaseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxWelcomeMsgDTO
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.google.common.collect.Sets
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -483,6 +491,17 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
}
private
static
byte
[]
getFileByte
(
String
url
)
{
try
{
InputStream
in
=
new
URL
(
url
).
openStream
();
byte
[]
data
=
IOUtils
.
toByteArray
(
in
);
return
data
;
}
catch
(
Exception
e
)
{
log
.
info
(
"【异常】"
+
e
.
getMessage
(),
e
);
}
return
null
;
}
/**
* 发送欢迎语
*
...
...
@@ -493,35 +512,53 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private
void
sendWelcome
(
MemberUnionidRelatedDTO
dto
,
StaffClerkRelationDTO
staffClerkRelationDTO
,
boolean
sendApp
)
{
log
.
info
(
"发送欢迎语:{}"
,
JSONObject
.
toJSONString
(
staffClerkRelationDTO
));
String
relationKey
=
SecureUtil
.
md5
(
staffClerkRelationDTO
.
getClerkId
()
+
dto
.
getExternalUserid
());
TabWelcome
tabWelcome
=
welcomeMapper
.
selectByWxEnterpriseId
(
staffClerkRelationDTO
.
getWxEnterpriseId
());
String
wxEnterpriseId
=
staffClerkRelationDTO
.
getWxEnterpriseId
();
TabWelcome
tabWelcome
=
welcomeMapper
.
selectByWxEnterpriseId
(
wxEnterpriseId
);
if
(
null
==
tabWelcome
||
tabWelcome
.
getOpenFlag
()
==
0
)
{
log
.
info
(
"不用发送欢迎语:{},{}"
,
dto
.
getWxEnterpriseId
(),
JSONObject
.
toJSONString
(
tabWelcome
));
log
.
info
(
"欢迎语未配置:wxEnterpriseId:{}"
,
wxEnterpriseId
);
return
;
}
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
==
null
)
{
log
.
info
(
"微信企业不存在:wxEnterpriseId:{}"
,
wxEnterpriseId
);
return
;
}
String
externalName
=
dto
.
getExternalName
();
String
content
=
tabWelcome
.
getWelcomeContent
().
replaceAll
(
"<微信昵称>"
,
externalName
);
QywxWelcomeMsgDTO
qywxWelcomeMsgDTO
=
new
QywxWelcomeMsgDTO
();
qywxWelcomeMsgDTO
.
setText
(
tabWelcome
==
null
?
"欢迎您!"
:
content
);
//发送小
吃店哪个系
qywxWelcomeMsgDTO
.
setText
(
content
);
//发送小
程序
if
(
sendApp
)
{
QywxMiniprogramExternalBaseDTO
messageBaseDTO
=
new
QywxMiniprogramExternalBaseDTO
(
);
TabMiniprogramSetting
miniprogramSetting
=
miniprogramSettingService
.
getMiniprogramSetting
(
staffClerkRelationDTO
.
getWxEnterpriseId
()
,
staffClerkRelationDTO
.
getEnterpriseId
());
log
.
info
(
"发送小程序:{}"
,
wxEnterpriseId
);
TabMiniprogramSetting
miniprogramSetting
=
miniprogramSettingService
.
getMiniprogramSetting
(
wxEnterpriseId
,
staffClerkRelationDTO
.
getEnterpriseId
());
if
(
null
==
miniprogramSetting
)
{
log
.
info
(
"需要配置小程序配置:
{}"
,
staffClerkRelationDTO
.
getWxEnterpriseId
()
,
staffClerkRelationDTO
.
getEnterpriseId
());
log
.
info
(
"需要配置小程序配置:
wxEnterpriseId:{},enterpriseId:{}"
,
wxEnterpriseId
,
staffClerkRelationDTO
.
getEnterpriseId
());
return
;
}
List
<
QywxExternalMessageBaseDTO
>
attachments
=
new
ArrayList
<>();
QywxMiniprogramExternalBaseDTO
messageBaseDTO
=
new
QywxMiniprogramExternalBaseDTO
();
messageBaseDTO
.
setAppid
(
miniprogramSetting
.
getAppId
());
messageBaseDTO
.
setPicMediaId
(
miniprogramSetting
.
getMediaId
());
messageBaseDTO
.
setTitle
(
miniprogramSetting
.
getTitle
());
messageBaseDTO
.
setPage
(
config
.
getMemberOpenPage
()
+
relationKey
);
qywxWelcomeMsgDTO
.
setAttachments
(
new
ArrayList
<>());
qywxWelcomeMsgDTO
.
getAttachments
().
add
(
messageBaseDTO
);
attachments
.
add
(
messageBaseDTO
);
String
welcomeImg
=
tabWelcome
.
getWelcomeImg
();
if
(
StringUtils
.
isNotBlank
(
welcomeImg
))
{
String
[]
arr
=
welcomeImg
.
split
(
"/"
);
int
count
=
arr
.
length
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
getFileByte
(
welcomeImg
),
arr
[
count
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
());
log
.
info
(
"欢迎语发送图片返回:{}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
==
0
)
{
QywxImageExternalBaseDTO
qywxImageExternalBaseDTO
=
new
QywxImageExternalBaseDTO
();
qywxImageExternalBaseDTO
.
setMediaId
(
jp
.
getResult
().
toString
());
attachments
.
add
(
qywxImageExternalBaseDTO
);
}
}
qywxWelcomeMsgDTO
.
setAttachments
(
attachments
);
}
qywxWelcomeMsgDTO
.
setWelcomeCode
(
dto
.
getWelcomeCode
());
if
(
dto
.
getSuiteid
().
equals
(
SELF_APP
))
{
//好办助手和代开发
SecretSettingDTO
secretSetting
=
secretSettingService
.
getSecretSetting
(
dto
.
getWxEnterpriseId
(),
SecretTypeEnum
.
HAOBAN_HELP
.
getVal
());
qywxUserApiService
.
sendSelfWelcomeMsgByExternal
(
dto
.
getCorpid
(),
secretSetting
.
getSecretVal
(),
qywxWelcomeMsgDTO
);
}
else
{
...
...
@@ -1053,52 +1090,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return
PageUtil
.
changePageHelperToCurrentPage
(
memberUnionRelatedService
.
pageMemberUnionByParams
(
userIdList
,
sendMemberIds
,
enterpriseId
),
MemberUnionidRelatedDTO
.
class
);
}
// @Override
// public String sendMessage(String wxEnterpriseId,String userId,List<String> extendUserList,String materialId){
// WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId);
// MaterialDTO material = materialApiService.selectMaterialById(materialId);
// if(material == null){
// return "";
// }
// JSONResponse jp = null;
// if(material.getMaterialType() == 2 || material.getMaterialType() == 4 || material.getMaterialType() == 5){
// Date wxLastTime = material.getWxLastUploadTime();
// String maerialId = material.getMediaId();
// if(DateUtil.addDay(wxLastTime, 3).getTime() < System.currentTimeMillis()){
// maerialId = materialApiService.reUpdalodMetail(materialId);
// }
// QywxImageExternalMessageDTO dto = new QywxImageExternalMessageDTO();
// dto.setMediaId(maerialId);
// dto.setChatType("single");
// dto.setExternalUserid(extendUserList);
// dto.setSenderUserId(userId);
// log.info("【发送消息】dto = {}",JSON.toJSONString(dto));
// jp = qywxSuiteApiService.sendExternalMessage(enterprise.getCorpid(), config.getWxSuiteid(), dto);
// }else if(material.getMaterialType() == 1){
// QywxTextExternalMessageDTO dto = new QywxTextExternalMessageDTO();
// dto.setChatType("single");
// dto.setExternalUserid(extendUserList);
// dto.setSenderUserId(userId);
// dto.setText(material.getMaterialContent());
// log.info("【发送消息】dto = {}",JSON.toJSONString(dto));
// jp = qywxSuiteApiService.sendExternalMessage(enterprise.getCorpid(), config.getWxSuiteid(), dto);
// }else if(material.getMaterialType() == 3){
// QywxIinkExternalMessageDTO dto = new QywxIinkExternalMessageDTO();
// dto.setChatType("single");
// dto.setExternalUserid(extendUserList);
// dto.setSenderUserId(userId);
// dto.setDesc(material.getMaterialDesc());
// dto.setPicurl(material.getWxImgUrl());
// dto.setTitle(material.getMaterialTitle());
// dto.setUrl(material.getLink());
// log.info("【发送消息】dto = {}",JSON.toJSONString(dto));
// jp = qywxSuiteApiService.sendExternalMessage(enterprise.getCorpid(), config.getWxSuiteid(), dto);
// }
// log.info("【发送消息】jp = {}",JSON.toJSONString(jp));
// Map<String,Object> returnMap = jp.getReturnMap();
// return returnMap.get("msgid") == null?"":returnMap.get("msgid").toString();
// }
/**
* 老的单个素材群发的api
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MiniprogramSettingServiceImpl.java
View file @
a5b1f236
...
...
@@ -9,7 +9,6 @@ import com.gic.haoban.manage.service.entity.TabMiniprogramSetting;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -78,7 +77,6 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
}
String
[]
arr
=
miniprogramSetting
.
getImageUrl
().
split
(
"/"
);
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
Date
createTme
=
miniprogramSetting
.
getCreateTime
();
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
CommonUtil
.
getFileByte
(
miniprogramSetting
.
getImageUrl
()),
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
());
if
(
jp
.
getErrorCode
()
==
0
)
{
miniprogramSetting
.
setMediaTime
(
date
);
...
...
@@ -94,9 +92,6 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
@Override
public
TabMiniprogramSetting
getMiniprogramSettingNoMedia
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
TabMiniprogramSetting
miniprogramSetting
=
tabMiniprogramSettingMapper
.
getMiniprogramSetting
(
wxEnterpriseId
,
enterpriseId
);
if
(
miniprogramSetting
==
null
)
{
return
null
;
}
return
miniprogramSetting
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
a5b1f236
...
...
@@ -25,7 +25,6 @@ import com.gic.haoban.manage.api.dto.*;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
...
...
@@ -86,8 +85,7 @@ public class StaffApiServiceImpl implements StaffApiService {
private
StoreGroupService
storeGroupService
;
@Autowired
private
UserLoginLogService
userLoginLogService
;
@Autowired
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
@Autowired
private
SyncErrorLogService
syncErrorLogService
;
...
...
@@ -99,6 +97,8 @@ public class StaffApiServiceImpl implements StaffApiService {
@Autowired
private
SecretSettingService
secretSettingService
;
@Autowired
private
StaffPrivacyUseLogService
staffPrivacyUseLogService
;
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
...
...
@@ -1470,19 +1470,9 @@ public class StaffApiServiceImpl implements StaffApiService {
return
staffDTO
;
}
// private String getMobile(String phoneNumber,String nationcode){
// String mobile = nationcode + phoneNumber;
// return mobile;
// }
//
// private String getNationcode(String mobile){
// String nationcode = "";
// return nationcode;
// }
//
// private String getPhoneNumber(String mobile){
// String phoneNumber = "";
// return phoneNumber;
// }
@Override
public
StaffPrivacyUseLogDTO
getStaffPrivacyByStaffId
(
String
staffId
)
{
return
EntityUtil
.
changeEntity
(
StaffPrivacyUseLogDTO
.
class
,
staffPrivacyUseLogService
.
getByStaffId
(
staffId
));
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
a5b1f236
...
...
@@ -23,7 +23,7 @@ import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.wechat.api.dto.qywx.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.
welcome.
QywxExternalcontactDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -175,7 +175,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
infoDTO
.
setStoreName
(
nameMap
.
get
(
infoDTO
.
getStoreId
()));
if
((
nameMap
.
get
(
infoDTO
.
getEnterpriseId
()))
!=
null
)
{
String
EnterpriseandBrandName
=
nameMap
.
get
(
infoDTO
.
getEnterpriseId
());
String
split
[]
=
EnterpriseandBrandName
.
split
(
"_"
);
String
[]
split
=
EnterpriseandBrandName
.
split
(
"_"
);
infoDTO
.
setEnterpriseName
(
split
[
0
]);
if
(
split
[
1
]
!=
null
)
{
infoDTO
.
setBrandName
(
split
[
1
]);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
a5b1f236
...
...
@@ -17,15 +17,14 @@ import com.gic.haoban.manage.service.entity.TabHaobanWxApplication;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabMiniprogramSetting
;
import
com.gic.haoban.manage.service.entity.TabWelcome
;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.SecretSettingService
;
import
com.gic.haoban.manage.service.service.WxApplicationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.pojo.bo.StaffPrivacyUseLogBO
;
import
com.gic.haoban.manage.service.service.*
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -52,6 +51,8 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
private
MiniprogramSettingService
miniprogramSettingService
;
@Autowired
private
TabHaobanWelcomeMapper
welcomeMapper
;
@Autowired
private
StaffPrivacyUseLogService
staffPrivacyUseLogService
;
@Override
public
void
callbackReviceEnterprise
(
QywxCorpInfoSimpleDTO
dto
)
{
...
...
@@ -68,7 +69,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
String
wxEnterpriseId
=
""
;
//授权好办小程序
if
(
isCustomizedApp
==
null
||
isCustomizedApp
!=
1
)
{
//只需要插入好办小程序企业
//只需要插入好办小程序企业
,代开发 企业表不插入
TabHaobanWxEnterprise
enterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpIdNoStatus
(
corpid
);
if
(
enterprise
!=
null
)
{
wxEnterpriseId
=
enterprise
.
getWxEnterpriseId
();
...
...
@@ -233,6 +234,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
tabWelcome
=
new
TabWelcome
();
tabWelcome
.
setTitle
(
dto
.
getTitle
());
tabWelcome
.
setWelcomeContent
(
dto
.
getWelcomeContent
());
tabWelcome
.
setWelcomeImg
(
dto
.
getWelcomeImg
());
tabWelcome
.
setCreateTime
(
new
Date
());
tabWelcome
.
setUpdateTime
(
new
Date
());
tabWelcome
.
setStatusFlag
(
1
);
...
...
@@ -243,6 +245,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
}
else
{
tabWelcome
.
setTitle
(
dto
.
getTitle
());
tabWelcome
.
setWelcomeContent
(
dto
.
getWelcomeContent
());
tabWelcome
.
setWelcomeImg
(
dto
.
getWelcomeImg
());
tabWelcome
.
setUpdateTime
(
new
Date
());
tabWelcome
.
setOpenFlag
(
dto
.
getOpenFlag
());
welcomeMapper
.
updateByPrimaryKeySelective
(
tabWelcome
);
...
...
@@ -295,4 +298,15 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
wxEnterpriseService
.
update
(
wxEnterpriseDTO
);
}
@Override
public
void
wellDoneLogin
(
StaffLoginDTO
staffLoginDTO
)
{
//插入隐私协议
StaffPrivacyUseLogBO
staffPrivacyUseLogBO
=
new
StaffPrivacyUseLogBO
();
BeanUtils
.
copyProperties
(
staffLoginDTO
,
staffPrivacyUseLogBO
);
StaffPrivacyUseLogBO
privacyUseLog
=
staffPrivacyUseLogService
.
getByStaffId
(
staffLoginDTO
.
getStaffId
());
if
(
privacyUseLog
==
null
)
{
staffPrivacyUseLogService
.
insert
(
staffPrivacyUseLogBO
);
}
}
}
haoban-manage3-service/src/main/resources/mapper/DictMapper.xml
View file @
a5b1f236
...
...
@@ -140,13 +140,13 @@
<include
refid=
"Base_Column_List"
/>
from tab_haoban_dict
where dict_key = #{dictKey,jdbcType=VARCHAR}
and status_flag =
1
and status_flag = 1 limit
1
</select>
<select
id=
"selectByDictName"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByDictName"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_dict
where dict_name = #{dictName,jdbcType=VARCHAR}
and status_flag =
1
and status_flag = 1 limit
1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/StaffPrivacyUseLogMapper.xml
0 → 100644
View file @
a5b1f236
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.StaffPrivacyUseLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabStaffPrivacyUseLog"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"staff_id"
property=
"staffId"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
/>
<result
column=
"privacy_use_flag"
property=
"privacyUseFlag"
/>
<result
column=
"phone_number"
property=
"phoneNumber"
/>
<result
column=
"welldone_version"
property=
"welldoneVersion"
/>
<result
column=
"wework_version"
property=
"weworkVersion"
/>
<result
column=
"staff_phone_brand"
property=
"staffPhoneBrand"
/>
<result
column=
"staff_phone_model"
property=
"staffPhoneModel"
/>
<result
column=
"staff_phone_version"
property=
"staffPhoneVersion"
/>
<result
column=
"staff_ip"
property=
"staffIp"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
staff_id,
wx_enterprise_id,
privacy_use_flag,
phone_number,
welldone_version,
wework_version,
staff_phone_brand,
staff_phone_model,
staff_phone_version,
staff_ip,
create_time,
update_time
</sql>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.gic.haoban.manage.service.entity.TabStaffPrivacyUseLog"
>
INSERT INTO tab_staff_privacy_use_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"null != staffId and '' != staffId"
>
staff_id,
</if>
<if
test=
"null != wxEnterpriseId and '' != wxEnterpriseId"
>
wx_enterprise_id,
</if>
<if
test=
"null != privacyUseFlag"
>
privacy_use_flag,
</if>
<if
test=
"null != phoneNumber and '' != phoneNumber"
>
phone_number,
</if>
<if
test=
"null != welldoneVersion and '' != welldoneVersion"
>
welldone_version,
</if>
<if
test=
"null != weworkVersion and '' != weworkVersion"
>
wework_version,
</if>
<if
test=
"null != staffPhoneBrand and '' != staffPhoneBrand"
>
staff_phone_brand,
</if>
<if
test=
"null != staffPhoneModel and '' != staffPhoneModel"
>
staff_phone_model,
</if>
<if
test=
"null != staffPhoneVersion and '' != staffPhoneVersion"
>
staff_phone_version,
</if>
<if
test=
"null != staffIp and '' != staffIp"
>
staff_ip,
</if>
<if
test=
"null != createTime"
>
create_time,
</if>
<if
test=
"null != updateTime"
>
update_time
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"null != staffId and '' != staffId"
>
#{staffId},
</if>
<if
test=
"null != wxEnterpriseId and '' != wxEnterpriseId"
>
#{wxEnterpriseId},
</if>
<if
test=
"null != privacyUseFlag"
>
#{privacyUseFlag},
</if>
<if
test=
"null != phoneNumber and '' != phoneNumber"
>
#{phoneNumber},
</if>
<if
test=
"null != welldoneVersion and '' != welldoneVersion"
>
#{welldoneVersion},
</if>
<if
test=
"null != weworkVersion and '' != weworkVersion"
>
#{weworkVersion},
</if>
<if
test=
"null != staffPhoneBrand and '' != staffPhoneBrand"
>
#{staffPhoneBrand},
</if>
<if
test=
"null != staffPhoneModel and '' != staffPhoneModel"
>
#{staffPhoneModel},
</if>
<if
test=
"null != staffPhoneVersion and '' != staffPhoneVersion"
>
#{staffPhoneVersion},
</if>
<if
test=
"null != staffIp and '' != staffIp"
>
#{staffIp},
</if>
<if
test=
"null != createTime"
>
#{createTime},
</if>
<if
test=
"null != updateTime"
>
#{updateTime}
</if>
</trim>
</insert>
<update
id=
"update"
parameterType=
"com.gic.haoban.manage.service.entity.TabStaffPrivacyUseLog"
>
UPDATE tab_staff_privacy_use_log
<set>
<if
test=
"null != staffId and '' != staffId"
>
staff_id = #{staffId},
</if>
<if
test=
"null != wxEnterpriseId and '' != wxEnterpriseId"
>
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if
test=
"null != privacyUseFlag"
>
privacy_use_flag = #{privacyUseFlag},
</if>
<if
test=
"null != phoneNumber and '' != phoneNumber"
>
phone_number = #{phoneNumber},
</if>
<if
test=
"null != welldoneVersion and '' != welldoneVersion"
>
welldone_version = #{welldoneVersion},
</if>
<if
test=
"null != weworkVersion and '' != weworkVersion"
>
wework_version = #{weworkVersion},
</if>
<if
test=
"null != staffPhoneBrand and '' != staffPhoneBrand"
>
staff_phone_brand = #{staffPhoneBrand},
</if>
<if
test=
"null != staffPhoneModel and '' != staffPhoneModel"
>
staff_phone_model = #{staffPhoneModel},
</if>
<if
test=
"null != staffPhoneVersion and '' != staffPhoneVersion"
>
staff_phone_version =
#{staffPhoneVersion},
</if>
<if
test=
"null != staffIp and '' != staffIp"
>
staff_ip = #{staffIp},
</if>
<if
test=
"null != createTime"
>
create_time = #{createTime},
</if>
<if
test=
"null != updateTime"
>
update_time = #{updateTime}
</if>
</set>
WHERE id = #{id}
</update>
<select
id=
"getByStaffId"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM tab_staff_privacy_use_log
WHERE staff_id = #{staffId} order by create_time desc limit 1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanWelcomeMapper.xml
View file @
a5b1f236
...
...
@@ -35,7 +35,7 @@
welcome_content, welcome_img, open_flag, status_flag, create_time,
update_time)
values (#{welcomeId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{welcomeContent,jdbcType=VARCHAR}, #{welcomeImg
,jdbcType=VARCHAR
}, #{openFlag},
#{welcomeContent,jdbcType=VARCHAR}, #{welcomeImg}, #{openFlag},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/auth/AuthRequestUtil.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
auth
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -30,14 +29,6 @@ public class AuthRequestUtil {
public
static
final
String
REDIS_FAKE_LOGIN_FLAG_PREFIX
=
"GIC:HAOBAN:HAOBAN_MOBILE_APP:FAKE_LOGIN_TOKEN:"
;
public
static
String
LOGIN_SESSION_KEY
=
"HAOBAN:LOGINUSER"
;
// public static LoginDTO getSessionUser() {
// String json = (String) getSession().getAttribute(LOGIN_SESSION_KEY);
// if (StringUtils.isBlank(json)){
// return null;
// }
// return JSON.parseObject(json, LoginDTO.class);
// }
public
static
void
setSessionUser
(
Object
obj
)
{
String
userJson
=
JSON
.
toJSONString
(
obj
);
getSession
().
setAttribute
(
LOGIN_SESSION_KEY
,
userJson
);
...
...
@@ -48,7 +39,7 @@ public class AuthRequestUtil {
}
public
static
Object
getAppLoginUser
(
String
token
)
{
logger
.
info
(
"token
1111111111
="
+
token
);
logger
.
info
(
"token
-web
="
+
token
);
if
(
StringUtils
.
isBlank
(
token
))
{
return
null
;
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
a5b1f236
...
...
@@ -98,7 +98,7 @@ public class LoginController extends WebBaseController {
}
LoginDTO
loginVO
=
new
LoginDTO
();
logger
.
info
(
"【好办登录】staff={}"
,
JSON
.
toJSONString
(
loginStaff
));
logger
.
info
(
"【好办
web
登录】staff={}"
,
JSON
.
toJSONString
(
loginStaff
));
if
(
loginStaff
==
null
)
{
return
;
}
...
...
@@ -124,7 +124,6 @@ public class LoginController extends WebBaseController {
@RequestMapping
(
"login_local"
)
@Deprecated
public
HaobanResponse
login
()
{
LoginDTO
loginVO
=
new
LoginDTO
();
StaffDTO
staff
=
staffApiService
.
selectById
(
"2205f92cdb5f468cb996e91dded414c2"
);
String
token
=
ToolUtil
.
randomUUID
()
+
"-"
+
ToolUtil
.
randomStringByTime
();
...
...
@@ -271,14 +270,14 @@ public class LoginController extends WebBaseController {
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
}
LoginDTO
loginVO
=
new
LoginDTO
();
loginVO
.
setWxEnterpriseId
(
detailDTO
.
getWxEnterpriseId
());
loginVO
.
setStaffDTO
(
staff
);
AuthRequestUtil
.
setSessionUser
(
loginVO
);
LoginDTO
loginDTO
=
new
LoginDTO
();
loginDTO
.
setWxEnterpriseId
(
detailDTO
.
getWxEnterpriseId
());
loginDTO
.
setStaffDTO
(
staff
);
String
redirectUri
=
config
.
getHost
()
+
"index"
;
redirectUri
=
redirectUri
.
replace
(
"haoban-manage3-web"
,
"haoban-3/#"
);
String
token
=
ToolUtil
.
randomUUID
()
+
"-"
+
ToolUtil
.
randomStringByTime
();
AuthRequestUtil
.
setAppLoginUser
(
token
,
loginVO
);
AuthRequestUtil
.
setSessionUser
(
loginDTO
);
AuthRequestUtil
.
setAppLoginUser
(
token
,
loginDTO
);
try
{
Cookie
cookie
=
new
Cookie
(
"token"
,
token
);
cookie
.
setPath
(
"/"
);
...
...
@@ -286,7 +285,6 @@ public class LoginController extends WebBaseController {
response
.
sendRedirect
(
redirectUri
);
response
.
setHeader
(
"token"
,
token
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
null
;
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
a5b1f236
...
...
@@ -651,7 +651,7 @@ public class WxEnterpriseController extends WebBaseController {
}
/**
*
绑定
小程序配置列表
*
保存
小程序配置列表
*
* @return
*/
...
...
@@ -675,7 +675,7 @@ public class WxEnterpriseController extends WebBaseController {
}
/**
*
绑定小程序配置列表
*
获取小程序配置
*
* @return
*/
...
...
@@ -692,7 +692,7 @@ public class WxEnterpriseController extends WebBaseController {
}
/**
*
绑定小程序配置列表
*
删除小程序配置
*
* @return
*/
...
...
@@ -745,13 +745,13 @@ public class WxEnterpriseController extends WebBaseController {
}
/**
*
绑定小程序配置列表
*
保存欢迎语
*
* @return
*/
@IgnoreLogin
@RequestMapping
(
"save-welcome"
)
public
HaobanResponse
savewelcome
(
String
title
,
String
welcomeContent
)
{
public
HaobanResponse
savewelcome
(
String
title
,
String
welcomeContent
,
String
welcomeImg
)
{
LoginDTO
loginUser
=
this
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
if
(
StringUtils
.
isAnyBlank
(
title
,
welcomeContent
))
{
...
...
@@ -760,13 +760,14 @@ public class WxEnterpriseController extends WebBaseController {
WelcomeDTO
welcomeDTO
=
new
WelcomeDTO
();
welcomeDTO
.
setTitle
(
title
);
welcomeDTO
.
setWelcomeContent
(
welcomeContent
);
welcomeDTO
.
setWelcomeImg
(
welcomeImg
);
welcomeDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
wxEnterpriseApiService
.
saveWelcome
(
welcomeDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
*
绑定小程序配置
列表
*
欢迎语
列表
*
* @return
*/
...
...
@@ -780,7 +781,7 @@ public class WxEnterpriseController extends WebBaseController {
}
/**
*
绑定小程序配置列表
*
删除欢迎语
*
* @return
*/
...
...
@@ -794,7 +795,7 @@ public class WxEnterpriseController extends WebBaseController {
}
/**
*
绑定小程序配置列表
*
欢迎语开启关闭
*
* @return
*/
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/exception/GlobalExceptionHandler.java
View file @
a5b1f236
...
...
@@ -6,6 +6,10 @@ import com.gic.haoban.manage.web.controller.WebBaseController;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.validation.BindException
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.FieldError
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -23,17 +27,22 @@ import java.util.regex.Pattern;
*/
@ControllerAdvice
public
class
GlobalExceptionHandler
extends
WebBaseController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
GlobalExceptionHandler
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
GlobalExceptionHandler
.
class
);
private
static
final
Pattern
pattern
=
Pattern
.
compile
(
"(.*: )(.*)(\\n.*)"
);
/**
* 控制器运行异常
*
* @param response 响应
* @param ex 前女友
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:50
*/
@ResponseBody
@ExceptionHandler
(
RuntimeException
.
class
)
public
HaobanResponse
ControllerException
(
HttpServletResponse
response
,
RuntimeException
ex
)
{
logger
.
info
(
"exceoprion:{}"
,
ex
.
getStackTrace
());
ex
.
printStackTrace
();
public
HaobanResponse
controllerRunException
(
HttpServletResponse
response
,
RuntimeException
ex
)
{
logger
.
error
(
"controllerRunException:{}"
,
ex
.
getMessage
(),
ex
);
HaobanResponse
res
=
new
HaobanResponse
();
res
.
setErrorCode
(
HaoBanErrCode
.
ERR_3
.
getCode
());
String
message
=
ex
.
getMessage
();
...
...
@@ -45,16 +54,23 @@ public class GlobalExceptionHandler extends WebBaseController {
}
else
{
message
=
HaoBanErrCode
.
ERR_3
.
getMsg
();
}
res
.
setMessage
(
"系统异常"
);
res
.
setMessage
(
message
);
return
res
;
}
/**
* 全局异常
*
* @param response 响应
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:54:25
*/
@ResponseBody
@ExceptionHandler
(
Exception
.
class
)
public
HaobanResponse
ControllerException
(
HttpServletResponse
response
,
Exception
ex
)
{
logger
.
error
(
"err"
);
ex
.
printStackTrace
();
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_3
;
public
HaobanResponse
controllerException
(
HttpServletResponse
response
,
Exception
ex
)
{
logger
.
error
(
"controllerException:{}"
,
ex
.
getMessage
(),
ex
);
StringBuilder
sb
=
new
StringBuilder
();
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
();
try
(
PrintWriter
printWriter
=
new
PrintWriter
(
baos
))
{
...
...
@@ -67,16 +83,59 @@ public class GlobalExceptionHandler extends WebBaseController {
if
(
sb
.
length
()
==
0
)
{
sb
.
append
(
ex
.
getMessage
());
}
// 输出详细错误信息,便于调试
// return resultResponse(errCode, null, sb.toString());
return
resultResponse
(
HaoBanErrCode
.
ERR_3
);
}
/**
* valid 异常告警
*
* @param response
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:40
*/
@ResponseBody
@ExceptionHandler
(
BindException
.
class
)
public
HaobanResponse
bindException
(
HttpServletResponse
response
,
BindException
ex
)
{
logger
.
error
(
"bindException:{}"
,
ex
.
getMessage
());
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_5
;
BindingResult
bindingResult
=
ex
.
getBindingResult
();
FieldError
fieldError
=
bindingResult
.
getFieldError
();
return
resultResponse
(
errCode
,
null
,
fieldError
.
getField
()
+
fieldError
.
getDefaultMessage
());
}
/**
* valid 异常告警 @ReuqestBody
*
* @param response
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:35
*/
@ResponseBody
@ExceptionHandler
(
MethodArgumentNotValidException
.
class
)
public
HaobanResponse
methodArgumentNotValidException
(
HttpServletResponse
response
,
MethodArgumentNotValidException
ex
)
{
logger
.
error
(
"methodArgumentNotValidException:{}"
,
ex
.
getMessage
());
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_5
;
BindingResult
bindingResult
=
ex
.
getBindingResult
();
FieldError
fieldError
=
bindingResult
.
getFieldError
();
return
resultResponse
(
errCode
,
null
,
fieldError
.
getField
()
+
fieldError
.
getDefaultMessage
());
}
/**
* 登录异常
*
* @param response 响应
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:16
*/
@ResponseBody
@ExceptionHandler
(
NoLoginException
.
class
)
public
HaobanResponse
Controller
Exception
(
HttpServletResponse
response
,
NoLoginException
ex
)
{
public
HaobanResponse
controllerNoLogin
Exception
(
HttpServletResponse
response
,
NoLoginException
ex
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_4
);
}
...
...
haoban-manage3-wx/pom.xml
View file @
a5b1f236
...
...
@@ -83,7 +83,6 @@
<artifactId>
spring-beans
</artifactId>
<groupId>
org.springframework
</groupId>
</exclusion>
<exclusion>
<artifactId>
slf4j-api
</artifactId>
<groupId>
org.slf4j
</groupId>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/anno/HttpLimit.java
deleted
100644 → 0
View file @
030e1f53
package
com
.
gic
.
haoban
.
manage
.
web
.
anno
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
java.util.concurrent.TimeUnit
;
/**
* 访问限制
* 默认1秒
* @author hzw
*
*/
@Target
({
ElementType
.
METHOD
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
HttpLimit
{
long
time
()
default
1L
;
TimeUnit
unit
()
default
TimeUnit
.
SECONDS
;
int
times
()
default
2
;
}
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/anno/IgnoreLogin.java
deleted
100644 → 0
View file @
030e1f53
package
com
.
gic
.
haoban
.
manage
.
web
.
anno
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
({
ElementType
.
METHOD
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
IgnoreLogin
{
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
a5b1f236
...
...
@@ -9,6 +9,7 @@ import com.gic.clerk.api.service.ClerkService;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi
;
...
...
@@ -22,7 +23,6 @@ import com.gic.haoban.manage.api.service.AuditApiService;
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.web.anno.HttpLimit
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.AuditVO
;
import
com.gic.haoban.manage.web.vo.StaffClerkBindLogDetailVO
;
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
a5b1f236
...
...
@@ -17,6 +17,8 @@ import com.gic.enterprise.api.service.StoreService;
import
com.gic.haoban.app.customer.service.api.service.DistributeApiService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.GooglePhoneNumberUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
...
...
@@ -24,7 +26,6 @@ import com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.*
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.web.anno.HttpLimit
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.*
;
import
com.gic.redis.data.util.RedisUtil
;
...
...
@@ -41,8 +42,8 @@ import java.util.*;
import
java.util.stream.Collectors
;
@RestController
public
class
ClerkController
extends
WebBaseController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ClerkController
.
class
);
public
class
ClerkController
extends
WebBaseController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ClerkController
.
class
);
@Autowired
private
ClerkService
clerkService
;
...
...
@@ -53,18 +54,12 @@ public class ClerkController extends WebBaseController{
@Autowired
private
StoreService
storeService
;
@Autowired
private
DepartmentApiService
departmentApiService
;
@Autowired
private
BindApiService
bindApiService
;
@Autowired
private
SyncHaobanToGicServiceApi
syncHaobanToGicServiceApi
;
@Autowired
private
ClerkMainStoreRelatedApiService
clerkMainStoreRelatedApiService
;
@Autowired
private
DistributeApiService
distributeApiService
;
@Autowired
private
MemberUnionidRelatedApiService
memberUnionidRelatedApiService
;
@Autowired
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
@Autowired
private
EnterpriseService
enterpriseService
;
...
...
@@ -620,13 +615,10 @@ public class ClerkController extends WebBaseController{
public
boolean
isEnterpriseOver
(
String
eid
)
{
EnterpriseDTO
enterprise
=
enterpriseService
.
getEnterpriseByEid
(
eid
);
if
(
enterprise
==
null
||
enterprise
.
getExpireTime
()
==
null
){
return
false
;
}
if
(
enterprise
.
getExpireTime
().
getTime
()
>
System
.
currentTimeMillis
()){
if
(
enterprise
==
null
||
enterprise
.
getExpireTime
()
==
null
)
{
return
false
;
}
return
true
;
return
enterprise
.
getExpireTime
().
getTime
()
<=
System
.
currentTimeMillis
()
;
}
...
...
@@ -922,15 +914,15 @@ public class ClerkController extends WebBaseController{
List
<
BindClerkVO
>
unBindList
=
new
ArrayList
<>();
for
(
ClerkListDTO
clerkListDTO
:
list
)
{
BindClerkVO
vo
=
EntityUtil
.
changeEntityByJSON
(
BindClerkVO
.
class
,
clerkListDTO
);
if
(
bindCodeMap
.
keySet
().
contains
(
clerkListDTO
.
getClerkCode
()))
{
if
(
bindCodeMap
.
containsKey
(
clerkListDTO
.
getClerkCode
()))
{
String
staffId
=
bindCodeMap
.
get
(
clerkListDTO
.
getClerkCode
()).
getStaffId
();
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffId
);
vo
.
setStaffId
(
staffId
);
vo
.
setNationCode
(
clerkListDTO
.
getNationcode
());
vo
.
setPhoneNumber
(
clerkListDTO
.
getPhoneNumber
());
vo
.
setStaffName
(
staffDTO
==
null
?
""
:
staffDTO
.
getStaffName
());
vo
.
setStaffName
(
staffDTO
==
null
?
""
:
staffDTO
.
getStaffName
());
bindList
.
add
(
vo
);
}
else
{
}
else
{
unBindList
.
add
(
vo
);
}
}
...
...
@@ -990,13 +982,13 @@ public class ClerkController extends WebBaseController{
@RequestMapping
(
"/fresh-clerk-info"
)
public
HaobanResponse
freshClerkInfo
(
String
clerkId
,
String
wxEnterpriseId
)
{
StaffClerkRelationDTO
staffRelation
=
staffClerkRelationApiService
.
getByClerkId
(
clerkId
);
if
(
staffRelation
==
null
)
{
if
(
staffRelation
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
staffApiService
.
wxGetAdd
(
staffRelation
.
getWxUserId
(),
wxEnterpriseId
);
;
staffApiService
.
wxGetAdd
(
staffRelation
.
getWxUserId
(),
wxEnterpriseId
);
String
staffId
=
staffRelation
.
getStaffId
();
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
if
(
staff
==
null
)
{
if
(
staff
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
String
headPic
=
staff
.
getHeadImg
();
...
...
@@ -1005,17 +997,17 @@ public class ClerkController extends WebBaseController{
Integer
sex
=
staff
.
getSex
();
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerk
==
null
)
{
if
(
clerk
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
if
(
StringUtils
.
isNotBlank
(
headPic
))
{
if
(
StringUtils
.
isNotBlank
(
headPic
))
{
clerk
.
setHeadImgUrl
(
headPic
);
clerk
.
setImageUrl
(
headPic
);
}
if
(
StringUtils
.
isNotBlank
(
phoneNumber
))
{
if
(
StringUtils
.
isNotBlank
(
phoneNumber
))
{
List
<
ClerkListDTO
>
list
=
clerkService
.
getClerkByStoreId
(
clerk
.
getEnterpriseId
(),
clerk
.
getStoreId
());
for
(
ClerkListDTO
clerkListDTO
:
list
)
{
if
(
clerkListDTO
.
getPhoneNumber
().
equals
(
phoneNumber
)
&&
!
clerkListDTO
.
getClerkId
().
equals
(
clerkId
))
{
if
(
clerkListDTO
.
getPhoneNumber
().
equals
(
phoneNumber
)
&&
!
clerkListDTO
.
getClerkId
().
equals
(
clerkId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_11122
);
}
}
...
...
@@ -1129,6 +1121,7 @@ public class ClerkController extends WebBaseController{
* @return
*/
@RequestMapping
(
"push-friend"
)
@IgnoreLogin
public
HaobanResponse
friendList
(
String
relationKey
)
{
externalClerkRelatedApiService
.
pushExternalByRelationKey
(
relationKey
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/DictController.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DictDTO
;
...
...
@@ -8,9 +9,8 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import
com.gic.haoban.manage.web.vo.DictVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.Res
ponseBody
;
import
org.springframework.web.bind.annotation.Res
tController
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -20,14 +20,13 @@ import java.util.List;
*
* @author hua
*/
@Controller
@
Rest
Controller
public
class
DictController
extends
WebBaseController
{
@Autowired
private
DictApiService
dictApiService
;
@RequestMapping
(
"/dict-list"
)
@ResponseBody
public
HaobanResponse
queryDictList
(
String
dictKeys
)
{
if
(
StringUtils
.
isBlank
(
dictKeys
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_5
);
...
...
@@ -36,4 +35,19 @@ public class DictController extends WebBaseController {
List
<
DictDTO
>
ret
=
dictApiService
.
queryList
(
Arrays
.
asList
(
split
));
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
EntityUtil
.
changeEntityListByOrika
(
DictVo
.
class
,
ret
));
}
/**
* 根据key查询一条数据
*
* @param dictKey
* @return
*/
@RequestMapping
(
"/find-dict-key"
)
@IgnoreLogin
public
HaobanResponse
queryDictByKey
(
String
dictKey
)
{
if
(
StringUtils
.
isBlank
(
dictKey
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_5
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
dictApiService
.
findOneDictByKey
(
dictKey
));
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/MaidianLogController.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.MaidianLogDTO
;
import
com.gic.haoban.manage.api.service.MaidianLogApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
@RestController
public
class
MaidianLogController
extends
WebBaseController
{
...
...
@@ -27,6 +27,7 @@ public class MaidianLogController extends WebBaseController{
private
StoreService
storeService
;
@RequestMapping
(
"save-maidian-log"
)
@IgnoreLogin
public
HaobanResponse
saveUserLoginLog
(
String
maidianLogStr
)
{
if
(
StringUtils
.
isBlank
(
maidianLogStr
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
a5b1f236
...
...
@@ -15,13 +15,13 @@ import com.gic.enterprise.api.dto.StoreDTO;
import
com.gic.enterprise.api.dto.StorePhotoDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.data.api.dto.HaobanDataDTO
;
import
com.gic.haoban.data.api.service.HaobanDataApiService
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.StoreFieldEnum
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.web.anno.IgnoreLogin
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.StaffStoreVO
;
import
com.gic.haoban.manage.web.vo.StoreDetailVO
;
...
...
@@ -37,8 +37,8 @@ import java.util.*;
import
java.util.stream.Collectors
;
@RestController
public
class
StoreController
extends
WebBaseController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
StoreController
.
class
);
public
class
StoreController
extends
WebBaseController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
StoreController
.
class
);
@Autowired
private
ClerkService
clerkService
;
...
...
@@ -60,10 +60,13 @@ public class StoreController extends WebBaseController{
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
private
EnterpriseService
enterpriseService
;
@Autowired
private
StaffApiService
staffApiService
;
//门店列表
@RequestMapping
(
"/store-list"
)
public
HaobanResponse
storeList
(
String
staffId
,
String
wxEnterpriseId
,
String
version
)
{
@IgnoreLogin
public
HaobanResponse
storeList
(
String
staffId
,
String
wxEnterpriseId
,
String
version
)
{
if
(
StringUtils
.
isAnyBlank
(
staffId
,
wxEnterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
...
...
@@ -99,6 +102,10 @@ public class StoreController extends WebBaseController{
if
(
store
==
null
)
{
continue
;
}
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffId
);
if
(
staffDTO
==
null
)
{
continue
;
}
//主门店标志
int
mainStoreFlag
=
0
;
if
(
storeId
.
equals
(
store
.
getStoreId
()))
{
...
...
@@ -121,6 +128,7 @@ public class StoreController extends WebBaseController{
vo
.
setStoreName
(
store
.
getStoreName
());
vo
.
setWxEnterpriseId
(
wxEnterpriseId
);
vo
.
setClerkName
(
clerk
.
getClerkName
());
vo
.
setHeadImg
(
staffDTO
.
getHeadImg
());
vo
.
setBindFlag
(
1
);
list
.
add
(
vo
);
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/UploadController.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.thirdparty.api.dto.PicUploadResDTO
;
import
com.gic.thirdparty.api.service.QQCloudPicService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.InputStream
;
import
java.util.*
;
@RestController
public
class
UploadController
extends
WebBaseController
{
public
class
UploadController
extends
WebBaseController
{
@Autowired
private
QQCloudPicService
qqCloudPicService
;
@RequestMapping
(
"upload-img"
)
@IgnoreLogin
public
HaobanResponse
imgUpload
(
HttpServletRequest
request
)
throws
Exception
{
MultipartHttpServletRequest
multiRequest
=
(
MultipartHttpServletRequest
)
request
;
Iterator
<
String
>
iter
=
multiRequest
.
getFileNames
();
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
a5b1f236
This diff is collapsed.
Click to expand it.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
View file @
a5b1f236
...
...
@@ -122,6 +122,8 @@ public enum HaoBanErrCode {
ERR_30006
(
30006
,
"用户名或密码错误"
),
ERR_30007
(
30007
,
"未设置密码,请先设置密码"
),
ERR_30008
(
30008
,
"超级管理员不存在"
),
ERR_30009
(
30009
,
"token不正确,请重新登录"
),
ERR_30010
(
30010
,
"token为空,请授权登录登录"
),
//角色
ERR_40001
(
40001
,
"角色异常"
),
...
...
@@ -236,7 +238,7 @@ public enum HaoBanErrCode {
private
int
code
;
private
String
msg
;
private
HaoBanErrCode
(
int
code
,
String
value
)
{
HaoBanErrCode
(
int
code
,
String
value
)
{
this
.
code
=
code
;
this
.
msg
=
value
;
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/exception/ControllerException.java
deleted
100644 → 0
View file @
030e1f53
package
com
.
gic
.
haoban
.
manage
.
web
.
exception
;
/**
* Created 2018/7/24.
*
* @author hua
*/
public
class
ControllerException
extends
Exception
{
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/exception/GlobalExceptionHandler.java
View file @
a5b1f236
...
...
@@ -6,6 +6,10 @@ import com.gic.haoban.manage.web.controller.WebBaseController;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.validation.BindException
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.FieldError
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -23,45 +27,50 @@ import java.util.regex.Pattern;
*/
@ControllerAdvice
public
class
GlobalExceptionHandler
extends
WebBaseController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
GlobalExceptionHandler
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
GlobalExceptionHandler
.
class
);
private
static
final
Pattern
pattern
=
Pattern
.
compile
(
"(.*: )(.*)(\\n.*)"
);
/**
* 控制器运行异常
*
* @param response 响应
* @param ex 前女友
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:50
*/
@ResponseBody
@ExceptionHandler
(
RuntimeException
.
class
)
public
HaobanResponse
controllerRunException
(
HttpServletResponse
response
,
RuntimeException
ex
)
{
logger
.
error
(
"controllerRunException:{}"
,
ex
.
getMessage
(),
ex
);
HaobanResponse
res
=
new
HaobanResponse
();
res
.
setErrorCode
(
HaoBanErrCode
.
ERR_3
.
getCode
());
String
message
=
ex
.
getMessage
();
if
(
message
!=
null
&&
message
.
indexOf
(
ShowFrontMessageException
.
class
.
getName
())
>
-
1
)
{
Matcher
matcher
=
pattern
.
matcher
(
message
);
while
(
matcher
.
find
())
{
message
=
(
matcher
.
group
(
2
));
}
}
else
{
message
=
HaoBanErrCode
.
ERR_3
.
getMsg
();
}
res
.
setMessage
(
message
);
return
res
;
}
// @ResponseBody
// @ExceptionHandler(ShowFrontMessageException.class)
// public HaobanResponse ControllerException(HttpServletResponse response, ShowFrontMessageException ex) {
// HaobanResponse res = new HaobanResponse();
// res.setErrorCode(HaoBanErrCode.ERR_0.getCode());
// res.setMessage(ex.getMessage());
// return res;
// }
// @ResponseBody
// @ExceptionHandler(RuntimeException.class)
// public HaobanResponse ControllerException(HttpServletResponse response, RuntimeException ex) {
// HaobanResponse res = new HaobanResponse();
// res.setErrorCode(HaoBanErrCode.ERR_3.getCode());
// String message = ex.getMessage();
// if (message != null && message.indexOf(ShowFrontMessageException.class.getName()) > -1) {
// Matcher matcher = pattern.matcher(message);
// while (matcher.find()) {
// message = (matcher.group(2));
// }
// } else {
// message = HaoBanErrCode.ERR_3.getMsg();
// }
// res.setMessage(message);
// return res;
// }
/**
* 全局异常
*
* @param response 响应
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:54:25
*/
@ResponseBody
@ExceptionHandler
(
Exception
.
class
)
public
HaobanResponse
ControllerException
(
HttpServletResponse
response
,
Exception
ex
)
{
logger
.
error
(
"err:"
,
ex
.
getMessage
());
ex
.
printStackTrace
();
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_3
;
public
HaobanResponse
controllerException
(
HttpServletResponse
response
,
Exception
ex
)
{
logger
.
error
(
"controllerException:{}"
,
ex
.
getMessage
(),
ex
);
StringBuilder
sb
=
new
StringBuilder
();
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
();
try
(
PrintWriter
printWriter
=
new
PrintWriter
(
baos
))
{
...
...
@@ -74,17 +83,59 @@ public class GlobalExceptionHandler extends WebBaseController {
if
(
sb
.
length
()
==
0
)
{
sb
.
append
(
ex
.
getMessage
());
}
// 输出详细错误信息,便于调试
// return resultResponse(errCode, null, sb.toString());
return
resultResponse
(
HaoBanErrCode
.
ERR_3
);
}
/**
* valid 异常告警
*
* @param response
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:40
*/
@ResponseBody
@ExceptionHandler
(
BindException
.
class
)
public
HaobanResponse
bindException
(
HttpServletResponse
response
,
BindException
ex
)
{
logger
.
error
(
"bindException:{}"
,
ex
.
getMessage
());
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_5
;
BindingResult
bindingResult
=
ex
.
getBindingResult
();
FieldError
fieldError
=
bindingResult
.
getFieldError
();
return
resultResponse
(
errCode
,
null
,
fieldError
.
getField
()
+
fieldError
.
getDefaultMessage
());
}
/**
* valid 异常告警 @ReuqestBody
*
* @param response
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:35
*/
@ResponseBody
@ExceptionHandler
(
MethodArgumentNotValidException
.
class
)
public
HaobanResponse
methodArgumentNotValidException
(
HttpServletResponse
response
,
MethodArgumentNotValidException
ex
)
{
logger
.
error
(
"methodArgumentNotValidException:{}"
,
ex
.
getMessage
());
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_5
;
BindingResult
bindingResult
=
ex
.
getBindingResult
();
FieldError
fieldError
=
bindingResult
.
getFieldError
();
return
resultResponse
(
errCode
,
null
,
fieldError
.
getField
()
+
fieldError
.
getDefaultMessage
());
}
/**
* 登录异常
*
* @param response 响应
* @param ex
* @return {@link HaobanResponse }
* @author mozhu
* @date 2021-12-15 14:55:16
*/
@ResponseBody
@ExceptionHandler
(
NoLoginException
.
class
)
public
HaobanResponse
Controller
Exception
(
HttpServletResponse
response
,
NoLoginException
ex
)
{
public
HaobanResponse
controllerNoLogin
Exception
(
HttpServletResponse
response
,
NoLoginException
ex
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_4
);
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/init/MyApplicationContextAware.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
init
;
import
com.gic.dict.api.dto.GlobalDictMap
;
import
com.gic.dict.api.service.ManagerDictService
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.BeansException
;
...
...
@@ -8,17 +10,14 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Component
;
import
com.gic.dict.api.dto.GlobalDictMap
;
import
com.gic.dict.api.service.ManagerDictService
;
@Component
public
class
MyApplicationContextAware
implements
ApplicationContextAware
{
private
Logger
log
=
LogManager
.
getLogger
(
MyApplicationContextAware
.
class
);
private
static
ApplicationContext
applicationContext
;
private
final
Logger
log
=
LogManager
.
getLogger
(
MyApplicationContextAware
.
class
);
@Autowired
private
ManagerDictService
managerDictService
;
@Override
public
void
setApplicationContext
(
ApplicationContext
appContext
)
throws
BeansException
{
GlobalDictMap
.
countyMap
=
managerDictService
.
getCountysMap
();
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/interceptor/HttpLimitInterceptor.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
interceptor
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.anno.HttpLimit
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.utils.IPAddressUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.method.HandlerMethod
;
...
...
@@ -17,6 +13,9 @@ import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.Map
;
/**
* 测试登录拦截器
...
...
@@ -25,7 +24,7 @@ import javax.servlet.http.HttpServletResponse;
*/
public
class
HttpLimitInterceptor
extends
HandlerInterceptorAdapter
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
HttpLimitInterceptor
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
HttpLimitInterceptor
.
class
);
private
void
errorResult
(
HttpServletResponse
httpServletResponse
,
HaoBanErrCode
errCode
)
{
HaobanResponse
response
=
new
HaobanResponse
();
...
...
@@ -52,7 +51,7 @@ public class HttpLimitInterceptor extends HandlerInterceptorAdapter {
HandlerMethod
handler
=
(
HandlerMethod
)
o
;
HttpLimit
httpLimit
=
handler
.
getMethodAnnotation
(
HttpLimit
.
class
);
if
(
httpLimit
!=
null
)
{
String
ip
=
getIpAddress
(
httpServletRequest
);
String
ip
=
IPAddressUtil
.
getIpAddress
(
httpServletRequest
);
String
url
=
httpServletRequest
.
getRequestURL
().
toString
();
String
key
=
"http_limit_"
.
concat
(
url
);
key
=
key
+
ip
;
...
...
@@ -69,26 +68,4 @@ public class HttpLimitInterceptor extends HandlerInterceptorAdapter {
}
private
String
getIpAddress
(
HttpServletRequest
request
)
{
String
ip
=
request
.
getHeader
(
"x-forwarded-for"
);
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"WL-Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_CLIENT_IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_X_FORWARDED_FOR"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getRemoteAddr
();
}
return
ip
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/interceptor/WebInterceptor.java
→
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/interceptor/
Mobile
WebInterceptor.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
interceptor
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.common.utils.AuthRequestUtil
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.AuthRequestWellDoneUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.WellDoneLoginDTO
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.redis.data.util.GicRateLimiter
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
...
...
@@ -14,16 +17,17 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.Map
;
/**
* Created 2018/7/20.
*
* @author hua
*/
public
class
WebInterceptor
extends
HandlerInterceptorAdapter
{
public
class
Mobile
WebInterceptor
extends
HandlerInterceptorAdapter
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WebInterceptor
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MobileWebInterceptor
.
class
);
private
static
final
String
MOUDLE
=
"haoban-manage3-wx"
;
private
void
errorResult
(
HttpServletResponse
httpServletResponse
,
HaoBanErrCode
errCode
)
{
...
...
@@ -44,11 +48,25 @@ public class WebInterceptor extends HandlerInterceptorAdapter {
public
boolean
preHandle
(
HttpServletRequest
httpServletRequest
,
HttpServletResponse
httpServletResponse
,
Object
o
)
throws
Exception
{
String
requestURI
=
httpServletRequest
.
getRequestURI
();
logger
.
info
(
"post-url:{}"
,
requestURI
);
Map
<
String
,
String
[]>
parameterMap
=
httpServletRequest
.
getParameterMap
();
logger
.
info
(
"post-params:{}"
,
JSONObject
.
toJSONString
(
parameterMap
));
Object
appLoginUser
=
AuthRequestUtil
.
getAppLoginUser
();
if
(
ObjectUtil
.
isNotNull
(
appLoginUser
))
{
HandlerMethod
handler
=
(
HandlerMethod
)
o
;
IgnoreLogin
ignoreLogin
=
handler
.
getMethodAnnotation
(
IgnoreLogin
.
class
);
if
(
null
!=
ignoreLogin
)
{
return
true
;
}
WellDoneLoginDTO
wellDoneLoginDTO
=
(
WellDoneLoginDTO
)
AuthRequestWellDoneUtil
.
getLoginUser
();
if
(
wellDoneLoginDTO
==
null
)
{
this
.
errorResult
(
httpServletResponse
,
HaoBanErrCode
.
ERR_30009
);
logger
.
info
(
"用户不存在!"
);
return
false
;
}
String
wxEnterpriseId
=
wellDoneLoginDTO
.
getWxEnterpriseId
();
GicRateLimiter
instance
=
GicRateLimiter
.
getInstance
(
MOUDLE
);
Long
acquire
=
instance
.
acquire
(
requestURI
,
wxEnterpriseId
);
logger
.
info
(
"限流返回值:{},{}"
,
requestURI
,
acquire
);
if
(
acquire
==
0L
)
{
this
.
errorResult
(
httpServletResponse
,
HaoBanErrCode
.
ERR_13
);
logger
.
info
(
"wxEnterpriseId:{},限流!"
,
wxEnterpriseId
);
return
false
;
}
return
true
;
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/interceptor/ResponseInterceptor.java
deleted
100644 → 0
View file @
030e1f53
package
com
.
gic
.
haoban
.
manage
.
web
.
interceptor
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.converter.HttpMessageConverter
;
import
org.springframework.http.server.ServerHttpRequest
;
import
org.springframework.http.server.ServerHttpResponse
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice
;
import
java.lang.reflect.Method
;
/**
* Created 2019/2/20.
*
* @author hua
*/
@ControllerAdvice
public
class
ResponseInterceptor
implements
ResponseBodyAdvice
<
HaobanResponse
>
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
ResponseInterceptor
.
class
);
@Override
public
boolean
supports
(
MethodParameter
methodParameter
,
Class
<?
extends
HttpMessageConverter
<?>>
aClass
)
{
Method
method
=
methodParameter
.
getMethod
();
String
name
=
method
.
getName
();
logger
.
info
(
"method:{}"
,
name
);
return
true
;
}
@Override
public
HaobanResponse
beforeBodyWrite
(
HaobanResponse
haobanResponse
,
MethodParameter
methodParameter
,
MediaType
mediaType
,
Class
<?
extends
HttpMessageConverter
<?>>
aClass
,
ServerHttpRequest
serverHttpRequest
,
ServerHttpResponse
serverHttpResponse
)
{
String
response
=
JSONObject
.
toJSONString
(
haobanResponse
);
logger
.
info
(
"response:{}"
,
response
);
return
haobanResponse
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/interceptor/TestLoginInterceptor.java
deleted
100644 → 0
View file @
030e1f53
package
com
.
gic
.
haoban
.
manage
.
web
.
interceptor
;
import
com.gic.haoban.auth.api.dto.UserRightDetailDTO
;
import
com.gic.haoban.common.utils.AuthRequestUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 测试登录拦截器
*
* @author zhurz
*/
public
class
TestLoginInterceptor
extends
HandlerInterceptorAdapter
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
TestLoginInterceptor
.
class
);
@Override
public
boolean
preHandle
(
HttpServletRequest
httpServletRequest
,
HttpServletResponse
httpServletResponse
,
Object
o
)
throws
Exception
{
// 测试用
HttpServletRequest
request
=
AuthRequestUtil
.
getRequest
();
String
testFlag
=
request
.
getHeader
(
"testFlag"
);
if
(!
"Y"
.
equals
(
testFlag
))
return
true
;
String
testEnterpriseId
=
request
.
getHeader
(
"testEnterpriseId"
);
String
testUserId
=
request
.
getHeader
(
"testUserId"
);
UserRightDetailDTO
sessionUser
=
new
UserRightDetailDTO
();
sessionUser
.
setUserId
(
testUserId
);
sessionUser
.
setEnterpriseId
(
testEnterpriseId
);
AuthRequestUtil
.
setSessionUser
(
sessionUser
);
return
true
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/ClerkLoginQO.java
deleted
100644 → 0
View file @
030e1f53
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
;
import
java.io.Serializable
;
/**
* 员工登录
*
* @author mozhu
* @date 2021/12/10 15:00
*/
public
class
ClerkLoginQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
170574390217887304L
;
/**
* 电话号码
*/
private
String
phoneNumber
;
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/StaffLoginQO.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* 员工登录
*
* @author mozhu
* @date 2021/12/10 15:00
*/
public
class
StaffLoginQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
170574390217887304L
;
@NotEmpty
(
message
=
"员工id不允许为空"
)
private
String
staffId
;
private
String
wxEnterpriseId
;
private
String
phoneNumber
;
private
String
nationcode
;
private
String
wxUserId
;
/**
* 是否同意隐私协议,1:是;0:否
*/
@NotNull
(
message
=
"是否同意隐私协议不允许为空"
)
private
Integer
privacyUseFlag
;
/**
* 好办版本
*/
private
String
welldoneVersion
;
/**
* 企微版本
*/
private
String
weworkVersion
;
/**
* 用户手机品牌
*/
private
String
staffPhoneBrand
;
/**
* 用户手机型号
*/
private
String
staffPhoneModel
;
/**
* 用户手机版本
*/
private
String
staffPhoneVersion
;
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getNationcode
()
{
return
nationcode
;
}
public
void
setNationcode
(
String
nationcode
)
{
this
.
nationcode
=
nationcode
;
}
public
String
getWxUserId
()
{
return
wxUserId
;
}
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
;
}
public
Integer
getPrivacyUseFlag
()
{
return
privacyUseFlag
;
}
public
void
setPrivacyUseFlag
(
Integer
privacyUseFlag
)
{
this
.
privacyUseFlag
=
privacyUseFlag
;
}
public
String
getWelldoneVersion
()
{
return
welldoneVersion
;
}
public
void
setWelldoneVersion
(
String
welldoneVersion
)
{
this
.
welldoneVersion
=
welldoneVersion
;
}
public
String
getWeworkVersion
()
{
return
weworkVersion
;
}
public
void
setWeworkVersion
(
String
weworkVersion
)
{
this
.
weworkVersion
=
weworkVersion
;
}
public
String
getStaffPhoneBrand
()
{
return
staffPhoneBrand
;
}
public
void
setStaffPhoneBrand
(
String
staffPhoneBrand
)
{
this
.
staffPhoneBrand
=
staffPhoneBrand
;
}
public
String
getStaffPhoneModel
()
{
return
staffPhoneModel
;
}
public
void
setStaffPhoneModel
(
String
staffPhoneModel
)
{
this
.
staffPhoneModel
=
staffPhoneModel
;
}
public
String
getStaffPhoneVersion
()
{
return
staffPhoneVersion
;
}
public
void
setStaffPhoneVersion
(
String
staffPhoneVersion
)
{
this
.
staffPhoneVersion
=
staffPhoneVersion
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/utils/IPAddressUtil.java
0 → 100644
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
utils
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author mozhu
* @date 2021/12/15 11:07
*/
public
class
IPAddressUtil
{
/**
* 获得ip地址
*
* @param request 请求
* @return {@link String }
* @author mozhu
* @date 2021-12-15 11:08:30
*/
public
static
String
getIpAddress
(
HttpServletRequest
request
)
{
String
ip
=
request
.
getHeader
(
"x-forwarded-for"
);
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"WL-Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_CLIENT_IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"HTTP_X_FORWARDED_FOR"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getRemoteAddr
();
}
return
ip
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/StaffStoreVO.java
View file @
a5b1f236
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* Created 2018/10/22.
...
...
@@ -19,6 +18,7 @@ public class StaffStoreVO implements Serializable {
private
String
clerkCode
;
private
String
clerkId
;
private
String
storeImg
;
private
String
headImg
;
private
int
clerkType
;
private
Integer
mainStoreFlag
;
private
String
phoneNumber
;
...
...
@@ -115,16 +115,24 @@ public class StaffStoreVO implements Serializable {
public
int
getClerkType
()
{
return
clerkType
;
}
public
void
setClerkType
(
int
clerkType
)
{
this
.
clerkType
=
clerkType
;
}
public
Integer
getMainStoreFlag
()
{
return
mainStoreFlag
;
}
public
void
setMainStoreFlag
(
Integer
mainStoreFlag
)
{
this
.
mainStoreFlag
=
mainStoreFlag
;
}
public
String
getHeadImg
()
{
return
headImg
;
}
public
void
setHeadImg
(
String
headImg
)
{
this
.
headImg
=
headImg
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/
InfoVo
.java
→
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/
WellDoneLoginInfoVO
.java
View file @
a5b1f236
...
...
@@ -7,7 +7,7 @@ import java.io.Serializable;
*
* @author hua
*/
public
class
InfoVo
implements
Serializable
{
public
class
WellDoneLoginInfoVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
staffId
;
private
String
wxEnterpriseId
;
...
...
@@ -16,13 +16,16 @@ public class InfoVo implements Serializable {
private
String
phoneNumber
;
private
String
nationcode
;
private
String
wxUserId
;
private
Integer
privacyUseFlag
;
public
String
getWxUserId
()
{
return
wxUserId
;
}
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
;
}
public
String
getStaffId
()
{
return
staffId
;
}
...
...
@@ -50,15 +53,24 @@ public class InfoVo implements Serializable {
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getNationcode
()
{
return
nationcode
;
}
public
void
setNationcode
(
String
nationcode
)
{
this
.
nationcode
=
nationcode
;
}
public
Integer
getPrivacyUseFlag
()
{
return
privacyUseFlag
;
}
public
void
setPrivacyUseFlag
(
Integer
privacyUseFlag
)
{
this
.
privacyUseFlag
=
privacyUseFlag
;
}
}
haoban-manage3-wx/src/main/webapp/WEB-INF/spring-interceptor.xml
View file @
a5b1f236
...
...
@@ -6,6 +6,7 @@
<bean
class=
"com.gic.haoban.common.interceptor.CORSInterceptor"
/>
<bean
class=
"com.gic.commons.interceptor.HeaderTagInterceptor"
/>
<bean
class=
"com.gic.haoban.common.ext.PropertyViewClearInterceptor"
/>
<bean
class=
"com.gic.haoban.manage.web.interceptor.HttpLimitInterceptor"
/>
<mvc:interceptor>
<mvc:mapping
path=
"/**"
/>
<mvc:exclude-mapping
path=
"/login.json"
/>
...
...
@@ -19,7 +20,7 @@
<mvc:exclude-mapping
path=
"/phone-login"
/>
<mvc:exclude-mapping
path=
"/upload-file*"
/>
<mvc:exclude-mapping
path=
"/upload-file-voice"
/>
<bean
class=
"com.gic.haoban.manage.web.interceptor.WebInterceptor"
/>
<bean
class=
"com.gic.haoban.manage.web.interceptor.
Mobile
WebInterceptor"
/>
</mvc:interceptor>
</mvc:interceptors>
...
...
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