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
cc0157f5
Commit
cc0157f5
authored
Mar 24, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: stash
parent
a58a4b62
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
291 additions
and
2 deletions
+291
-2
HaobanClerkTypeEnum.java
.../com/gic/haoban/manage/api/enums/HaobanClerkTypeEnum.java
+36
-0
QywxGroupMsgTaskApiService.java
.../api/service/content/task/QywxGroupMsgTaskApiService.java
+15
-0
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+3
-0
WxEnterpriseMapper.java
.../haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
+8
-0
MaterialReportContext.java
...ervice/pojo/bo/content/context/MaterialReportContext.java
+17
-0
StaffClerkRelationService.java
...ban/manage/service/service/StaffClerkRelationService.java
+7
-0
WxEnterpriseService.java
...ic/haoban/manage/service/service/WxEnterpriseService.java
+7
-0
GroupMessageService.java
...n/manage/service/service/content/GroupMessageService.java
+5
-0
MaterialReportService.java
...manage/service/service/content/MaterialReportService.java
+17
-0
MaterialReportBuilder.java
...ervice/service/content/adaptor/MaterialReportBuilder.java
+16
-0
GroupMessageServiceImpl.java
...service/service/content/impl/GroupMessageServiceImpl.java
+9
-0
MaterialReportServiceImpl.java
...rvice/service/content/impl/MaterialReportServiceImpl.java
+75
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+11
-0
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+0
-1
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+16
-0
QywxGroupMsgTaskApiServiceImpl.java
...out/impl/content/task/QywxGroupMsgTaskApiServiceImpl.java
+30
-1
DrawImageUtils.java
...va/com/gic/haoban/manage/service/util/DrawImageUtils.java
+3
-0
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+6
-0
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+10
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/HaobanClerkTypeEnum.java
0 → 100644
View file @
cc0157f5
package
com
.
gic
.
haoban
.
manage
.
api
.
enums
;
/**
* @Author MUSI
* @Date 2023/3/24 5:17 PM
* @Description
* @Version
* 0:店员,1:店长,2:区经
**/
public
enum
HaobanClerkTypeEnum
{
;
HaobanClerkTypeEnum
(
Integer
type
,
String
desc
){
this
.
code
=
type
;
this
.
desc
=
desc
;
}
private
int
code
;
private
String
desc
;
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/content/task/QywxGroupMsgTaskApiService.java
View file @
cc0157f5
...
@@ -26,4 +26,19 @@ public interface QywxGroupMsgTaskApiService {
...
@@ -26,4 +26,19 @@ public interface QywxGroupMsgTaskApiService {
* @return
* @return
*/
*/
ServiceResponse
<
Void
>
handlerTriggerCustomerDetailLog
(
String
params
);
ServiceResponse
<
Void
>
handlerTriggerCustomerDetailLog
(
String
params
);
/**
* 素材周报
* @param params
* @return
*/
ServiceResponse
<
Void
>
handlerMaterialWeekReport
(
String
params
);
/**
* 素材月报
* @param params
* @return
*/
ServiceResponse
<
Void
>
handlerMaterialMonthReport
(
String
params
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
cc0157f5
...
@@ -119,4 +119,6 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -119,4 +119,6 @@ public interface TabHaobanStaffClerkRelationMapper {
List
<
StaffClerkRelationDTO
>
listManageBindByStaffId
(
@Param
(
"staffId"
)
String
staffId
);
List
<
StaffClerkRelationDTO
>
listManageBindByStaffId
(
@Param
(
"staffId"
)
String
staffId
);
List
<
StaffClerkRelationDTO
>
listByStoreIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
);
List
<
StaffClerkRelationDTO
>
listByStoreIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
);
List
<
StaffClerkRelationDTO
>
listAllRelationDtosByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
View file @
cc0157f5
...
@@ -68,4 +68,11 @@ public interface WxEnterpriseMapper {
...
@@ -68,4 +68,11 @@ public interface WxEnterpriseMapper {
*
*
*/
*/
List
<
WxEnterpriseDTO
>
listAllEnterprise
();
List
<
WxEnterpriseDTO
>
listAllEnterprise
();
/**
* 查询GIC企业下关联的所有企微
* @param enterpriseId
* @return
*/
List
<
String
>
queryWxEnterpriseByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/context/MaterialReportContext.java
0 → 100644
View file @
cc0157f5
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
.
bo
.
content
.
context
;
import
java.util.List
;
/**
* @Author MUSI
* @Date 2023/3/24 4:08 PM
* @Description
* @Version
* 好办 周报/月报 上下文
**/
public
class
MaterialReportContext
{
private
String
enterpriseId
;
private
List
<
String
>
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffClerkRelationService.java
View file @
cc0157f5
...
@@ -170,4 +170,11 @@ public interface StaffClerkRelationService {
...
@@ -170,4 +170,11 @@ public interface StaffClerkRelationService {
boolean
getBindByStaffIdAndEnterpriseId
(
String
enterpriseId
,
String
staffId
);
boolean
getBindByStaffIdAndEnterpriseId
(
String
enterpriseId
,
String
staffId
);
List
<
StaffClerkRelationDTO
>
listManageBindByStaffId
(
String
staffId
);
List
<
StaffClerkRelationDTO
>
listManageBindByStaffId
(
String
staffId
);
/**
* 获取企业下所有关联关系
* @param enterpriseId
* @return
*/
List
<
StaffClerkRelationDTO
>
listAllRelationDtosByEnterpriseId
(
String
enterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseService.java
View file @
cc0157f5
...
@@ -69,4 +69,11 @@ public interface WxEnterpriseService {
...
@@ -69,4 +69,11 @@ public interface WxEnterpriseService {
void
stopHaoban
(
String
enterpriseId
);
void
stopHaoban
(
String
enterpriseId
);
/**
* 查询企业下关联的微信企业id
* @param enterpriseId
* @return
*/
List
<
String
>
queryWxEnterpriseWithEnterpriseId
(
String
enterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/GroupMessageService.java
View file @
cc0157f5
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.service.service.content;
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.service.service.content;
import
com.gic.haoban.manage.service.pojo.bo.content.GroupMessageInfoBo
;
import
com.gic.haoban.manage.service.pojo.bo.content.GroupMessageInfoBo
;
import
java.util.List
;
/**
/**
* @Author MUSI
* @Author MUSI
* @Date 2023/3/19 9:46 PM
* @Date 2023/3/19 9:46 PM
...
@@ -16,4 +18,7 @@ public interface GroupMessageService {
...
@@ -16,4 +18,7 @@ public interface GroupMessageService {
* @param groupMessageInfoBo
* @param groupMessageInfoBo
*/
*/
void
handlerGroupMessage
(
GroupMessageInfoBo
groupMessageInfoBo
);
void
handlerGroupMessage
(
GroupMessageInfoBo
groupMessageInfoBo
);
List
<
String
>
hasMaterialRightEnterprise
();
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/MaterialReportService.java
0 → 100644
View file @
cc0157f5
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
;
/**
* @Author MUSI
* @Date 2023/3/24 3:58 PM
* @Description
* @Version
* 素材报告 周报/日报
**/
public
interface
MaterialReportService
{
/**
* 素材周报
* @param enterpriseId
*/
void
handlerMaterialWeekReport
(
String
enterpriseId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialReportBuilder.java
0 → 100644
View file @
cc0157f5
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
import
org.springframework.stereotype.Component
;
/**
* @Author MUSI
* @Date 2023/3/24 4:11 PM
* @Description
* @Version
* 素材周报/月报组装
**/
@Component
public
class
MaterialReportBuilder
{
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/GroupMessageServiceImpl.java
View file @
cc0157f5
...
@@ -489,4 +489,13 @@ public class GroupMessageServiceImpl implements GroupMessageService {
...
@@ -489,4 +489,13 @@ public class GroupMessageServiceImpl implements GroupMessageService {
temp
.
setDeleteFlag
(
0
);
temp
.
setDeleteFlag
(
0
);
return
temp
;
return
temp
;
}
}
/**
* 获取当前时间 有素材权限的商户
* @return
*/
@Override
public
List
<
String
>
hasMaterialRightEnterprise
()
{
return
Collections
.
emptyList
();
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/MaterialReportServiceImpl.java
0 → 100644
View file @
cc0157f5
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
impl
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @Author MUSI
* @Date 2023/3/24 3:59 PM
* @Description
* @Version
**/
@Component
public
class
MaterialReportServiceImpl
implements
MaterialReportService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
MaterialReportServiceImpl
.
class
);
@Autowired
private
NoticeMessageService
noticeMessageService
;
@Autowired
private
StaffClerkRelationService
staffClerkRelationService
;
private
static
final
Integer
MAX_SIZE
=
1000
;
/**
* 素材周报
*
* @param enterpriseId
*/
@Override
public
void
handlerMaterialWeekReport
(
String
enterpriseId
)
{
// 获取企业有绑定关系成员 (分页)
List
<
StaffClerkRelationDTO
>
staffClerkRelations
=
staffClerkRelationService
.
listAllRelationDtosByEnterpriseId
(
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
staffClerkRelations
))
{
return
;
}
// 获取成员与导购所有的绑定关系
Map
<
String
,
List
<
StaffClerkRelationDTO
>>
staffClerkRelationMap
=
staffClerkRelations
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
StaffClerkRelationDTO:
:
getStaffId
));
// 获取成员 主门店信息 没有就是区经
for
(
Map
.
Entry
<
String
,
List
<
StaffClerkRelationDTO
>>
entry
:
staffClerkRelationMap
.
entrySet
())
{
String
staffId
=
entry
.
getKey
();
List
<
StaffClerkRelationDTO
>
clerkRelations
=
entry
.
getValue
();
}
// 获取成员周报/月报数据
// 保存好办小程序内消息
// 群发企微应用消息
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
cc0157f5
...
@@ -413,4 +413,15 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -413,4 +413,15 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
}
return
dto
;
return
dto
;
}
}
/**
* 获取企业下所有关联关系
*
* @param enterpriseId
* @return
*/
@Override
public
List
<
StaffClerkRelationDTO
>
listAllRelationDtosByEnterpriseId
(
String
enterpriseId
)
{
return
this
.
mapper
.
listAllRelationDtosByEnterpriseId
(
enterpriseId
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
cc0157f5
...
@@ -254,7 +254,6 @@ public class StaffServiceImpl implements StaffService {
...
@@ -254,7 +254,6 @@ public class StaffServiceImpl implements StaffService {
/**
/**
* 查询成员列表
* 查询成员列表
*
*
* @param wxEnterpriseId
* @param staffIds
* @param staffIds
* @return
* @return
*/
*/
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
cc0157f5
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -234,4 +236,18 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
...
@@ -234,4 +236,18 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
String
dingUrl
=
"https://oapi.dingtalk.com/robot/send?access_token=c38fdc53d26e9a019640755bdada1ce07ebd44a2555d1c8acc299de7a7b5b857"
;
String
dingUrl
=
"https://oapi.dingtalk.com/robot/send?access_token=c38fdc53d26e9a019640755bdada1ce07ebd44a2555d1c8acc299de7a7b5b857"
;
DingUtils
.
send
(
msg
,
dingUrl
,
false
);
DingUtils
.
send
(
msg
,
dingUrl
,
false
);
}
}
/**
* 查询企业下关联的微信企业id
*
* @param enterpriseId
* @return
*/
@Override
public
List
<
String
>
queryWxEnterpriseWithEnterpriseId
(
String
enterpriseId
)
{
if
(
StringUtils
.
isBlank
(
enterpriseId
))
{
return
Collections
.
emptyList
();
}
return
this
.
mapper
.
queryWxEnterpriseByEnterpriseId
(
enterpriseId
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/content/task/QywxGroupMsgTaskApiServiceImpl.java
View file @
cc0157f5
...
@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.enums.content.TriggerCustomerChannelType;
...
@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.enums.content.TriggerCustomerChannelType;
import
com.gic.haoban.manage.api.service.content.task.QywxGroupMsgTaskApiService
;
import
com.gic.haoban.manage.api.service.content.task.QywxGroupMsgTaskApiService
;
import
com.gic.haoban.manage.service.pojo.bo.content.GroupMessageInfoBo
;
import
com.gic.haoban.manage.service.pojo.bo.content.GroupMessageInfoBo
;
import
com.gic.haoban.manage.service.service.content.GroupMessageService
;
import
com.gic.haoban.manage.service.service.content.GroupMessageService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -33,7 +34,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -33,7 +34,7 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
@Override
@Override
public
ServiceResponse
<
Void
>
groupMsgTaskJob
(
String
params
)
{
public
ServiceResponse
<
Void
>
groupMsgTaskJob
(
String
params
)
{
// 获取开启【内容】权限的企业id
// 获取开启【内容】权限的企业id
List
<
String
>
enterpriseIds
=
new
ArrayList
<>
();
List
<
String
>
enterpriseIds
=
groupMessageService
.
hasMaterialRightEnterprise
();
// 获取企业 (当前时间 - 30分钟, 当前时间)范围内的 导购分享记录。按创建时间排序
// 获取企业 (当前时间 - 30分钟, 当前时间)范围内的 导购分享记录。按创建时间排序
Date
currentTime
=
new
Date
();
Date
currentTime
=
new
Date
();
for
(
String
enterpriseId
:
enterpriseIds
)
{
for
(
String
enterpriseId
:
enterpriseIds
)
{
...
@@ -74,4 +75,32 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
...
@@ -74,4 +75,32 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
groupMessageService
.
handlerGroupMessage
(
groupMessageInfoBo
);
groupMessageService
.
handlerGroupMessage
(
groupMessageInfoBo
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
/**
* 素材周报
*
* @param params
* @return
*/
@Override
public
ServiceResponse
<
Void
>
handlerMaterialWeekReport
(
String
params
)
{
List
<
String
>
enterpriseIds
=
groupMessageService
.
hasMaterialRightEnterprise
();
if
(
CollectionUtils
.
isEmpty
(
enterpriseIds
))
{
return
ServiceResponse
.
success
();
}
return
null
;
}
/**
* 素材月报
*
* @param params
* @return
*/
@Override
public
ServiceResponse
<
Void
>
handlerMaterialMonthReport
(
String
params
)
{
return
null
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/DrawImageUtils.java
View file @
cc0157f5
...
@@ -22,6 +22,9 @@ public class DrawImageUtils {
...
@@ -22,6 +22,9 @@ public class DrawImageUtils {
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DrawImageUtils
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DrawImageUtils
.
class
);
private
final
/**
/**
* 绘画素材月报海报图
* 绘画素材月报海报图
* @param fileName
* @param fileName
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
cc0157f5
...
@@ -447,4 +447,9 @@
...
@@ -447,4 +447,9 @@
</if>
</if>
</select>
</select>
<select
id=
"listAllRelationDtosByEnterpriseId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
<include
refid=
"leftJoinStaffSQL"
/>
where a.enterprise_id = #{wxEnterpriseId} and a.status_flag=1 and b.status_flag = 1
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
cc0157f5
...
@@ -506,4 +506,13 @@
...
@@ -506,4 +506,13 @@
group by a.enterprise_id
group by a.enterprise_id
</select>
</select>
<select
id=
"queryWxEnterpriseByEnterpriseId"
resultType=
"java.lang.String"
>
select
a.enterprise_id enterpriseId
from tab_haoban_wx_enterprise_related a
inner join tab_haoban_wx_enterprise b on a.wx_enterprise_id = b.wx_enterprise_id
where a.status_flag = 1 and b.status_flag = 1
and a.enterprise_id = #{enterprise_id}
</select>
</mapper>
</mapper>
\ No newline at end of file
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