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
54a88416
Commit
54a88416
authored
Jun 20, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微操作日志
parent
0353a54b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
66 deletions
+144
-66
QywxOpenController.java
...haoban/manage/web/controller/open/QywxOpenController.java
+105
-64
QywxOpenTaskController.java
...an/manage/web/controller/open/QywxOpenTaskController.java
+2
-2
OpenQwAccountInfoVO.java
...om/gic/haoban/manage/web/vo/open/OpenQwAccountInfoVO.java
+37
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/open/QywxOpenController.java
View file @
54a88416
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller.open;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller.open;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DatePattern
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
...
@@ -12,6 +13,7 @@ import com.gic.commons.util.PageHelperUtils;
...
@@ -12,6 +13,7 @@ import com.gic.commons.util.PageHelperUtils;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseUsingPermissionDto
;
import
com.gic.enterprise.api.dto.EnterpriseUsingPermissionDto
;
import
com.gic.enterprise.api.dto.WechatWorkServiceSetting
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseUseForbidService
;
import
com.gic.enterprise.api.service.EnterpriseUseForbidService
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
...
@@ -24,6 +26,7 @@ import com.gic.haoban.manage.api.service.OpenStaffApiService;
...
@@ -24,6 +26,7 @@ import com.gic.haoban.manage.api.service.OpenStaffApiService;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.web.qo.open.OpenStaffQO
;
import
com.gic.haoban.manage.web.qo.open.OpenStaffQO
;
import
com.gic.haoban.manage.web.vo.open.OpenQwAccountInfoVO
;
import
com.gic.haoban.manage.web.vo.open.OpenStaffVO
;
import
com.gic.haoban.manage.web.vo.open.OpenStaffVO
;
import
com.gic.qcloud.BucketNameEnum
;
import
com.gic.qcloud.BucketNameEnum
;
import
com.gic.web.common.download.DownloadTask
;
import
com.gic.web.common.download.DownloadTask
;
...
@@ -31,6 +34,8 @@ import com.gic.web.common.download.DownloadTaskUtil;
...
@@ -31,6 +34,8 @@ import com.gic.web.common.download.DownloadTaskUtil;
import
com.gic.web.common.download.constants.TaskTypeEnum
;
import
com.gic.web.common.download.constants.TaskTypeEnum
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -48,40 +53,43 @@ import java.util.stream.Collectors;
...
@@ -48,40 +53,43 @@ import java.util.stream.Collectors;
@RequestMapping
(
"/qw-open"
)
@RequestMapping
(
"/qw-open"
)
public
class
QywxOpenController
{
public
class
QywxOpenController
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
QywxOpenController
.
class
);
@Autowired
@Autowired
private
OpenStaffApiService
openStaffApiService
;
private
OpenStaffApiService
openStaffApiService
;
@Autowired
@Autowired
private
StaffApiService
staffApiService
;
private
StaffApiService
staffApiService
;
@Autowired
@Autowired
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
@Autowired
@Autowired
private
OpenStaffExcelHandler
openStaffExcelHandler
;
private
OpenStaffExcelHandler
openStaffExcelHandler
;
@Autowired
@Autowired
private
EnterpriseUseForbidService
enterpriseUseForbidService
;
private
EnterpriseUseForbidService
enterpriseUseForbidService
;
/**
/**
* 托管列表
* 托管列表
*
* @param qo
* @param qo
* @return
* @return
*/
*/
@RequestMapping
(
"open-staff-page"
)
@RequestMapping
(
"open-staff-page"
)
public
RestResponse
<
Page
<
OpenStaffVO
>>
page
(
@RequestBody
OpenStaffQO
qo
)
{
public
RestResponse
<
Page
<
OpenStaffVO
>>
page
(
@RequestBody
OpenStaffQO
qo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
OpenStaffPageQDTO
qdto
=
EntityUtil
.
changeEntityByJSON
(
OpenStaffPageQDTO
.
class
,
qo
)
;
OpenStaffPageQDTO
qdto
=
EntityUtil
.
changeEntityByJSON
(
OpenStaffPageQDTO
.
class
,
qo
)
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setEnterpriseId
(
enterpriseId
);
BasePageInfo
basePageInfo
=
new
BasePageInfo
()
;
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageNum
(
qo
.
getPageNum
());
basePageInfo
.
setPageNum
(
qo
.
getPageNum
());
basePageInfo
.
setPageSize
(
qo
.
getPageSize
());
basePageInfo
.
setPageSize
(
qo
.
getPageSize
());
ServiceResponse
<
Page
<
OpenStaffListDTO
>>
pageResp
=
this
.
openStaffApiService
.
page
(
qdto
,
basePageInfo
);
ServiceResponse
<
Page
<
OpenStaffListDTO
>>
pageResp
=
this
.
openStaffApiService
.
page
(
qdto
,
basePageInfo
);
Page
<
OpenStaffListDTO
>
page
=
pageResp
.
getResult
();
Page
<
OpenStaffListDTO
>
page
=
pageResp
.
getResult
();
Page
<
OpenStaffVO
>
retPage
=
PageHelperUtils
.
changePageToCurrentPage
(
page
,
OpenStaffVO
.
class
);
Page
<
OpenStaffVO
>
retPage
=
PageHelperUtils
.
changePageToCurrentPage
(
page
,
OpenStaffVO
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
retPage
.
getResult
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
retPage
.
getResult
()))
{
EnterpriseDTO
en
=
this
.
enterpriseService
.
getEnterpriseById
(
enterpriseId
)
;
EnterpriseDTO
en
=
this
.
enterpriseService
.
getEnterpriseById
(
enterpriseId
);
retPage
.
getResult
().
forEach
(
o
->
{
retPage
.
getResult
().
forEach
(
o
->
{
o
.
setBrandName
(
en
.
getBrandName
());
o
.
setBrandName
(
en
.
getBrandName
());
});
});
}
}
...
@@ -90,20 +98,21 @@ public class QywxOpenController {
...
@@ -90,20 +98,21 @@ public class QywxOpenController {
/**
/**
* 托管列表导出
* 托管列表导出
*
* @param qo
* @param qo
* @return
* @return
*/
*/
@RequestMapping
(
"open-staff-excel"
)
@RequestMapping
(
"open-staff-excel"
)
public
RestResponse
<
String
>
excel
(
@RequestBody
OpenStaffQO
qo
)
{
public
RestResponse
<
String
>
excel
(
@RequestBody
OpenStaffQO
qo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
OpenStaffPageQDTO
qdto
=
EntityUtil
.
changeEntityByJSON
(
OpenStaffPageQDTO
.
class
,
qo
)
;
OpenStaffPageQDTO
qdto
=
EntityUtil
.
changeEntityByJSON
(
OpenStaffPageQDTO
.
class
,
qo
)
;
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
BasePageInfo
basePageInfo
=
new
BasePageInfo
()
;
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageNum
(
1
);
basePageInfo
.
setPageNum
(
1
);
basePageInfo
.
setPageSize
(
1
);
basePageInfo
.
setPageSize
(
1
);
ServiceResponse
<
Page
<
OpenStaffListDTO
>>
pageResp
=
this
.
openStaffApiService
.
page
(
qdto
,
basePageInfo
)
;
ServiceResponse
<
Page
<
OpenStaffListDTO
>>
pageResp
=
this
.
openStaffApiService
.
page
(
qdto
,
basePageInfo
)
;
final
int
totalCount
=
pageResp
.
getResult
().
getTotalCount
()
;
final
int
totalCount
=
pageResp
.
getResult
().
getTotalCount
();
if
(
totalCount
==
0
)
{
if
(
totalCount
==
0
)
{
return
RestResponse
.
failure
(
"9999"
,
"导出数据条数为0"
);
return
RestResponse
.
failure
(
"9999"
,
"导出数据条数为0"
);
}
}
...
@@ -111,10 +120,10 @@ public class QywxOpenController {
...
@@ -111,10 +120,10 @@ public class QywxOpenController {
user
.
setUserId
(
loginUser
.
getClerkId
());
user
.
setUserId
(
loginUser
.
getClerkId
());
user
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
user
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
user
.
setRealName
(
loginUser
.
getClerkName
());
user
.
setRealName
(
loginUser
.
getClerkName
());
String
fileName
=
"好办托管企微号"
;
String
fileName
=
"好办托管企微号"
;
Date
startDate
=
new
Date
();
Date
startDate
=
new
Date
();
Date
endDate
=
new
Date
()
;
Date
endDate
=
new
Date
();
if
(
null
!=
startDate
&&
null
!=
endDate
)
{
if
(
null
!=
startDate
&&
null
!=
endDate
)
{
fileName
=
"好办托管企微号"
+
"-"
+
DateUtil
.
formatString
(
startDate
,
"yyyy-MM-dd"
)
+
"到"
+
DateUtil
.
formatString
(
endDate
,
"yyyy-MM-dd"
);
fileName
=
"好办托管企微号"
+
"-"
+
DateUtil
.
formatString
(
startDate
,
"yyyy-MM-dd"
)
+
"到"
+
DateUtil
.
formatString
(
endDate
,
"yyyy-MM-dd"
);
}
}
// 1.组装数据查询条件
// 1.组装数据查询条件
...
@@ -133,50 +142,51 @@ public class QywxOpenController {
...
@@ -133,50 +142,51 @@ public class QywxOpenController {
if
(
jsonResponse
.
isSuccess
())
{
if
(
jsonResponse
.
isSuccess
())
{
reportId
=
(
String
)
jsonResponse
.
getResult
();
reportId
=
(
String
)
jsonResponse
.
getResult
();
}
else
{
}
else
{
return
RestResponse
.
failure
(
"9999"
,
jsonResponse
.
getErrorMessage
());
return
RestResponse
.
failure
(
"9999"
,
jsonResponse
.
getErrorMessage
());
}
}
return
RestResponse
.
successResult
(
reportId
);
return
RestResponse
.
successResult
(
reportId
);
}
}
/**
/**
* 登录初始化
* 登录初始化
*
* @param staffId
* @param staffId
* @return
* @return
*/
*/
@RequestMapping
(
"login-init"
)
@RequestMapping
(
"login-init"
)
public
RestResponse
<
OpenStaffDTO
>
init
(
String
staffId
,
@RequestParam
(
defaultValue
=
"0"
)
int
loginAgainFlag
)
{
public
RestResponse
<
OpenStaffDTO
>
init
(
String
staffId
,
@RequestParam
(
defaultValue
=
"0"
)
int
loginAgainFlag
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
enterpriseId
=
login
.
getEnterpriseId
()
;
String
enterpriseId
=
login
.
getEnterpriseId
();
if
(
StringUtils
.
isBlank
(
staffId
))
{
if
(
StringUtils
.
isBlank
(
staffId
))
{
return
RestResponse
.
failure
(
"9999"
,
"请先选择成员"
)
;
return
RestResponse
.
failure
(
"9999"
,
"请先选择成员"
)
;
}
}
StaffDTO
staff
=
this
.
staffApiService
.
selectById
(
staffId
)
;
StaffDTO
staff
=
this
.
staffApiService
.
selectById
(
staffId
);
if
(
null
==
staff
||
!
staff
.
getWxEnterpriseId
().
equals
(
wxEnterpriseId
))
{
if
(
null
==
staff
||
!
staff
.
getWxEnterpriseId
().
equals
(
wxEnterpriseId
))
{
return
RestResponse
.
failure
(
"9999"
,
"成员不存在"
)
;
return
RestResponse
.
failure
(
"9999"
,
"成员不存在"
)
;
}
}
List
<
StaffClerkRelationDTO
>
relationList
=
this
.
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
)
;
List
<
StaffClerkRelationDTO
>
relationList
=
this
.
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
)
;
if
(
CollectionUtils
.
isEmpty
(
relationList
))
{
if
(
CollectionUtils
.
isEmpty
(
relationList
))
{
return
RestResponse
.
failure
(
"9999"
,
"成员未关联导购"
)
;
return
RestResponse
.
failure
(
"9999"
,
"成员未关联导购"
)
;
}
}
relationList
=
relationList
.
stream
().
filter
(
o
->
o
.
getClerkType
()
<=
1
&&
o
.
getEnterpriseId
().
equals
(
enterpriseId
)).
collect
(
Collectors
.
toList
());
relationList
=
relationList
.
stream
().
filter
(
o
->
o
.
getClerkType
()
<=
1
&&
o
.
getEnterpriseId
().
equals
(
enterpriseId
)).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
relationList
))
{
if
(
CollectionUtils
.
isEmpty
(
relationList
))
{
return
RestResponse
.
failure
(
"9999"
,
"成员需关联gic商户下导购"
)
;
return
RestResponse
.
failure
(
"9999"
,
"成员需关联gic商户下导购"
)
;
}
}
String
checkMsg
=
this
.
check
(
wxEnterpriseId
,
enterpriseId
)
;
String
checkMsg
=
this
.
check
(
wxEnterpriseId
,
enterpriseId
)
;
if
(
null
!=
this
.
check
(
wxEnterpriseId
,
enterpriseId
))
{
if
(
null
!=
this
.
check
(
wxEnterpriseId
,
enterpriseId
))
{
return
RestResponse
.
failure
(
"9999"
,
checkMsg
)
;
return
RestResponse
.
failure
(
"9999"
,
checkMsg
)
;
}
}
OpenStaffInitQDTO
initQDTO
=
new
OpenStaffInitQDTO
()
;
OpenStaffInitQDTO
initQDTO
=
new
OpenStaffInitQDTO
();
initQDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
initQDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
initQDTO
.
setEnterpriseId
(
enterpriseId
);
initQDTO
.
setEnterpriseId
(
enterpriseId
);
initQDTO
.
setStaffId
(
staffId
);
initQDTO
.
setStaffId
(
staffId
);
initQDTO
.
setLoginAgainFlag
(
loginAgainFlag
);
initQDTO
.
setLoginAgainFlag
(
loginAgainFlag
);
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
init
(
initQDTO
)
;
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
init
(
initQDTO
);
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
OpenStaffDTO
openStaffDTO
=
resp
.
getResult
()
;
OpenStaffDTO
openStaffDTO
=
resp
.
getResult
();
openStaffDTO
.
setStaffHeadImg
(
staff
.
getHeadImg
());
openStaffDTO
.
setStaffHeadImg
(
staff
.
getHeadImg
());
openStaffDTO
.
setStaffName
(
staff
.
getStaffName
());
openStaffDTO
.
setStaffName
(
staff
.
getStaffName
());
return
RestResponse
.
successResult
(
openStaffDTO
);
return
RestResponse
.
successResult
(
openStaffDTO
);
...
@@ -184,17 +194,18 @@ public class QywxOpenController {
...
@@ -184,17 +194,18 @@ public class QywxOpenController {
/**
/**
* 获取账号详情
* 获取账号详情
*
* @param openStaffId
* @param openStaffId
* @return
* @return
*/
*/
@RequestMapping
(
"get-open-staff"
)
@RequestMapping
(
"get-open-staff"
)
public
RestResponse
<
OpenStaffDTO
>
getOpenStaff
(
Long
openStaffId
)
{
public
RestResponse
<
OpenStaffDTO
>
getOpenStaff
(
Long
openStaffId
)
{
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
getById
(
openStaffId
)
;
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
getById
(
openStaffId
);
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
OpenStaffDTO
openStaffDTO
=
resp
.
getResult
()
;
OpenStaffDTO
openStaffDTO
=
resp
.
getResult
();
StaffDTO
staff
=
this
.
staffApiService
.
selectById
(
openStaffDTO
.
getStaffId
())
;
StaffDTO
staff
=
this
.
staffApiService
.
selectById
(
openStaffDTO
.
getStaffId
());
openStaffDTO
.
setStaffHeadImg
(
staff
.
getHeadImg
());
openStaffDTO
.
setStaffHeadImg
(
staff
.
getHeadImg
());
openStaffDTO
.
setStaffName
(
staff
.
getStaffName
());
openStaffDTO
.
setStaffName
(
staff
.
getStaffName
());
return
RestResponse
.
successResult
(
openStaffDTO
);
return
RestResponse
.
successResult
(
openStaffDTO
);
...
@@ -202,29 +213,31 @@ public class QywxOpenController {
...
@@ -202,29 +213,31 @@ public class QywxOpenController {
/**
/**
* 校验验证码
* 校验验证码
*
* @param openStaffId
* @param openStaffId
* @param code
* @param code
* @return
* @return
*/
*/
@RequestMapping
(
"check-code"
)
@RequestMapping
(
"check-code"
)
public
RestResponse
<
Void
>
checkCode
(
Long
openStaffId
,
String
code
)
{
public
RestResponse
<
Void
>
checkCode
(
Long
openStaffId
,
String
code
)
{
ServiceResponse
<
Void
>
resp
=
this
.
openStaffApiService
.
checkCode
(
openStaffId
,
code
)
;
ServiceResponse
<
Void
>
resp
=
this
.
openStaffApiService
.
checkCode
(
openStaffId
,
code
)
;
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
return
RestResponse
.
successResult
();
return
RestResponse
.
successResult
();
}
}
/**
/**
* 获取2次验证二维码
* 获取2次验证二维码
*
* @param openStaffId
* @param openStaffId
* @return
* @return
*/
*/
@RequestMapping
(
"get-2qrcode"
)
@RequestMapping
(
"get-2qrcode"
)
public
RestResponse
<
OpenStaffDTO
>
get2Qrcode
(
Long
openStaffId
)
{
public
RestResponse
<
OpenStaffDTO
>
get2Qrcode
(
Long
openStaffId
)
{
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
get2Qrcode
(
openStaffId
)
;
ServiceResponse
<
OpenStaffDTO
>
resp
=
this
.
openStaffApiService
.
get2Qrcode
(
openStaffId
)
;
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
return
RestResponse
.
successResult
(
resp
.
getResult
());
return
RestResponse
.
successResult
(
resp
.
getResult
());
}
}
...
@@ -236,43 +249,71 @@ public class QywxOpenController {
...
@@ -236,43 +249,71 @@ public class QywxOpenController {
public
RestResponse
<
OpenStaffLicenseDTO
>
licenseInfo
()
{
public
RestResponse
<
OpenStaffLicenseDTO
>
licenseInfo
()
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
enterpriseId
=
login
.
getEnterpriseId
()
;
String
enterpriseId
=
login
.
getEnterpriseId
();
ServiceResponse
<
OpenStaffLicenseDTO
>
resp
=
this
.
openStaffApiService
.
getLicenseInfo
(
wxEnterpriseId
,
enterpriseId
)
;
ServiceResponse
<
OpenStaffLicenseDTO
>
resp
=
this
.
openStaffApiService
.
getLicenseInfo
(
wxEnterpriseId
,
enterpriseId
)
;
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
return
RestResponse
.
successResult
(
resp
.
getResult
());
return
RestResponse
.
successResult
(
resp
.
getResult
());
}
}
/**
/**
* 删除托管
* 删除托管
*
* @return
* @return
*/
*/
@RequestMapping
(
"del-open-staff"
)
@RequestMapping
(
"del-open-staff"
)
public
RestResponse
<
Void
>
delOpenStaff
(
Long
openStaffId
)
{
public
RestResponse
<
Void
>
delOpenStaff
(
Long
openStaffId
)
{
ServiceResponse
<
Void
>
resp
=
this
.
openStaffApiService
.
delete
(
openStaffId
)
;
ServiceResponse
<
Void
>
resp
=
this
.
openStaffApiService
.
delete
(
openStaffId
);
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
return
RestResponse
.
successResult
();
return
RestResponse
.
successResult
();
}
}
/**
/**
* 取消授权
* 取消授权
*
* @return
* @return
*/
*/
@RequestMapping
(
"cancel-open-staff"
)
@RequestMapping
(
"cancel-open-staff"
)
public
RestResponse
<
Void
>
cancelOpenStaff
(
Long
openStaffId
)
{
public
RestResponse
<
Void
>
cancelOpenStaff
(
Long
openStaffId
)
{
ServiceResponse
<
Void
>
resp
=
this
.
openStaffApiService
.
logout
(
openStaffId
)
;
ServiceResponse
<
Void
>
resp
=
this
.
openStaffApiService
.
logout
(
openStaffId
);
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
}
return
RestResponse
.
successResult
();
return
RestResponse
.
successResult
();
}
}
private
String
check
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
private
String
check
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
ServiceResponse
<
EnterpriseUsingPermissionDto
>
resp
=
this
.
enterpriseUseForbidService
.
getWxEnterpriseService
(
enterpriseId
,
wxEnterpriseId
)
;
OpenQwAccountInfoVO
vo
=
this
.
getCheckInfo
(
wxEnterpriseId
,
enterpriseId
)
;
if
(
vo
.
getStatus
()
==
1
)
{
return
null
;
}
return
null
;
return
null
;
}
}
private
OpenQwAccountInfoVO
getCheckInfo
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
OpenQwAccountInfoVO
vo
=
new
OpenQwAccountInfoVO
();
ServiceResponse
<
EnterpriseUsingPermissionDto
>
resp
=
this
.
enterpriseUseForbidService
.
getWxEnterpriseService
(
enterpriseId
,
wxEnterpriseId
);
log
.
info
(
"托管许可={}"
,
JSONObject
.
toJSONString
(
resp
));
if
(
resp
.
isSuccess
())
{
EnterpriseUsingPermissionDto
dto
=
resp
.
getResult
();
if
(
null
==
dto
)
{
vo
.
setStatus
(
0
);
}
else
{
vo
.
setExpireDate
(
dto
.
getServiceEndDate
());
vo
.
setStatus
(
1
);
if
(
dto
.
getServiceEndDate
().
before
(
new
Date
()))
{
vo
.
setStatus
(
2
);
}
String
json
=
dto
.
getModuleSetting
();
WechatWorkServiceSetting
bo
=
JSONObject
.
parseObject
(
json
,
WechatWorkServiceSetting
.
class
);
vo
.
setGiceTotal
(
bo
.
getAccountNumber
());
}
}
log
.
info
(
"OpenQwAccountInfoVO={}"
,
JSONObject
.
toJSONString
(
vo
));
return
vo
;
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/open/QywxOpenTaskController.java
View file @
54a88416
...
@@ -399,8 +399,8 @@ public class QywxOpenTaskController {
...
@@ -399,8 +399,8 @@ public class QywxOpenTaskController {
logContent3
=
this
.
addListForLog
(
n1
,
n2
,
n3
);
logContent3
=
this
.
addListForLog
(
n1
,
n2
,
n3
);
}
}
String
logContent4
=
this
.
storeLog
(
oldDTO
.
getMainStoreJson
(),
dto
.
getMainStoreJson
(),
"服务门店"
);
String
logContent4
=
this
.
storeLog
(
oldDTO
.
getMainStoreJson
(),
dto
.
getMainStoreJson
(),
"服务门店"
);
String
logContent5
=
this
.
storeLog
(
oldDTO
.
get
MainStoreJson
(),
dto
.
getMain
StoreJson
(),
"协管门店"
);
String
logContent5
=
this
.
storeLog
(
oldDTO
.
get
OtherStoreJson
(),
dto
.
getOther
StoreJson
(),
"协管门店"
);
String
logContent6
=
this
.
storeLog
(
oldDTO
.
get
MainStoreJson
(),
dto
.
getMai
nStoreJson
(),
"指定门店"
);
String
logContent6
=
this
.
storeLog
(
oldDTO
.
get
AssignStoreJson
(),
dto
.
getAssig
nStoreJson
(),
"指定门店"
);
String
logContent
=
this
.
addListForLog
(
logContent1
,
logContent2
,
logContent3
,
logContent4
,
logContent5
,
logContent6
);
String
logContent
=
this
.
addListForLog
(
logContent1
,
logContent2
,
logContent3
,
logContent4
,
logContent5
,
logContent6
);
if
(
StringUtils
.
isNotBlank
(
logContent
))
{
if
(
StringUtils
.
isNotBlank
(
logContent
))
{
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/open/OpenQwAccountInfoVO.java
0 → 100644
View file @
54a88416
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
open
;
import
com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 托管账号信息
*/
public
class
OpenQwAccountInfoVO
extends
OpenStaffLicenseDTO
implements
Serializable
{
// 0为购买 1已购买且有效 2已过期
private
int
status
;
/**
* 到期时间
*/
private
Date
expireDate
;
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
Date
getExpireDate
()
{
return
expireDate
;
}
public
void
setExpireDate
(
Date
expireDate
)
{
this
.
expireDate
=
expireDate
;
}
}
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