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
6dc072e7
Commit
6dc072e7
authored
Nov 24, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
cfdb6129
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
20 deletions
+40
-20
DealSyncOperationApiService.java
...aoban/manage/api/service/DealSyncOperationApiService.java
+5
-2
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+13
-0
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+22
-18
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DealSyncOperationApiService.java
View file @
6dc072e7
...
@@ -150,6 +150,9 @@ public interface DealSyncOperationApiService {
...
@@ -150,6 +150,9 @@ public interface DealSyncOperationApiService {
* @param wxEnterpriseId
* @param wxEnterpriseId
*/
*/
public
void
dealWxFriendClerkSingle
(
String
taskId
,
String
wxUserId
,
String
staffId
,
String
wxEnterpriseId
);
public
void
dealWxFriendClerkSingle
(
String
taskId
,
String
wxUserId
,
String
staffId
,
String
wxEnterpriseId
);
/**
* 定时
* @param res
*/
public
void
quartWxFriendClerk
(
String
res
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
6dc072e7
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
...
@@ -688,4 +689,16 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
...
@@ -688,4 +689,16 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
HashSet
<
String
>
hashSet
=
(
HashSet
<
String
>)
dealLogList
.
stream
().
map
(
TabHaobanPreDealLog:
:
getDataId
).
collect
(
Collectors
.
toSet
());
HashSet
<
String
>
hashSet
=
(
HashSet
<
String
>)
dealLogList
.
stream
().
map
(
TabHaobanPreDealLog:
:
getDataId
).
collect
(
Collectors
.
toSet
());
dealDepartmentToMq
(
taskId
,
hashSet
,
SyncTaskStatusEnum
.
friend_clerk_sync
);
dealDepartmentToMq
(
taskId
,
hashSet
,
SyncTaskStatusEnum
.
friend_clerk_sync
);
}
}
@Override
public
void
quartWxFriendClerk
(
String
res
)
{
if
(
StringUtils
.
isNotBlank
(
res
)){
JSONObject
json
=
JSON
.
parseObject
(
res
);
String
taskId
=
json
.
getString
(
"taskId"
);
String
wxEnterpriseId
=
json
.
getString
(
"wxEnterpriseId"
);
dealWxFriendClerk
(
taskId
,
wxEnterpriseId
);
}
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
6dc072e7
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.controller;
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.controller;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.enterprise.api.dto.EnterpriseAndUserDTO
;
import
com.gic.enterprise.api.dto.EnterpriseAndUserDTO
;
...
@@ -535,23 +536,26 @@ public class WxEnterpriseController extends WebBaseController{
...
@@ -535,23 +536,26 @@ public class WxEnterpriseController extends WebBaseController{
if
(
StringUtils
.
isEmpty
(
taskId
)){
if
(
StringUtils
.
isEmpty
(
taskId
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_100021
);
return
resultResponse
(
HaoBanErrCode
.
ERR_100021
);
}
}
// QuartzTaskDTO taskDTO = buildQuartzTaskDTO("haoban-enterprise-fresh-wx-friend");
QuartzTaskDTO
taskDTO
=
buildQuartzTaskDTO
(
"haoban-enterprise-fresh-wx-friend"
);
// taskDTO.setTaskParam("");
JSONObject
json
=
new
JSONObject
();
// taskDTO.setTaskStatus(1);
json
.
put
(
"taskId"
,
taskId
);
// Date now = new Date();
json
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
// Date exeDate = DateUtil.addDay(now, 1);
taskDTO
.
setTaskParam
(
json
.
toJSONString
());
// Calendar ca = Calendar.getInstance();
taskDTO
.
setTaskStatus
(
1
);
// ca.setTime(exeDate);
Date
now
=
new
Date
();
// int day = ca.get(Calendar.DAY_OF_MONTH);//第几天
Date
exeDate
=
DateUtil
.
addDay
(
now
,
1
);
// int month = ca.get(Calendar.MONTH);//第几个月
Calendar
ca
=
Calendar
.
getInstance
();
// int year = ca.get(Calendar.YEAR);//年份数值
ca
.
setTime
(
now
);
// int hour = ca.get(Calendar.HOUR);//
int
day
=
ca
.
get
(
Calendar
.
DAY_OF_MONTH
);
//第几天
// int minute = ca.get(Calendar.MINUTE);//
int
month
=
ca
.
get
(
Calendar
.
MONTH
);
//第几个月
// int second = ca.get(Calendar.SECOND);//
int
year
=
ca
.
get
(
Calendar
.
YEAR
);
//年份数值
// String con = second + " " + minute + " " + hour + " " + day + " " + month +" " + year;
int
hour
=
ca
.
get
(
Calendar
.
HOUR
);
//
// taskDTO.setTaskTimeInfo(con);
int
minute
=
ca
.
get
(
Calendar
.
MINUTE
);
//
// quartzService.addOrUpdateQuartzTask(taskDTO);
int
second
=
ca
.
get
(
Calendar
.
SECOND
);
//
dealSyncOperationApiService
.
dealWxFriendClerk
(
taskId
,
wxEnterpriseId
);
String
con
=
second
+
" "
+
minute
+
" "
+
hour
+
" "
+
day
+
" "
+
month
+
" "
+
year
;
taskDTO
.
setTaskTimeInfo
(
con
);
quartzService
.
addOrUpdateQuartzTask
(
taskDTO
);
// dealSyncOperationApiService.dealWxFriendClerk(taskId, wxEnterpriseId);
RedisUtil
.
setCache
(
dayKey
,
dayCount
+
1
);
RedisUtil
.
setCache
(
dayKey
,
dayCount
+
1
);
RedisUtil
.
setCache
(
monthKey
,
monthCount
+
1
);
RedisUtil
.
setCache
(
monthKey
,
monthCount
+
1
);
RedisUtil
.
setCache
(
dateKey
,
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
));
RedisUtil
.
setCache
(
dateKey
,
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
));
...
@@ -561,7 +565,7 @@ public class WxEnterpriseController extends WebBaseController{
...
@@ -561,7 +565,7 @@ public class WxEnterpriseController extends WebBaseController{
private
QuartzTaskDTO
buildQuartzTaskDTO
(
String
id
)
{
private
QuartzTaskDTO
buildQuartzTaskDTO
(
String
id
)
{
QuartzTaskDTO
taskDTO
=
new
QuartzTaskDTO
();
QuartzTaskDTO
taskDTO
=
new
QuartzTaskDTO
();
taskDTO
.
setReferId
(
id
);
taskDTO
.
setReferId
(
id
);
taskDTO
.
setTaskMethod
(
"
deal
WxFriendClerk"
);
taskDTO
.
setTaskMethod
(
"
quart
WxFriendClerk"
);
taskDTO
.
setTaskService
(
"com.gic.haoban.manage.api.service.DealSyncOperationApiService"
);
taskDTO
.
setTaskService
(
"com.gic.haoban.manage.api.service.DealSyncOperationApiService"
);
return
taskDTO
;
return
taskDTO
;
}
}
...
...
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