Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
8afc8020
Commit
8afc8020
authored
Mar 19, 2020
by
郑勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat-1002599 qq定制服务
parent
8d3d7e74
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
140 additions
and
58 deletions
+140
-58
pom.xml
pcloud-service-book/pom.xml
+6
-0
WechatGroupConsr.java
...om/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
+30
-0
CustomPlanBiz.java
...c/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
+2
-11
CustomPlanBizImpl.java
...va/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
+71
-40
CustomPlanModuleSuggestion.java
...pcloud/book/custom/entity/CustomPlanModuleSuggestion.java
+6
-0
CustomPlanFacade.java
.../java/com/pcloud/book/custom/facade/CustomPlanFacade.java
+2
-2
CustomPlanModuleSuggestionMapper.java
.../book/custom/mapper/CustomPlanModuleSuggestionMapper.java
+2
-2
AddSuggestionVO.java
.../main/java/com/pcloud/book/custom/vo/AddSuggestionVO.java
+5
-0
SuggestionListVO.java
...main/java/com/pcloud/book/custom/vo/SuggestionListVO.java
+5
-0
CustomPlanModuleSuggestionMapper.xml
...ources/mapper/custom/CustomPlanModuleSuggestionMapper.xml
+11
-3
No files found.
pcloud-service-book/pom.xml
View file @
8afc8020
...
@@ -222,6 +222,12 @@
...
@@ -222,6 +222,12 @@
<version>
${wxgroup-sdk.version}
</version>
<version>
${wxgroup-sdk.version}
</version>
</dependency>
</dependency>
<!--qq发消息接口-->
<dependency>
<groupId>
com.dcg
</groupId>
<artifactId>
CoolQSDK
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<!--ES相关-->
<!--ES相关-->
<dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<groupId>
org.springframework.data
</groupId>
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
View file @
8afc8020
...
@@ -575,9 +575,24 @@ public class WechatGroupConsr {
...
@@ -575,9 +575,24 @@ public class WechatGroupConsr {
return
list
;
return
list
;
}
}
@ParamLog
(
"根据qq用户id或昵称模糊查询"
)
public
List
<
String
>
getByQqUserQuery
(
String
userQuery
)
{
List
<
String
>
list
=
new
ArrayList
<>();
try
{
list
=
ResponseHandleUtil
.
parseListResponse
(
groupMemberService
.
getByQqUserQuery
(
userQuery
),
String
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"根据qq用户id或昵称模糊查询.[getByQqUserQuery]失败"
+
e
.
getMessage
(),
e
);
}
return
list
;
}
@ParamLog
(
"批量获取用户信息"
)
@ParamLog
(
"批量获取用户信息"
)
public
Map
<
String
,
GroupUserDTO
>
mapWxUserInfoByWxIdList
(
List
<
String
>
wxUserIds
)
{
public
Map
<
String
,
GroupUserDTO
>
mapWxUserInfoByWxIdList
(
List
<
String
>
wxUserIds
)
{
Map
<
String
,
GroupUserDTO
>
map
=
new
HashMap
<>();
Map
<
String
,
GroupUserDTO
>
map
=
new
HashMap
<>();
if
(
ListUtils
.
isEmpty
(
wxUserIds
)){
return
new
HashMap
<>();
}
try
{
try
{
map
=
ResponseHandleUtil
.
parseMapResponse
(
groupMemberService
.
mapWxUserInfoByWxIdList
(
wxUserIds
),
String
.
class
,
GroupUserDTO
.
class
);
map
=
ResponseHandleUtil
.
parseMapResponse
(
groupMemberService
.
mapWxUserInfoByWxIdList
(
wxUserIds
),
String
.
class
,
GroupUserDTO
.
class
);
...
@@ -587,6 +602,21 @@ public class WechatGroupConsr {
...
@@ -587,6 +602,21 @@ public class WechatGroupConsr {
return
map
;
return
map
;
}
}
@ParamLog
(
"批量获取qq用户信息"
)
public
Map
<
String
,
GroupUserDTO
>
mapQqUserInfoByWxIdList
(
List
<
String
>
qqUserIds
)
{
Map
<
String
,
GroupUserDTO
>
map
=
new
HashMap
<>();
if
(
ListUtils
.
isEmpty
(
qqUserIds
)){
return
new
HashMap
<>();
}
try
{
map
=
ResponseHandleUtil
.
parseMapResponse
(
groupMemberService
.
mapQqUserInfoByQqIdList
(
qqUserIds
),
String
.
class
,
GroupUserDTO
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"批量获取qq用户信息.[mapQqUserInfoByWxIdList]失败"
+
e
.
getMessage
(),
e
);
}
return
map
;
}
@ParamLog
(
"批量获取小号信息"
)
@ParamLog
(
"批量获取小号信息"
)
public
Map
<
String
,
GroupUserDTO
>
mapRobotInfoByIdList
(
List
<
String
>
wxIdList
){
public
Map
<
String
,
GroupUserDTO
>
mapRobotInfoByIdList
(
List
<
String
>
wxIdList
){
Map
<
String
,
GroupUserDTO
>
map
=
new
HashMap
<>();
Map
<
String
,
GroupUserDTO
>
map
=
new
HashMap
<>();
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
View file @
8afc8020
package
com
.
pcloud
.
book
.
custom
.
biz
;
package
com
.
pcloud
.
book
.
custom
.
biz
;
import
com.pcloud.book.custom.entity.CustomPlan
;
import
com.pcloud.book.custom.entity.CustomPlan
;
import
com.pcloud.book.custom.vo.AddBookNameVO
;
import
com.pcloud.book.custom.vo.*
;
import
com.pcloud.book.custom.vo.AddCustomPlan4UserVO
;
import
com.pcloud.book.custom.vo.AddSuggestionVO
;
import
com.pcloud.book.custom.vo.CustomPlanModuleVO
;
import
com.pcloud.book.custom.vo.CustomPlanPaperVO
;
import
com.pcloud.book.custom.vo.EditCustomPlanModuleVO
;
import
com.pcloud.book.custom.vo.ModuleSuggestionVO
;
import
com.pcloud.book.custom.vo.SuggestionListVO
;
import
com.pcloud.book.custom.vo.UserBookServiceVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -39,7 +30,7 @@ public interface CustomPlanBiz {
...
@@ -39,7 +30,7 @@ public interface CustomPlanBiz {
Map
<
String
,
Object
>
getShortLinkUrl
(
Long
appId
,
Long
productId
,
String
linkUrl
);
Map
<
String
,
Object
>
getShortLinkUrl
(
Long
appId
,
Long
productId
,
String
linkUrl
);
PageBeanNew
<
SuggestionListVO
>
listSuggestion4Plan
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
String
endTime
,
String
search
,
Integer
planId
);
PageBeanNew
<
SuggestionListVO
>
listSuggestion4Plan
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
String
endTime
,
String
search
,
Integer
planId
,
Integer
userType
);
List
<
ModuleSuggestionVO
>
getSuggestionInfo
(
Integer
batchId
,
Integer
planId
);
List
<
ModuleSuggestionVO
>
getSuggestionInfo
(
Integer
batchId
,
Integer
planId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
View file @
8afc8020
package
com
.
pcloud
.
book
.
custom
.
biz
.
impl
;
package
com
.
pcloud
.
book
.
custom
.
biz
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.dcg.coolq.sdk.message.MessageBuilder
;
import
com.dcg.coolq.sdk.message.vos.send.PrivateMsgSendVO
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.consumer.app.AppConsr
;
import
com.pcloud.book.consumer.app.AppConsr
;
...
@@ -17,20 +19,11 @@ import com.pcloud.book.custom.enums.PlanUseStateEnum;
...
@@ -17,20 +19,11 @@ import com.pcloud.book.custom.enums.PlanUseStateEnum;
import
com.pcloud.book.custom.mapper.CustomPlanMapper
;
import
com.pcloud.book.custom.mapper.CustomPlanMapper
;
import
com.pcloud.book.custom.mapper.CustomPlanModuleMapper
;
import
com.pcloud.book.custom.mapper.CustomPlanModuleMapper
;
import
com.pcloud.book.custom.mapper.CustomPlanModuleSuggestionMapper
;
import
com.pcloud.book.custom.mapper.CustomPlanModuleSuggestionMapper
;
import
com.pcloud.book.custom.vo.AddBookNameVO
;
import
com.pcloud.book.custom.vo.*
;
import
com.pcloud.book.custom.vo.AddCustomPlan4UserVO
;
import
com.pcloud.book.custom.vo.AddSuggestionListVO
;
import
com.pcloud.book.custom.vo.AddSuggestionVO
;
import
com.pcloud.book.custom.vo.CustomPlanModuleVO
;
import
com.pcloud.book.custom.vo.CustomPlanPaperVO
;
import
com.pcloud.book.custom.vo.EditCustomPlanModuleVO
;
import
com.pcloud.book.custom.vo.ModuleSuggestionVO
;
import
com.pcloud.book.custom.vo.SuggestionListVO
;
import
com.pcloud.book.custom.vo.ToPdfVO
;
import
com.pcloud.book.custom.vo.UserBookServiceVO
;
import
com.pcloud.book.group.biz.WeixinQrcodeBiz
;
import
com.pcloud.book.group.biz.WeixinQrcodeBiz
;
import
com.pcloud.book.group.tools.Kit
;
import
com.pcloud.book.group.tools.Kit
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.pcloudkeyword.enums.PcloudGroupRobotTypeEnum
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.channelcenter.wechat.dto.AccountSettingDto
;
import
com.pcloud.channelcenter.wechat.dto.AccountSettingDto
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.aspect.ParamLog
;
...
@@ -47,7 +40,7 @@ import com.pcloud.wechatgroup.group.dto.GroupRobotDTO;
...
@@ -47,7 +40,7 @@ import com.pcloud.wechatgroup.group.dto.GroupRobotDTO;
import
com.pcloud.wechatgroup.group.dto.GroupUserDTO
;
import
com.pcloud.wechatgroup.group.dto.GroupUserDTO
;
import
com.sdk.wxgroup.SendMessageTypeEnum
;
import
com.sdk.wxgroup.SendMessageTypeEnum
;
import
com.sdk.wxgroup.SendTextMessageVO
;
import
com.sdk.wxgroup.SendTextMessageVO
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
org.apache.commons.collections.MapUtils
;
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
;
...
@@ -62,6 +55,8 @@ import java.util.List;
...
@@ -62,6 +55,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
dcg
.
coolq
.
sdk
.
CoolQSDK
.
sendPrivateMsg
;
@Component
@Component
public
class
CustomPlanBizImpl
implements
CustomPlanBiz
{
public
class
CustomPlanBizImpl
implements
CustomPlanBiz
{
...
@@ -297,32 +292,53 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -297,32 +292,53 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
@Override
@Override
public
PageBeanNew
<
SuggestionListVO
>
listSuggestion4Plan
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
public
PageBeanNew
<
SuggestionListVO
>
listSuggestion4Plan
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
String
endTime
,
String
search
,
Integer
planId
)
{
String
endTime
,
String
search
,
Integer
planId
,
Integer
userType
)
{
List
<
SuggestionListVO
>
list
=
new
ArrayList
<>();
List
<
SuggestionListVO
>
list
=
new
ArrayList
<>();
List
<
String
>
wxIdList
=
null
;
List
<
String
>
wxIdList
=
null
;
if
(!
StringUtil
.
isEmpty
(
search
))
{
if
(!
StringUtil
.
isEmpty
(
search
))
{
wxIdList
=
wechatGroupConsr
.
getByUserQuery
(
search
);
List
wxIds
=
wechatGroupConsr
.
getByUserQuery
(
search
);
List
<
String
>
qqIds
=
wechatGroupConsr
.
getByQqUserQuery
(
search
);
if
(!
ListUtils
.
isEmpty
(
wxIds
)
&&
!
ListUtils
.
isEmpty
(
qqIds
))
{
wxIds
.
addAll
(
qqIds
);
wxIdList
=
wxIds
;
}
if
(
ListUtils
.
isEmpty
(
wxIds
)
&&
!
ListUtils
.
isEmpty
(
qqIds
))
{
wxIdList
=
qqIds
;
}
if
(!
ListUtils
.
isEmpty
(
wxIds
)
&&
ListUtils
.
isEmpty
(
qqIds
))
{
wxIdList
=
wxIds
;
}
if
(
ListUtils
.
isEmpty
(
wxIdList
))
{
if
(
ListUtils
.
isEmpty
(
wxIdList
))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
list
);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
list
);
}
}
}
}
Integer
count
=
customPlanModuleSuggestionMapper
.
getSuggestionCount
(
startTime
,
endTime
,
wxIdList
,
planId
);
Integer
count
=
customPlanModuleSuggestionMapper
.
getSuggestionCount
(
startTime
,
endTime
,
wxIdList
,
planId
,
userType
);
if
(
count
<=
0
)
{
if
(
count
<=
0
)
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
list
);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
list
);
}
}
list
=
customPlanModuleSuggestionMapper
.
listSuggestion4Plan
(
currentPage
*
numPerPage
,
numPerPage
,
startTime
,
endTime
,
wxIdList
,
planId
);
list
=
customPlanModuleSuggestionMapper
.
listSuggestion4Plan
(
currentPage
*
numPerPage
,
numPerPage
,
startTime
,
endTime
,
wxIdList
,
planId
,
userType
);
List
<
String
>
userIds
=
list
.
stream
().
map
(
SuggestionListVO:
:
getWxId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
wxUserIds
=
list
.
stream
().
filter
(
a
->
a
.
getUserType
()!=
null
&&
PcloudGroupRobotTypeEnum
.
WXROBOT
.
value
.
equals
(
a
.
getUserType
())).
map
(
SuggestionListVO:
:
getWxId
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
String
,
GroupUserDTO
>
userDTOMap
=
wechatGroupConsr
.
mapWxUserInfoByWxIdList
(
userIds
);
List
<
String
>
qqUserIds
=
list
.
stream
().
filter
(
a
->
a
.
getUserType
()!=
null
&&
PcloudGroupRobotTypeEnum
.
QQROBOT
.
value
.
equals
(
a
.
getUserType
())).
map
(
SuggestionListVO:
:
getWxId
).
distinct
().
collect
(
Collectors
.
toList
());
list
.
forEach
(
suggestionListVO
->
{
Map
<
String
,
GroupUserDTO
>
userDTOMap
=
wechatGroupConsr
.
mapWxUserInfoByWxIdList
(
wxUserIds
);
//封装用户信息
Map
<
String
,
GroupUserDTO
>
qqUserMap
=
wechatGroupConsr
.
mapQqUserInfoByWxIdList
(
qqUserIds
);
String
wxId
=
suggestionListVO
.
getWxId
();
if
(
userDTOMap
!=
null
&&
userDTOMap
.
get
(
wxId
)
!=
null
)
{
list
.
forEach
(
suggestionListVO
->
{
GroupUserDTO
groupUserDTO
=
userDTOMap
.
get
(
wxId
);
//封装用户信息
suggestionListVO
.
setNickName
(
groupUserDTO
.
getNickName
());
String
wxId
=
suggestionListVO
.
getWxId
();
suggestionListVO
.
setHeadUrl
(
groupUserDTO
.
getHeadPic
());
if
(
MapUtils
.
isNotEmpty
(
userDTOMap
)
&&
userDTOMap
.
get
(
wxId
)
!=
null
)
{
suggestionListVO
.
setSex
(
groupUserDTO
.
getSex
());
GroupUserDTO
groupUserDTO
=
userDTOMap
.
get
(
wxId
);
}
suggestionListVO
.
setNickName
(
groupUserDTO
.
getNickName
());
});
suggestionListVO
.
setHeadUrl
(
groupUserDTO
.
getHeadPic
());
suggestionListVO
.
setSex
(
groupUserDTO
.
getSex
());
}
if
(
MapUtils
.
isNotEmpty
(
qqUserMap
)
&&
qqUserMap
.
get
(
wxId
)
!=
null
)
{
GroupUserDTO
groupUserDTO
=
qqUserMap
.
get
(
wxId
);
suggestionListVO
.
setNickName
(
groupUserDTO
.
getNickName
());
suggestionListVO
.
setHeadUrl
(
groupUserDTO
.
getHeadPic
());
suggestionListVO
.
setSex
(
groupUserDTO
.
getSex
());
}
});
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
count
,
list
);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
count
,
list
);
}
}
...
@@ -334,6 +350,7 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -334,6 +350,7 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
@Override
@Override
public
Integer
addSuggestion4Module
(
AddSuggestionVO
addSuggestionVO
)
{
public
Integer
addSuggestion4Module
(
AddSuggestionVO
addSuggestionVO
)
{
String
wxId
=
addSuggestionVO
.
getWxId
();
String
wxId
=
addSuggestionVO
.
getWxId
();
Integer
userType
=
null
!=
addSuggestionVO
.
getUserType
()?
addSuggestionVO
.
getUserType
():
1
;
Integer
planId
=
addSuggestionVO
.
getPlanId
();
Integer
planId
=
addSuggestionVO
.
getPlanId
();
int
maxBatchId
=
customPlanModuleSuggestionMapper
.
getMaxBatchId
();
int
maxBatchId
=
customPlanModuleSuggestionMapper
.
getMaxBatchId
();
List
<
AddSuggestionListVO
>
suggestionList
=
addSuggestionVO
.
getSuggestionList
();
List
<
AddSuggestionListVO
>
suggestionList
=
addSuggestionVO
.
getSuggestionList
();
...
@@ -346,7 +363,7 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -346,7 +363,7 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
CustomPlanModuleSuggestion
suggestion
=
CustomPlanModuleSuggestion
.
builder
().
wxId
(
wxId
).
planId
(
planId
)
CustomPlanModuleSuggestion
suggestion
=
CustomPlanModuleSuggestion
.
builder
().
wxId
(
wxId
).
planId
(
planId
)
.
suggestionLevel
(
addSuggestionListVO
.
getSuggestionLevel
()).
suggestion
(
addSuggestionListVO
.
getSuggestion
())
.
suggestionLevel
(
addSuggestionListVO
.
getSuggestionLevel
()).
suggestion
(
addSuggestionListVO
.
getSuggestion
())
.
batchId
(
maxBatchId
+
1
).
moduleId
(
addSuggestionListVO
.
getModuleId
()).
moduleType
(
addSuggestionListVO
.
getModuleType
())
.
batchId
(
maxBatchId
+
1
).
moduleId
(
addSuggestionListVO
.
getModuleId
()).
moduleType
(
addSuggestionListVO
.
getModuleType
())
.
openFeedback
(
addSuggestionListVO
.
getOpenFeedback
()).
build
();
.
openFeedback
(
addSuggestionListVO
.
getOpenFeedback
()).
userType
(
userType
).
build
();
list
.
add
(
suggestion
);
list
.
add
(
suggestion
);
});
});
customPlanModuleSuggestionMapper
.
batchInsert
(
list
);
customPlanModuleSuggestionMapper
.
batchInsert
(
list
);
...
@@ -358,17 +375,31 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -358,17 +375,31 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
if
(!
StringUtil
.
isEmpty
(
customPlan
.
getConfirmFeedbackReply
())
&&
addSuggestionVO
.
getRobotWxId
()
!=
null
)
{
if
(!
StringUtil
.
isEmpty
(
customPlan
.
getConfirmFeedbackReply
())
&&
addSuggestionVO
.
getRobotWxId
()
!=
null
)
{
//发送return消息
//发送return消息
String
robotWxId
=
addSuggestionVO
.
getRobotWxId
();
String
robotWxId
=
addSuggestionVO
.
getRobotWxId
();
GroupRobotDTO
groupRobotDTO
=
wechatGroupConsr
.
getGroupRobotByWxId
(
robotWxId
);
if
(
1
==
userType
)
{
String
ip
=
weixinQrcodeBiz
.
getRobotIpByGeneration
(
groupRobotDTO
.
getVersion
());
//微信发送消息
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
GroupRobotDTO
groupRobotDTO
=
wechatGroupConsr
.
getGroupRobotByWxId
(
robotWxId
);
sendTextMessageVO
.
setContent
(
customPlan
.
getConfirmFeedbackReply
());
String
ip
=
weixinQrcodeBiz
.
getRobotIpByGeneration
(
groupRobotDTO
.
getVersion
());
sendTextMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
sendTextMessageVO
.
setWxId
(
robotWxId
);
sendTextMessageVO
.
setContent
(
customPlan
.
getConfirmFeedbackReply
());
sendTextMessageVO
.
setAltId
(
robotWxId
);
sendTextMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
sendTextMessageVO
.
setWxGroupId
(
wxId
);
sendTextMessageVO
.
setWxId
(
robotWxId
);
sendTextMessageVO
.
setIp
(
ip
);
sendTextMessageVO
.
setAltId
(
robotWxId
);
// TODO sdk.message
sendTextMessageVO
.
setWxGroupId
(
wxId
);
wechatGroupConsr
.
sendMessage
(
JSON
.
toJSONString
(
sendTextMessageVO
));
sendTextMessageVO
.
setIp
(
ip
);
// TODO sdk.message
wechatGroupConsr
.
sendMessage
(
JSON
.
toJSONString
(
sendTextMessageVO
));
}
else
{
//qq发送消息
PrivateMsgSendVO
privateMsgSendVO
=
new
PrivateMsgSendVO
();
// 构造一个消息
String
message
=
new
MessageBuilder
()
.
text
(
customPlan
.
getConfirmFeedbackReply
())
// 文本消息
.
toString
();
privateMsgSendVO
.
setMessage
(
message
);
privateMsgSendVO
.
setSenderQQCode
(
Long
.
valueOf
(
wxId
));
privateMsgSendVO
.
setReceiverQQCode
(
Long
.
valueOf
(
robotWxId
));
sendPrivateMsg
(
privateMsgSendVO
);
}
}
}
});
});
return
maxBatchId
+
1
;
return
maxBatchId
+
1
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/entity/CustomPlanModuleSuggestion.java
View file @
8afc8020
...
@@ -29,4 +29,9 @@ public class CustomPlanModuleSuggestion {
...
@@ -29,4 +29,9 @@ public class CustomPlanModuleSuggestion {
private
Integer
moduleType
;
private
Integer
moduleType
;
/**
* 用户类型 1-微信用户 2-qq用户
*/
private
Integer
userType
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/custom/facade/CustomPlanFacade.java
View file @
8afc8020
...
@@ -143,8 +143,8 @@ public class CustomPlanFacade {
...
@@ -143,8 +143,8 @@ public class CustomPlanFacade {
@ApiOperation
(
value
=
"获取方案满意度记录"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"获取方案满意度记录"
,
httpMethod
=
"GET"
)
ResponseDto
<?>
listSuggestion4Plan
(
@RequestHeader
String
token
,
@RequestParam
Integer
currentPage
,
@RequestParam
Integer
numPerPage
,
ResponseDto
<?>
listSuggestion4Plan
(
@RequestHeader
String
token
,
@RequestParam
Integer
currentPage
,
@RequestParam
Integer
numPerPage
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
startTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
startTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@RequestParam
(
value
=
"search"
,
required
=
false
)
String
search
,
@RequestParam
Integer
planId
)
{
@RequestParam
(
value
=
"search"
,
required
=
false
)
String
search
,
@RequestParam
Integer
planId
,
@RequestParam
(
value
=
"userType"
,
required
=
false
)
Integer
userType
)
{
PageBeanNew
<
SuggestionListVO
>
page
=
customPlanBiz
.
listSuggestion4Plan
(
currentPage
,
numPerPage
,
startTime
,
endTime
,
search
,
planId
);
PageBeanNew
<
SuggestionListVO
>
page
=
customPlanBiz
.
listSuggestion4Plan
(
currentPage
,
numPerPage
,
startTime
,
endTime
,
search
,
planId
,
userType
);
return
new
ResponseDto
<>(
page
);
return
new
ResponseDto
<>(
page
);
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/mapper/CustomPlanModuleSuggestionMapper.java
View file @
8afc8020
...
@@ -16,11 +16,11 @@ import java.util.List;
...
@@ -16,11 +16,11 @@ import java.util.List;
public
interface
CustomPlanModuleSuggestionMapper
{
public
interface
CustomPlanModuleSuggestionMapper
{
Integer
getSuggestionCount
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
Integer
getSuggestionCount
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"wxIdList"
)
List
<
String
>
wxIdList
,
@Param
(
"planId"
)
Integer
planId
);
@Param
(
"wxIdList"
)
List
<
String
>
wxIdList
,
@Param
(
"planId"
)
Integer
planId
,
@Param
(
"userType"
)
Integer
userType
);
List
<
SuggestionListVO
>
listSuggestion4Plan
(
@Param
(
"pageNum"
)
int
pageNum
,
@Param
(
"numPerPage"
)
int
numPerPage
,
List
<
SuggestionListVO
>
listSuggestion4Plan
(
@Param
(
"pageNum"
)
int
pageNum
,
@Param
(
"numPerPage"
)
int
numPerPage
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"wxIdList"
)
List
<
String
>
wxIdList
,
@Param
(
"planId"
)
Integer
planId
);
@Param
(
"wxIdList"
)
List
<
String
>
wxIdList
,
@Param
(
"planId"
)
Integer
planId
,
@Param
(
"userType"
)
Integer
userType
);
List
<
ModuleSuggestionVO
>
getSuggestionInfo
(
@Param
(
"batchId"
)
Integer
batchId
,
@Param
(
"planId"
)
Integer
planId
);
List
<
ModuleSuggestionVO
>
getSuggestionInfo
(
@Param
(
"batchId"
)
Integer
batchId
,
@Param
(
"planId"
)
Integer
planId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/vo/AddSuggestionVO.java
View file @
8afc8020
...
@@ -15,5 +15,10 @@ public class AddSuggestionVO {
...
@@ -15,5 +15,10 @@ public class AddSuggestionVO {
private
String
robotWxId
;
private
String
robotWxId
;
/**
* 用户类型 1-微信用户 2-qq用户
*/
private
Integer
userType
;
private
List
<
AddSuggestionListVO
>
suggestionList
;
private
List
<
AddSuggestionListVO
>
suggestionList
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/custom/vo/SuggestionListVO.java
View file @
8afc8020
...
@@ -29,4 +29,9 @@ public class SuggestionListVO implements Serializable {
...
@@ -29,4 +29,9 @@ public class SuggestionListVO implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
private
Date
createTime
;
/**
* 用户类型 1-微信用户 2-qq用户
*/
private
Integer
userType
;
}
}
pcloud-service-book/src/main/resources/mapper/custom/CustomPlanModuleSuggestionMapper.xml
View file @
8afc8020
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<result
column=
"suggestion_level"
jdbcType=
"INTEGER"
property=
"suggestionLevel"
/>
<result
column=
"suggestion_level"
jdbcType=
"INTEGER"
property=
"suggestionLevel"
/>
<result
column=
"suggestion"
jdbcType=
"VARCHAR"
property=
"suggestion"
/>
<result
column=
"suggestion"
jdbcType=
"VARCHAR"
property=
"suggestion"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"planId"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"planId"
/>
<result
column=
"user_type"
jdbcType=
"INTEGER"
property=
"userType"
/>
</resultMap>
</resultMap>
<select
id=
"getSuggestionCount"
resultType=
"int"
>
<select
id=
"getSuggestionCount"
resultType=
"int"
>
...
@@ -23,6 +24,9 @@
...
@@ -23,6 +24,9 @@
<if
test=
"startTime != null and endTime != null"
>
<if
test=
"startTime != null and endTime != null"
>
and a.create_time between #{startTime} and #{endTime}
and a.create_time between #{startTime} and #{endTime}
</if>
</if>
<if
test=
"userType!=null"
>
and a.user_type=#{userType}
</if>
<if
test=
"wxIdList != null"
>
<if
test=
"wxIdList != null"
>
and wx_id in
and wx_id in
<foreach
collection=
"wxIdList"
open=
"("
close=
")"
separator=
","
item=
"item"
>
<foreach
collection=
"wxIdList"
open=
"("
close=
")"
separator=
","
item=
"item"
>
...
@@ -39,7 +43,8 @@
...
@@ -39,7 +43,8 @@
SUM(suggestion_level = 1) goodCount,
SUM(suggestion_level = 1) goodCount,
SUM(suggestion_level = 2) badCount,
SUM(suggestion_level = 2) badCount,
a.create_time createTime,
a.create_time createTime,
a.plan_id planId
a.plan_id planId,
a.user_type userType
FROM
FROM
custom_plan_module_suggestion a
custom_plan_module_suggestion a
LEFT JOIN custom_plan b ON a.plan_id = b.id
LEFT JOIN custom_plan b ON a.plan_id = b.id
...
@@ -48,6 +53,9 @@
...
@@ -48,6 +53,9 @@
<if
test=
"startTime != null and endTime != null"
>
<if
test=
"startTime != null and endTime != null"
>
and a.create_time between #{startTime} and #{endTime}
and a.create_time between #{startTime} and #{endTime}
</if>
</if>
<if
test=
"userType!=null"
>
and a.user_type=#{userType}
</if>
<if
test=
"wxIdList != null"
>
<if
test=
"wxIdList != null"
>
and wx_id in
and wx_id in
<foreach
collection=
"wxIdList"
open=
"("
close=
")"
separator=
","
item=
"item"
>
<foreach
collection=
"wxIdList"
open=
"("
close=
")"
separator=
","
item=
"item"
>
...
@@ -78,11 +86,11 @@
...
@@ -78,11 +86,11 @@
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.custom.entity.CustomPlanModuleSuggestion"
>
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.custom.entity.CustomPlanModuleSuggestion"
>
insert into custom_plan_module_suggestion(batch_id, wx_id, plan_id, module_Id, suggestion_Level, suggestion, create_time,
insert into custom_plan_module_suggestion(batch_id, wx_id, plan_id, module_Id, suggestion_Level, suggestion, create_time,
module_type, open_feedback)
module_type, open_feedback
,user_type
)
values
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.batchId}, #{item.wxId}, #{item.planId}, #{item.moduleId}, #{item.suggestionLevel}, #{item.suggestion}, now(),
(#{item.batchId}, #{item.wxId}, #{item.planId}, #{item.moduleId}, #{item.suggestionLevel}, #{item.suggestion}, now(),
#{item.moduleType}, #{item.openFeedback})
#{item.moduleType}, #{item.openFeedback}
,#{item.userType}
)
</foreach>
</foreach>
</insert>
</insert>
...
...
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