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
7616f1fb
Commit
7616f1fb
authored
Dec 30, 2021
by
墨竹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-daiban-12-14' into developer
parents
5b086c29
6e3d948f
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
290 additions
and
46 deletions
+290
-46
PendingTaskDetailDTO.java
...aoban/manage/api/dto/notify/dto/PendingTaskDetailDTO.java
+26
-0
NoticeMessageQDTO.java
.../haoban/manage/api/dto/notify/qdto/NoticeMessageQDTO.java
+23
-0
PendingTaskQDTO.java
...ic/haoban/manage/api/dto/notify/qdto/PendingTaskQDTO.java
+43
-2
NoticeMessageTypeEnum.java
...om/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
+1
-0
PendingStatusFlagEnum.java
...om/gic/haoban/manage/api/enums/PendingStatusFlagEnum.java
+3
-2
PendingTaskApiService.java
...oban/manage/api/service/notify/PendingTaskApiService.java
+19
-1
NoticeMessageUtil.java
.../gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
+40
-0
TabPendingTask.java
.../com/gic/haoban/manage/service/entity/TabPendingTask.java
+12
-0
PendingTaskBO.java
.../com/gic/haoban/manage/service/pojo/bo/PendingTaskBO.java
+13
-0
PendingTaskApiServiceImpl.java
...service/service/notify/out/PendingTaskApiServiceImpl.java
+37
-3
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+35
-24
FriendSyncNewOperation.java
...an/manage/service/task/friend/FriendSyncNewOperation.java
+0
-1
PendingTaskMapper.xml
...3-service/src/main/resources/mapper/PendingTaskMapper.xml
+12
-1
test.java
haoban-manage3-service/src/test/java/test.java
+6
-4
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+15
-0
WebBaseController.java
...m/gic/haoban/manage/web/controller/WebBaseController.java
+5
-8
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/notify/dto/PendingTaskDetailDTO.java
View file @
7616f1fb
...
@@ -24,6 +24,12 @@ public class PendingTaskDetailDTO implements Serializable {
...
@@ -24,6 +24,12 @@ public class PendingTaskDetailDTO implements Serializable {
private
String
relationId
;
private
String
relationId
;
/**
/**
* 业务字段
*/
private
String
businessId
;
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
*/
*/
private
Integer
taskType
;
private
Integer
taskType
;
...
@@ -42,6 +48,10 @@ public class PendingTaskDetailDTO implements Serializable {
...
@@ -42,6 +48,10 @@ public class PendingTaskDetailDTO implements Serializable {
* 逾期时间
* 逾期时间
*/
*/
private
Date
overdueTime
;
private
Date
overdueTime
;
/**
* 失效时间
*/
private
Date
invalidTime
;
/**
/**
* 门店id
* 门店id
...
@@ -77,6 +87,22 @@ public class PendingTaskDetailDTO implements Serializable {
...
@@ -77,6 +87,22 @@ public class PendingTaskDetailDTO implements Serializable {
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
Date
getInvalidTime
()
{
return
invalidTime
;
}
public
void
setInvalidTime
(
Date
invalidTime
)
{
this
.
invalidTime
=
invalidTime
;
}
public
String
getBusinessId
()
{
return
businessId
;
}
public
void
setBusinessId
(
String
businessId
)
{
this
.
businessId
=
businessId
;
}
public
String
getExtendContent
()
{
public
String
getExtendContent
()
{
return
extendContent
;
return
extendContent
;
}
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/notify/qdto/NoticeMessageQDTO.java
View file @
7616f1fb
...
@@ -17,6 +17,29 @@ public class NoticeMessageQDTO implements Serializable {
...
@@ -17,6 +17,29 @@ public class NoticeMessageQDTO implements Serializable {
private
int
messageType
;
private
int
messageType
;
private
String
templateCode
;
private
String
templateCode
;
private
Map
<
String
,
String
>
contentMap
;
private
Map
<
String
,
String
>
contentMap
;
public
NoticeMessageQDTO
()
{
}
/**
* 发送队列需要序列化的字段
*
* @param enterpriseId
* @param clerkId
* @param optTargetId
* @param messageType
* @param contentMap
* @param extendContent
*/
public
NoticeMessageQDTO
(
String
enterpriseId
,
String
clerkId
,
String
optTargetId
,
int
messageType
,
Map
<
String
,
String
>
contentMap
,
Map
<
String
,
Object
>
extendContent
)
{
this
.
enterpriseId
=
enterpriseId
;
this
.
clerkId
=
clerkId
;
this
.
optTargetId
=
optTargetId
;
this
.
messageType
=
messageType
;
this
.
contentMap
=
contentMap
;
this
.
extendContent
=
extendContent
;
}
/**
/**
* 拓展内容
* 拓展内容
*/
*/
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/notify/qdto/PendingTaskQDTO.java
View file @
7616f1fb
...
@@ -23,14 +23,20 @@ public class PendingTaskQDTO implements Serializable {
...
@@ -23,14 +23,20 @@ public class PendingTaskQDTO implements Serializable {
*/
*/
private
String
relationId
;
private
String
relationId
;
/**
* 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid;月指标-1
*/
private
String
businessId
;
/**
/**
* NoticeMessageTypeEnum
* NoticeMessageTypeEnum
* 0-
不良评价回访
1-ecm话务任务 ,3群发任务 4活动
* 0-
月指标
1-ecm话务任务 ,3群发任务 4活动
*/
*/
private
Integer
taskType
;
private
Integer
taskType
;
/**
/**
*
*
标题
*/
*/
private
String
title
;
private
String
title
;
...
@@ -60,11 +66,46 @@ public class PendingTaskQDTO implements Serializable {
...
@@ -60,11 +66,46 @@ public class PendingTaskQDTO implements Serializable {
*/
*/
private
String
clerkId
;
private
String
clerkId
;
public
PendingTaskQDTO
()
{
}
/**
* @param enterpriseId 企业id
* @param relationId 关联id relation解释
* @param businessId 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid;月指标-1
* @param taskType 任务类型
* @param title 标题
* @param description 描述
* @param overdueTime 逾期时间
* @param invalidTime 失效时间
* @param storeId 门店id
* @param clerkId 导购id
*/
public
PendingTaskQDTO
(
String
enterpriseId
,
String
relationId
,
String
businessId
,
Integer
taskType
,
String
title
,
String
description
,
Date
overdueTime
,
Date
invalidTime
,
String
storeId
,
String
clerkId
)
{
this
.
enterpriseId
=
enterpriseId
;
this
.
relationId
=
relationId
;
this
.
businessId
=
businessId
;
this
.
taskType
=
taskType
;
this
.
title
=
title
;
this
.
description
=
description
;
this
.
overdueTime
=
overdueTime
;
this
.
invalidTime
=
invalidTime
;
this
.
storeId
=
storeId
;
this
.
clerkId
=
clerkId
;
}
/**
/**
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getBusinessId
()
{
return
businessId
;
}
public
void
setBusinessId
(
String
businessId
)
{
this
.
businessId
=
businessId
;
}
public
String
getEnterpriseId
()
{
public
String
getEnterpriseId
()
{
return
enterpriseId
;
return
enterpriseId
;
}
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
View file @
7616f1fb
...
@@ -29,6 +29,7 @@ public enum NoticeMessageTypeEnum {
...
@@ -29,6 +29,7 @@ public enum NoticeMessageTypeEnum {
STORE_ACCOUNT
(
3001
,
"门店账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_ACCOUNT
(
3001
,
"门店账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
MEMBER_FACE
(
3002
,
"门店账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"member_face"
,
"/pages/route/index?pageType="
,
"hbapp_customer_edit_tag"
),
STORE_ACCOUNT_REFUSE
(
3010
,
"门店账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_ACCOUNT_REFUSE
(
3010
,
"门店账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_ACCOUNT_AGREE
(
3011
,
"门店账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_ACCOUNT_AGREE
(
3011
,
"门店账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/PendingStatusFlagEnum.java
View file @
7616f1fb
...
@@ -5,8 +5,9 @@ package com.gic.haoban.manage.api.enums;
...
@@ -5,8 +5,9 @@ package com.gic.haoban.manage.api.enums;
*/
*/
public
enum
PendingStatusFlagEnum
{
public
enum
PendingStatusFlagEnum
{
NORMAL
(
1
,
"正常"
),
NORMAL
(
1
,
"正常"
),
OVERDUE
(
2
,
"逾期"
),
PRE_OVERDUE
(
2
,
"逾期"
),
INVALID
(
3
,
"逾期失效"
);
OVERDUE
(
3
,
"逾期"
),
PRE_INVALID
(
4
,
"即将失效"
);
private
int
type
;
private
int
type
;
private
String
name
;
private
String
name
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/notify/PendingTaskApiService.java
View file @
7616f1fb
...
@@ -7,6 +7,7 @@ import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDetailDTO;
...
@@ -7,6 +7,7 @@ import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDetailDTO;
import
com.gic.haoban.manage.api.dto.notify.qdto.PendingListQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.PendingListQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.PendingTaskQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.PendingTaskQDTO
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -20,7 +21,7 @@ public interface PendingTaskApiService {
...
@@ -20,7 +21,7 @@ public interface PendingTaskApiService {
*
*
* @param qdto
* @param qdto
*/
*/
public
void
addPendingTask
(
PendingTaskQDTO
qdto
);
public
ServiceResponse
<
Boolean
>
addPendingTask
(
PendingTaskQDTO
qdto
);
/**
/**
* 待办列表查询分页
* 待办列表查询分页
...
@@ -74,4 +75,21 @@ public interface PendingTaskApiService {
...
@@ -74,4 +75,21 @@ public interface PendingTaskApiService {
*/
*/
public
ServiceResponse
<
Boolean
>
deletePendingTask
(
List
<
String
>
relationIds
);
public
ServiceResponse
<
Boolean
>
deletePendingTask
(
List
<
String
>
relationIds
);
/**
* 删除执行人
*
* @param relationId
* @return
*/
public
ServiceResponse
<
Boolean
>
deletePendingTaskByRelationId
(
String
relationId
);
/**
* 更新失效或者结束时间
*
* @param relationId
* @param endTime
* @return
*/
public
ServiceResponse
<
Boolean
>
updateInvalidTime
(
String
relationId
,
Date
endTime
);
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
View file @
7616f1fb
...
@@ -5,9 +5,12 @@ import com.gic.commons.util.GICMQClientUtil;
...
@@ -5,9 +5,12 @@ import com.gic.commons.util.GICMQClientUtil;
import
com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
...
@@ -58,6 +61,43 @@ public class NoticeMessageUtil {
...
@@ -58,6 +61,43 @@ public class NoticeMessageUtil {
}
}
}
}
/**
* 发送消息
*
* @param list
*/
public
static
void
sendNoticeMessageBatch
(
List
<
NoticeMessageQDTO
>
list
)
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
logger
.
info
(
"没有哦需要发送的消息"
);
return
;
}
List
<
String
>
ret
=
new
ArrayList
<
String
>();
for
(
NoticeMessageQDTO
noticeMessageQDTO
:
list
)
{
String
retStr
=
JSONObject
.
toJSONString
(
noticeMessageQDTO
);
if
(
StringUtils
.
isAnyBlank
(
noticeMessageQDTO
.
getEnterpriseId
(),
noticeMessageQDTO
.
getClerkId
()))
{
logger
.
info
(
"参数不存在:{}"
,
retStr
);
throw
new
RuntimeException
(
"必传参数没传:"
+
noticeMessageQDTO
.
getClerkId
());
}
NoticeMessageTypeEnum
messageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
noticeMessageQDTO
.
getMessageType
());
if
(
messageTypeEnum
==
null
)
{
logger
.
info
(
"类型不存在:{}"
,
retStr
);
throw
new
RuntimeException
(
"消息类型不存在"
);
}
ret
.
add
(
retStr
);
logger
.
info
(
"发送消息单条:{}"
,
retStr
);
}
logger
.
info
(
"批量发送消息:{}"
,
ret
.
size
());
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
clientInstance
.
sendBatchMessages
(
NOTICE_MESSAGE
,
ret
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送消息异常:{}"
,
e
);
}
}
/**
/**
* 发送消息 使用staffId发送
* 发送消息 使用staffId发送
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabPendingTask.java
View file @
7616f1fb
...
@@ -25,6 +25,10 @@ public class TabPendingTask implements Serializable {
...
@@ -25,6 +25,10 @@ public class TabPendingTask implements Serializable {
* 关联id 对应task_type
* 关联id 对应task_type
*/
*/
private
String
relationId
;
private
String
relationId
;
/**
* 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid
*/
private
String
businessId
;
/**
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
...
@@ -136,6 +140,14 @@ public class TabPendingTask implements Serializable {
...
@@ -136,6 +140,14 @@ public class TabPendingTask implements Serializable {
this
.
enterpriseId
=
enterpriseId
;
this
.
enterpriseId
=
enterpriseId
;
}
}
public
String
getBusinessId
()
{
return
businessId
;
}
public
void
setBusinessId
(
String
businessId
)
{
this
.
businessId
=
businessId
;
}
/**
/**
* This method returns the value of the database column tab_haoban_pending_task.relation_id
* This method returns the value of the database column tab_haoban_pending_task.relation_id
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/PendingTaskBO.java
View file @
7616f1fb
...
@@ -27,6 +27,11 @@ public class PendingTaskBO implements Serializable {
...
@@ -27,6 +27,11 @@ public class PendingTaskBO implements Serializable {
private
String
relationId
;
private
String
relationId
;
/**
/**
* 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid
*/
private
String
businessId
;
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
*/
*/
private
Integer
taskType
;
private
Integer
taskType
;
...
@@ -100,6 +105,14 @@ public class PendingTaskBO implements Serializable {
...
@@ -100,6 +105,14 @@ public class PendingTaskBO implements Serializable {
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getBusinessId
()
{
return
businessId
;
}
public
void
setBusinessId
(
String
businessId
)
{
this
.
businessId
=
businessId
;
}
public
Long
getPendingTaskId
()
{
public
Long
getPendingTaskId
()
{
return
pendingTaskId
;
return
pendingTaskId
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/PendingTaskApiServiceImpl.java
View file @
7616f1fb
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
notify
.
out
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
notify
.
out
;
import
cn.hutool.core.date.DateUtil
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
...
@@ -14,10 +15,12 @@ import com.gic.haoban.manage.api.service.notify.PendingTaskApiService;
...
@@ -14,10 +15,12 @@ import com.gic.haoban.manage.api.service.notify.PendingTaskApiService;
import
com.gic.haoban.manage.service.pojo.bo.PendingTaskBO
;
import
com.gic.haoban.manage.service.pojo.bo.PendingTaskBO
;
import
com.gic.haoban.manage.service.service.notify.PendingTaskService
;
import
com.gic.haoban.manage.service.service.notify.PendingTaskService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
...
@@ -35,9 +38,10 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
...
@@ -35,9 +38,10 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
private
PendingTaskService
pendingTaskService
;
private
PendingTaskService
pendingTaskService
;
@Override
@Override
public
void
addPendingTask
(
PendingTaskQDTO
qdto
)
{
public
ServiceResponse
<
Boolean
>
addPendingTask
(
PendingTaskQDTO
qdto
)
{
//新增待办 todo 后续优化以及完善
//新增待办 todo 后续优化以及完善
pendingTaskService
.
addOrUpdatePendingTask
(
EntityUtil
.
changeEntityByOrika
(
PendingTaskBO
.
class
,
qdto
));
pendingTaskService
.
addOrUpdatePendingTask
(
EntityUtil
.
changeEntityByOrika
(
PendingTaskBO
.
class
,
qdto
));
return
ServiceResponse
.
success
(
true
);
}
}
...
@@ -61,7 +65,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
...
@@ -61,7 +65,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
* @param list
* @param list
*/
*/
private
void
buildPending
(
List
<
PendingTaskDetailDTO
>
list
)
{
private
void
buildPending
(
List
<
PendingTaskDetailDTO
>
list
)
{
Date
currentDate
=
new
Date
();
String
pattern
=
".*([0-9]{6}).*"
;
String
pattern
=
".*([0-9]{6}).*"
;
list
.
forEach
(
dto
->
{
list
.
forEach
(
dto
->
{
String
title
=
dto
.
getTitle
();
String
title
=
dto
.
getTitle
();
...
@@ -70,7 +74,17 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
...
@@ -70,7 +74,17 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
return
;
return
;
}
}
dto
.
setDescription
(
taskTypeEnum
.
getDescription
().
replace
(
"{}"
,
title
));
dto
.
setDescription
(
taskTypeEnum
.
getDescription
().
replace
(
"{}"
,
title
));
dto
.
setStatusFlag
(
dto
.
getOverdueFlag
()
==
1
?
PendingStatusFlagEnum
.
OVERDUE
.
getType
()
:
PendingStatusFlagEnum
.
NORMAL
.
getType
());
long
betweenOverdueDay
=
dto
.
getOverdueTime
()
!=
null
?
DateUtil
.
betweenDay
(
currentDate
,
dto
.
getOverdueTime
(),
true
)
:
-
1
;
long
betweenInvalidDay
=
dto
.
getInvalidTime
()
!=
null
?
DateUtil
.
betweenDay
(
currentDate
,
dto
.
getInvalidTime
(),
true
)
:
-
1
;
if
(
betweenInvalidDay
==
1
||
betweenInvalidDay
==
0
)
{
dto
.
setStatusFlag
(
PendingStatusFlagEnum
.
PRE_INVALID
.
getType
());
}
else
if
(
betweenOverdueDay
==
0
||
betweenOverdueDay
==
1
)
{
dto
.
setStatusFlag
(
dto
.
getOverdueFlag
()
==
1
?
PendingStatusFlagEnum
.
OVERDUE
.
getType
()
:
PendingStatusFlagEnum
.
PRE_INVALID
.
getType
());
}
else
{
dto
.
setStatusFlag
(
PendingStatusFlagEnum
.
NORMAL
.
getType
());
}
dto
.
setTitle
(
taskTypeEnum
.
getName
());
dto
.
setTitle
(
taskTypeEnum
.
getName
());
if
(
dto
.
getTaskType
()
==
PendingTaskTypeEnum
.
PERFORMANCE
.
getType
())
{
if
(
dto
.
getTaskType
()
==
PendingTaskTypeEnum
.
PERFORMANCE
.
getType
())
{
...
@@ -132,4 +146,24 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
...
@@ -132,4 +146,24 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
boolean
b
=
pendingTaskService
.
deletePendingTask
(
relationIds
);
boolean
b
=
pendingTaskService
.
deletePendingTask
(
relationIds
);
return
ServiceResponse
.
success
(
b
);
return
ServiceResponse
.
success
(
b
);
}
}
@Override
public
ServiceResponse
<
Boolean
>
deletePendingTaskByRelationId
(
String
relationId
)
{
if
(
StringUtils
.
isBlank
(
relationId
))
{
return
ServiceResponse
.
success
();
}
List
<
String
>
relationIds
=
new
ArrayList
<
String
>();
relationIds
.
add
(
relationId
);
boolean
b
=
pendingTaskService
.
deletePendingTask
(
relationIds
);
return
ServiceResponse
.
success
(
b
);
}
@Override
public
ServiceResponse
<
Boolean
>
updateInvalidTime
(
String
relationId
,
Date
endTime
)
{
PendingTaskBO
pendingTaskBO
=
new
PendingTaskBO
();
pendingTaskBO
.
setRelationId
(
relationId
);
pendingTaskBO
.
setInvalidTime
(
endTime
);
boolean
b
=
pendingTaskService
.
addOrUpdatePendingTask
(
pendingTaskBO
);
return
ServiceResponse
.
success
(
b
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
7616f1fb
...
@@ -11,8 +11,10 @@ import com.gic.haoban.base.api.common.Constant;
...
@@ -11,8 +11,10 @@ import com.gic.haoban.base.api.common.Constant;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.AppPageType
;
import
com.gic.haoban.manage.api.enums.AppPageType
;
import
com.gic.haoban.manage.api.enums.GicDataType
;
import
com.gic.haoban.manage.api.enums.GicDataType
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.WxEditType
;
import
com.gic.haoban.manage.api.enums.WxEditType
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
...
@@ -472,8 +474,8 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -472,8 +474,8 @@ public class MessageApiServiceImpl implements MessageApiService {
jsonObject
.
put
(
"memberId"
,
memberId
);
jsonObject
.
put
(
"memberId"
,
memberId
);
jsonObject
.
put
(
"storeId"
,
storeId
);
jsonObject
.
put
(
"storeId"
,
storeId
);
jsonObject
.
put
(
"currentTab"
,
1
);
jsonObject
.
put
(
"currentTab"
,
1
);
String
data
=
jsonObject
.
toJSONString
();
//
String data = jsonObject.toJSONString();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
PERFECT_TAG
.
getCode
(),
data
);
//
String pageUrl = staffDepartmentRelatedApiService.getPageUrl(AppPageType.PERFECT_TAG.getCode(), data);
StaffClerkRelationDTO
relation
=
staffClerkRelationApiService
.
getByClerkId
(
clerkId
);
StaffClerkRelationDTO
relation
=
staffClerkRelationApiService
.
getByClerkId
(
clerkId
);
if
(
relation
==
null
)
{
if
(
relation
==
null
)
{
log
.
info
(
"clerkId未绑定:clerkId={}"
,
clerkId
);
log
.
info
(
"clerkId未绑定:clerkId={}"
,
clerkId
);
...
@@ -488,28 +490,37 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -488,28 +490,37 @@ public class MessageApiServiceImpl implements MessageApiService {
if
(
staffDTO
==
null
)
{
if
(
staffDTO
==
null
)
{
return
false
;
return
false
;
}
}
String
corpId
=
wxEnterprise
.
getCorpid
();
// String corpId = wxEnterprise.getCorpid();
String
wxUserId
=
""
;
// String wxUserId = "";
if
(
corpId
.
length
()
>
20
)
{
// if (corpId.length() > 20) {
wxUserId
=
staffDTO
.
getWxOpenUseId
();
// wxUserId = staffDTO.getWxOpenUseId();
}
else
{
// } else {
wxUserId
=
staffDTO
.
getWxUserId
();
// wxUserId = staffDTO.getWxUserId();
}
// }
QywxXcxSendMessageDTO
messageDTO
=
new
QywxXcxSendMessageDTO
();
// QywxXcxSendMessageDTO messageDTO = new QywxXcxSendMessageDTO();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
// Map<String, String> map = new HashMap<>();
map
.
put
(
"事件"
,
"会员完善标签"
);
// map.put("事件", "会员完善标签");
map
.
put
(
"会员"
,
memberName
);
// map.put("会员", memberName);
map
.
put
(
"消费订单"
,
orderId
);
// map.put("消费订单", orderId);
map
.
put
(
"消费时间"
,
customerTime
);
// map.put("消费时间", customerTime);
List
<
ItemDTO
>
items
=
getItemsList
(
map
);
// List<ItemDTO> items = getItemsList(map);
ArrayList
<
String
>
list
=
new
ArrayList
<>();
// ArrayList<String> list = new ArrayList<>();
list
.
add
(
wxUserId
);
// list.add(wxUserId);
messageDTO
.
setAppid
(
config
.
getAppid
());
// messageDTO.setAppid(config.getAppid());
messageDTO
.
setUserIds
(
list
);
// messageDTO.setUserIds(list);
messageDTO
.
setPage
(
pageUrl
);
// messageDTO.setPage(pageUrl);
messageDTO
.
setTitle
(
"我的顾客通知"
);
// messageDTO.setTitle("我的顾客通知");
messageDTO
.
setItems
(
items
);
// messageDTO.setItems(items);
return
qywxSuiteApiService
.
sendMessage
(
wxEnterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
messageDTO
);
//
// return qywxSuiteApiService.sendMessage(wxEnterprise.getCorpid(), config.getWxSuiteid(), messageDTO);
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"memberName"
,
memberName
);
params
.
put
(
"orderId"
,
orderId
);
params
.
put
(
"customerTime"
,
customerTime
);
NoticeMessageUtil
.
sendNoticeMessage
(
relation
.
getEnterpriseId
(),
relation
.
getClerkId
(),
NoticeMessageTypeEnum
.
MEMBER_FACE
.
getType
(),
null
,
params
,
jsonObject
);
return
true
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/friend/FriendSyncNewOperation.java
View file @
7616f1fb
...
@@ -167,7 +167,6 @@ public class FriendSyncNewOperation implements BaseSyncOperation {
...
@@ -167,7 +167,6 @@ public class FriendSyncNewOperation implements BaseSyncOperation {
private
String
dealMerge
(
ExternalUserDTO
externalUserDTO
,
TabHaobanPreDealLog
dataPre
)
{
private
String
dealMerge
(
ExternalUserDTO
externalUserDTO
,
TabHaobanPreDealLog
dataPre
)
{
String
wxEnterpriseId
=
dataPre
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
dataPre
.
getWxEnterpriseId
();
String
wxUserId
=
dataPre
.
getpDataId
();
String
wxUserId
=
dataPre
.
getpDataId
();
String
taskId
=
dataPre
.
getTaskId
();
if
(
externalUserDTO
.
getFriendType
()
==
2
)
{
if
(
externalUserDTO
.
getFriendType
()
==
2
)
{
return
"不是微信好友,是企业微信好友:"
+
externalUserDTO
.
getFriendType
();
return
"不是微信好友,是企业微信好友:"
+
externalUserDTO
.
getFriendType
();
...
...
haoban-manage3-service/src/main/resources/mapper/PendingTaskMapper.xml
View file @
7616f1fb
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"task_type"
jdbcType=
"INTEGER"
property=
"taskType"
/>
<result
column=
"task_type"
jdbcType=
"INTEGER"
property=
"taskType"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
...
@@ -21,7 +22,7 @@
...
@@ -21,7 +22,7 @@
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, enterprise_id, relation
_id, task_type, title, description, task_status_flag,
id, enterprise_id, relation_id,business
_id, task_type, title, description, task_status_flag,
overdue_time, invalid_time, store_id, clerk_id, finish_time, finish_flag, overdue_flag,
overdue_time, invalid_time, store_id, clerk_id, finish_time, finish_flag, overdue_flag,
delete_flag, create_time, update_time
delete_flag, create_time, update_time
</sql>
</sql>
...
@@ -61,6 +62,9 @@
...
@@ -61,6 +62,9 @@
<if
test=
"relationId != null"
>
<if
test=
"relationId != null"
>
relation_id,
relation_id,
</if>
</if>
<if
test=
"businessId != null"
>
business_id,
</if>
<if
test=
"taskType != null"
>
<if
test=
"taskType != null"
>
task_type,
task_type,
</if>
</if>
...
@@ -114,6 +118,9 @@
...
@@ -114,6 +118,9 @@
<if
test=
"relationId != null"
>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
#{relationId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"businessId != null"
>
#{businessId,jdbcType=VARCHAR},
</if>
<if
test=
"taskType != null"
>
<if
test=
"taskType != null"
>
#{taskType,jdbcType=INTEGER},
#{taskType,jdbcType=INTEGER},
</if>
</if>
...
@@ -167,6 +174,9 @@
...
@@ -167,6 +174,9 @@
<if
test=
"relationId != null"
>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"businessId != null"
>
business_id = #{businessId,jdbcType=VARCHAR},
</if>
<if
test=
"taskType != null"
>
<if
test=
"taskType != null"
>
task_type = #{taskType,jdbcType=INTEGER},
task_type = #{taskType,jdbcType=INTEGER},
</if>
</if>
...
@@ -216,6 +226,7 @@
...
@@ -216,6 +226,7 @@
update tab_haoban_pending_task
update tab_haoban_pending_task
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
business_id = #{businessId,jdbcType=VARCHAR},
task_type = #{taskType,jdbcType=INTEGER},
task_type = #{taskType,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
...
...
haoban-manage3-service/src/test/java/test.java
View file @
7616f1fb
...
@@ -17,12 +17,14 @@ import org.apache.commons.lang3.time.DateUtils;
...
@@ -17,12 +17,14 @@ import org.apache.commons.lang3.time.DateUtils;
public
class
test
{
public
class
test
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
content
=
"测试模板#{test}"
;
Date
date
=
new
Date
()
;
String
test
=
"1test"
;
Date
tomrrow
=
DateUtils
.
addDays
(
date
,
1
)
;
String
replace
=
content
.
replaceAll
(
"\\#\\{"
+
test
+
"\\}"
,
"1111"
);
Date
yestory
=
DateUtils
.
addDays
(
date
,
-
1
);
System
.
out
.
println
(
replac
e
);
long
l
=
DateUtil
.
betweenDay
(
tomrrow
,
date
,
tru
e
);
long
l2
=
DateUtil
.
betweenDay
(
date
,
tomrrow
,
true
);
System
.
out
.
println
(
l
+
"="
+
l2
);
// String key = "3.2.1";
// String key = "3.2.1";
// String[] split = key.split(".");
// String[] split = key.split(".");
//
//
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
7616f1fb
...
@@ -10,6 +10,7 @@ import com.gic.clerk.api.service.ClerkNewService;
...
@@ -10,6 +10,7 @@ import com.gic.clerk.api.service.ClerkNewService;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
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.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
...
@@ -1257,4 +1258,18 @@ public class ClerkController extends WebBaseController {
...
@@ -1257,4 +1258,18 @@ public class ClerkController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
clerkList
.
size
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
clerkList
.
size
());
}
}
/**
* 根据员工id获取openId
*
* @return {@link RestResponse }
* @author mozhu
* @date 2021-12-29 10:42:24
*/
@RequestMapping
(
"getOpenIdByStaffId"
)
public
RestResponse
<
String
>
getOpenIdByStaffId
()
{
String
staffId
=
this
.
getLoginUser
().
getStaffId
();
String
openId
=
""
;
return
RestResponse
.
successResult
(
openId
);
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WebBaseController.java
View file @
7616f1fb
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
com.gic.haoban.auth.api.dto.DisplayRelationShortInfoDTO
;
import
com.gic.haoban.auth.api.dto.DisplayRelationShortInfoDTO
;
import
com.gic.haoban.auth.api.dto.UserRightDetailDTO
;
import
com.gic.haoban.common.utils.AuthRequestWellDoneUtil
;
import
com.gic.haoban.common.utils.AuthRequestUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
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.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -49,8 +49,8 @@ public class WebBaseController {
...
@@ -49,8 +49,8 @@ public class WebBaseController {
*
*
* @return
* @return
*/
*/
protected
UserRightDetail
DTO
getLoginUser
()
{
protected
WellDoneLogin
DTO
getLoginUser
()
{
return
(
UserRightDetailDTO
)
AuthRequestUtil
.
getSessio
nUser
();
return
(
WellDoneLoginDTO
)
AuthRequestWellDoneUtil
.
getLogi
nUser
();
}
}
public
boolean
haveRight
(
List
<
DisplayRelationShortInfoDTO
>
list
){
public
boolean
haveRight
(
List
<
DisplayRelationShortInfoDTO
>
list
){
...
@@ -71,9 +71,6 @@ public class WebBaseController {
...
@@ -71,9 +71,6 @@ public class WebBaseController {
clerkList
.
add
(
showDto
.
getClerkId
());
clerkList
.
add
(
showDto
.
getClerkId
());
}
}
}
}
if
(
CollectionUtils
.
isEmpty
(
groupList
)
&&
CollectionUtils
.
isEmpty
(
storeList
)
&&
CollectionUtils
.
isEmpty
(
clerkList
)){
return
!
CollectionUtils
.
isEmpty
(
groupList
)
||
!
CollectionUtils
.
isEmpty
(
storeList
)
||
!
CollectionUtils
.
isEmpty
(
clerkList
);
return
false
;
}
return
true
;
}
}
}
}
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