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
6d08431f
Commit
6d08431f
authored
Jun 13, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管
parent
f8a351c7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
274 additions
and
0 deletions
+274
-0
pom.xml
haoban-manage3-web/pom.xml
+5
-0
QywxOpenTaskController.java
...an/manage/web/controller/open/QywxOpenTaskController.java
+217
-0
AddTaskPageQO.java
...java/com/gic/haoban/manage/web/qo/open/AddTaskPageQO.java
+51
-0
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+1
-0
No files found.
haoban-manage3-web/pom.xml
View file @
6d08431f
...
...
@@ -38,6 +38,11 @@
<dependencies>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-task-manage-api
</artifactId>
<version>
${haoban-task-manage-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-common
</artifactId>
<version>
${haoban-common}
</version>
</dependency>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/open/QywxOpenTaskController.java
0 → 100644
View file @
6d08431f
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
open
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.web.qo.open.AddTaskPageQO
;
import
com.gic.haoban.manage.web.utils.CreatorUtils
;
import
com.gic.haoban.task.manage.api.dto.open.OpenQwAddTaskDTO
;
import
com.gic.haoban.task.manage.api.dto.open.OpenQwAddTaskSettingDTO
;
import
com.gic.haoban.task.manage.api.dto.open.OpenQwAutoSendDTO
;
import
com.gic.haoban.task.manage.api.dto.open.OpenQwDelTaskDTO
;
import
com.gic.haoban.task.manage.api.qdto.open.QwAddTaskPageQDTO
;
import
com.gic.haoban.task.manage.api.service.OpenQwApiService
;
import
org.apache.commons.collections.CollectionUtils
;
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
@RequestMapping
(
"/qw-open-task"
)
public
class
QywxOpenTaskController
{
@Autowired
private
OpenQwApiService
openQwApiService
;
/**
* 加好友任务列表
*/
@RequestMapping
(
"page-add-task"
)
public
RestResponse
<
Page
<
OpenQwAddTaskDTO
>>
pageAdTask
(
AddTaskPageQO
qo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
BasePageInfo
basePageInfo
=
new
BasePageInfo
()
;
basePageInfo
.
setPageNum
(
qo
.
getPageNum
());
basePageInfo
.
setPageSize
(
qo
.
getPageSize
());
QwAddTaskPageQDTO
qdto
=
EntityUtil
.
changeEntityByJSON
(
QwAddTaskPageQDTO
.
class
,
qo
)
;
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
qdto
.
setEnterpriseId
(
enterpriseId
);
// 创建人
List
<
String
>
creatorIdList
=
CreatorUtils
.
getCreatorIdList
(
0
);
if
(
CollectionUtils
.
isNotEmpty
(
creatorIdList
))
{
qdto
.
setCreatorIdList
(
creatorIdList
);
}
ServiceResponse
<
Page
<
OpenQwAddTaskDTO
>>
resp
=
this
.
openQwApiService
.
addTaskPage
(
qdto
,
basePageInfo
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 保存更新加好友任务
* @param dto
* @return
*/
@RequestMapping
(
"save-add-task"
)
public
RestResponse
<
OpenQwAddTaskDTO
>
saveAddTask
(
OpenQwAddTaskDTO
dto
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setEnterpriseId
(
enterpriseId
);
ServiceResponse
<
OpenQwAddTaskDTO
>
resp
=
this
.
openQwApiService
.
saveAddTask
(
dto
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 获取加好友任务详情
* @param addTaskId
* @return
*/
@RequestMapping
(
"get-add-task"
)
public
RestResponse
<
OpenQwAddTaskDTO
>
getAddTask
(
Long
addTaskId
)
{
ServiceResponse
<
OpenQwAddTaskDTO
>
resp
=
this
.
openQwApiService
.
getAddTask
(
addTaskId
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 终止加好友任务
* @param addTaskId
* @return
*/
@RequestMapping
(
"stop-add-task"
)
public
RestResponse
<
Void
>
stopAddTask
(
Long
addTaskId
)
{
ServiceResponse
<
Void
>
resp
=
this
.
openQwApiService
.
updateAddTaskStatus
(
addTaskId
,
1
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
()
;
}
/**
* 添加好友规则设置
* @return
*/
@RequestMapping
(
"get-add-task-setting"
)
public
RestResponse
<
OpenQwAddTaskSettingDTO
>
getTaskSetting
()
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
ServiceResponse
<
OpenQwAddTaskSettingDTO
>
resp
=
this
.
openQwApiService
.
geAddSetting
(
wxEnterpriseId
,
enterpriseId
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 保存添加好友规则配置
* @param dto
* @return
*/
@RequestMapping
(
"save-add-task-setting"
)
public
RestResponse
<
OpenQwAddTaskSettingDTO
>
saveTaskSetting
(
OpenQwAddTaskSettingDTO
dto
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setEnterpriseId
(
enterpriseId
);
ServiceResponse
<
OpenQwAddTaskSettingDTO
>
resp
=
this
.
openQwApiService
.
saveAddSetting
(
dto
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 删除好友配置
* @return
*/
@RequestMapping
(
"get-del-task-setting"
)
public
RestResponse
<
OpenQwDelTaskDTO
>
getDelTaskSetting
()
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
ServiceResponse
<
OpenQwDelTaskDTO
>
resp
=
this
.
openQwApiService
.
getDelTask
(
wxEnterpriseId
,
enterpriseId
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 保存删除好友配置
* @param dto
* @return
*/
@RequestMapping
(
"save-del-task-setting"
)
public
RestResponse
<
OpenQwDelTaskDTO
>
saveDelTaskSetting
(
OpenQwDelTaskDTO
dto
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setEnterpriseId
(
enterpriseId
);
ServiceResponse
<
OpenQwDelTaskDTO
>
resp
=
this
.
openQwApiService
.
saveDelTask
(
dto
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 任务自动执行配置
* @return
*/
@RequestMapping
(
"get-auto-send-task-setting"
)
public
RestResponse
<
OpenQwAutoSendDTO
>
getAutoSendTaskSetting
()
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
ServiceResponse
<
OpenQwAutoSendDTO
>
resp
=
this
.
openQwApiService
.
getAutoSend
(
wxEnterpriseId
,
enterpriseId
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
/**
* 保存任务自动执行配置
* @param dto
* @return
*/
@RequestMapping
(
"save-auto-send-task-setting"
)
public
RestResponse
<
OpenQwAutoSendDTO
>
saveAutoSendTaskSetting
(
OpenQwAutoSendDTO
dto
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setEnterpriseId
(
enterpriseId
);
ServiceResponse
<
OpenQwAutoSendDTO
>
resp
=
this
.
openQwApiService
.
saveAutoSend
(
dto
)
;
if
(!
resp
.
isSuccess
())
{
return
RestResponse
.
failure
(
"9999"
,
resp
.
getMessage
())
;
}
return
RestResponse
.
successResult
(
resp
.
getResult
())
;
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/open/AddTaskPageQO.java
0 → 100644
View file @
6d08431f
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
open
;
import
com.gic.api.base.commons.BasePageInfo
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
AddTaskPageQO
extends
BasePageInfo
implements
Serializable
{
// -1全部 0未开始 1进行中 2已结束
private
int
status
=
-
1
;
/**
* 任务名称或id
*/
private
String
search
;
private
Date
startDate
;
private
Date
endDate
;
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
String
getSearch
()
{
return
search
;
}
public
void
setSearch
(
String
search
)
{
this
.
search
=
search
;
}
public
Date
getStartDate
()
{
return
startDate
;
}
public
void
setStartDate
(
Date
startDate
)
{
this
.
startDate
=
startDate
;
}
public
Date
getEndDate
()
{
return
endDate
;
}
public
void
setEndDate
(
Date
endDate
)
{
this
.
endDate
=
endDate
;
}
}
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
6d08431f
...
...
@@ -14,6 +14,7 @@
<dubbo:application
name=
"haoban-manage3-web"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30009"
/>
<dubbo:reference
interface=
"com.gic.haoban.task.manage.api.service.OpenQwApiService"
id=
"openQwApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.OpenStaffApiService"
id=
"openStaffApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.WxEnterpriseActiveDataApiService"
id=
"wxEnterpriseActiveDataApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DownloadReportService"
id=
"downloadReportService"
timeout=
"10000"
/>
...
...
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