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
bb956790
Commit
bb956790
authored
Feb 03, 2020
by
zhuyajie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多条关键词回复
parent
4a4d9f5f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
347 additions
and
173 deletions
+347
-173
BookGroupAppBizImpl.java
...a/com/pcloud/book/group/biz/impl/BookGroupAppBizImpl.java
+7
-7
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+17
-35
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+70
-25
SelfRobotKeywordBizImpl.java
...cloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
+0
-0
SelfRobotKeywordReplyDao.java
...om/pcloud/book/keywords/dao/SelfRobotKeywordReplyDao.java
+20
-0
SelfRobotKeywordReplyDaoImpl.java
.../book/keywords/dao/impl/SelfRobotKeywordReplyDaoImpl.java
+32
-0
SelfRobotKeyword.java
...ava/com/pcloud/book/keywords/entity/SelfRobotKeyword.java
+2
-56
SelfRobotKeywordReply.java
...om/pcloud/book/keywords/entity/SelfRobotKeywordReply.java
+86
-0
SelfRobotKeyword.xml
...book/src/main/resources/mapper/group/SelfRobotKeyword.xml
+8
-50
SelfRobotKeywordReply.xml
...src/main/resources/mapper/group/SelfRobotKeywordReply.xml
+105
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupAppBizImpl.java
View file @
bb956790
...
@@ -29,10 +29,7 @@ import com.pcloud.book.group.enums.AppAndProductTypeEnum;
...
@@ -29,10 +29,7 @@ import com.pcloud.book.group.enums.AppAndProductTypeEnum;
import
com.pcloud.book.group.enums.BookGroupAppOriginTypeEnum
;
import
com.pcloud.book.group.enums.BookGroupAppOriginTypeEnum
;
import
com.pcloud.book.keywords.dao.BookGuideDao
;
import
com.pcloud.book.keywords.dao.BookGuideDao
;
import
com.pcloud.book.keywords.dao.BookKeywordDao
;
import
com.pcloud.book.keywords.dao.BookKeywordDao
;
import
com.pcloud.book.keywords.entity.BookGuide
;
import
com.pcloud.book.keywords.entity.*
;
import
com.pcloud.book.keywords.entity.BookGuideReply
;
import
com.pcloud.book.keywords.entity.BookKeyword
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
import
com.pcloud.book.push.dao.PushGroupDao
;
import
com.pcloud.book.push.dao.PushGroupDao
;
import
com.pcloud.book.push.entity.PushGroup
;
import
com.pcloud.book.push.entity.PushGroup
;
...
@@ -360,11 +357,13 @@ public class BookGroupAppBizImpl implements BookGroupAppBiz {
...
@@ -360,11 +357,13 @@ public class BookGroupAppBizImpl implements BookGroupAppBiz {
}
}
List
<
BookGroupApp
>
bookGroupApps
=
new
ArrayList
<>();
List
<
BookGroupApp
>
bookGroupApps
=
new
ArrayList
<>();
for
(
SelfRobotKeyword
selfRobotKeyword
:
selfRobotKeywords
)
{
for
(
SelfRobotKeyword
selfRobotKeyword
:
selfRobotKeywords
)
{
if
(
ReplyTypeEnum
.
APP
.
value
.
equals
(
selfRobotKeyword
.
getType
()))
{
List
<
SelfRobotKeywordReply
>
replyList
=
selfRobotKeyword
.
getKeywordReplyList
();
for
(
SelfRobotKeywordReply
keywordReply
:
replyList
){
if
(
ReplyTypeEnum
.
APP
.
value
.
equals
(
keywordReply
.
getType
()))
{
BookGroupApp
bookGroupApp
=
new
BookGroupApp
();
BookGroupApp
bookGroupApp
=
new
BookGroupApp
();
bookGroupApp
.
setOriginType
(
BookGroupAppOriginTypeEnum
.
SELF_KEYWORD
.
code
);
bookGroupApp
.
setOriginType
(
BookGroupAppOriginTypeEnum
.
SELF_KEYWORD
.
code
);
bookGroupApp
.
setServeId
(
selfRobotKeyword
.
getServeId
());
bookGroupApp
.
setServeId
(
keywordReply
.
getServeId
());
bookGroupApp
.
setServeType
(
selfRobotKeyword
.
getServeType
());
bookGroupApp
.
setServeType
(
keywordReply
.
getServeType
());
bookGroupApp
.
setClassifyId
(
0L
);
bookGroupApp
.
setClassifyId
(
0L
);
bookGroupApp
.
setBookGroupId
(
selfRobotKeyword
.
getBookGroupId
());
bookGroupApp
.
setBookGroupId
(
selfRobotKeyword
.
getBookGroupId
());
bookGroupApp
.
setCreateUser
(
selfRobotKeyword
.
getCreateUser
());
bookGroupApp
.
setCreateUser
(
selfRobotKeyword
.
getCreateUser
());
...
@@ -376,6 +375,7 @@ public class BookGroupAppBizImpl implements BookGroupAppBiz {
...
@@ -376,6 +375,7 @@ public class BookGroupAppBizImpl implements BookGroupAppBiz {
bookGroupApps
.
add
(
bookGroupApp
);
bookGroupApps
.
add
(
bookGroupApp
);
}
}
}
}
}
if
(
ListUtils
.
isEmpty
(
bookGroupApps
))
{
if
(
ListUtils
.
isEmpty
(
bookGroupApps
))
{
return
;
return
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
bb956790
...
@@ -25,18 +25,12 @@ import com.pcloud.book.group.tools.SendWeixinRequestTools;
...
@@ -25,18 +25,12 @@ import com.pcloud.book.group.tools.SendWeixinRequestTools;
import
com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO
;
import
com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO
;
import
com.pcloud.book.keywords.biz.BookGuideBiz
;
import
com.pcloud.book.keywords.biz.BookGuideBiz
;
import
com.pcloud.book.keywords.biz.BookKeywordBiz
;
import
com.pcloud.book.keywords.biz.BookKeywordBiz
;
import
com.pcloud.book.keywords.dao.BookGuideDao
;
import
com.pcloud.book.keywords.dao.*
;
import
com.pcloud.book.keywords.dao.BookGuideReplyDao
;
import
com.pcloud.book.keywords.dao.KeywordDao
;
import
com.pcloud.book.keywords.dao.SelfRobotKeywordDao
;
import
com.pcloud.book.keywords.dto.GuideDTO
;
import
com.pcloud.book.keywords.dto.GuideDTO
;
import
com.pcloud.book.keywords.dto.KeywordDTO
;
import
com.pcloud.book.keywords.dto.KeywordDTO
;
import
com.pcloud.book.keywords.dto.KeywordStatusDTO
;
import
com.pcloud.book.keywords.dto.KeywordStatusDTO
;
import
com.pcloud.book.keywords.dto.ReplyKeywordDTO
;
import
com.pcloud.book.keywords.dto.ReplyKeywordDTO
;
import
com.pcloud.book.keywords.entity.BookGuide
;
import
com.pcloud.book.keywords.entity.*
;
import
com.pcloud.book.keywords.entity.BookGuideReply
;
import
com.pcloud.book.keywords.entity.Keyword
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
import
com.pcloud.book.keywords.vo.GuideVO
;
import
com.pcloud.book.keywords.vo.GuideVO
;
import
com.pcloud.book.keywords.vo.ReplyMessageVO
;
import
com.pcloud.book.keywords.vo.ReplyMessageVO
;
...
@@ -125,6 +119,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -125,6 +119,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
@Value
(
"${system.env}"
)
@Value
(
"${system.env}"
)
private
String
envStr
;
private
String
envStr
;
@Autowired
private
SelfRobotKeywordReplyDao
selfRobotKeywordReplyDao
;
@ParamLog
(
"同意加好友发送欢迎语"
)
@ParamLog
(
"同意加好友发送欢迎语"
)
@Override
@Override
...
@@ -157,41 +153,18 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -157,41 +153,18 @@ public class BookGuideBizImpl implements BookGuideBiz {
bookGroupCipherUser
.
setAltId
(
agreeAddUserDTO
.
getRobotWxId
());
bookGroupCipherUser
.
setAltId
(
agreeAddUserDTO
.
getRobotWxId
());
//新增暗号对应记录
//新增暗号对应记录
bookGroupCipherUserDao
.
insert
(
bookGroupCipherUser
);
bookGroupCipherUserDao
.
insert
(
bookGroupCipherUser
);
/* SendTextMessageVO addFriendVo = new SendTextMessageVO();
addFriendVo.setContent(dto.getAddFriendGuide());
addFriendVo.setCode(SendMessageTypeEnum.SELF.getCode());
addFriendVo.setWxId(agreeAddUserDTO.getRobotWxId());
addFriendVo.setAltId(agreeAddUserDTO.getRobotWxId());
addFriendVo.setWxGroupId(agreeAddUserDTO.getUserWxId());
addFriendVo.setIp(agreeAddUserDTO.getIp());
WxGroupSDK.sendTextMessage(addFriendVo);
log.info("临时demo发送个人号加好友欢迎语信息"+addFriendVo.toString());*/
//好友引导语
//好友引导语
sendFriendGuide
(
bookGroupId
,
agreeAddUserDTO
);
sendFriendGuide
(
bookGroupId
,
agreeAddUserDTO
);
//回复关键词引导语
//回复关键词引导语
List
<
SelfRobotKeyword
>
selfRobotKeywords
=
selfRobotKeywordDao
.
getListByBookGroupId
(
bookGroupId
);
List
<
SelfRobotKeyword
>
selfRobotKeywords
=
selfRobotKeywordDao
.
getListByBookGroupId
(
bookGroupId
);
if
(!
ListUtils
.
isEmpty
(
selfRobotKeywords
)){
if
(!
ListUtils
.
isEmpty
(
selfRobotKeywords
)){
/* try {
String content="现在你试试回复我定制一套【背单词】读书计划【 】内关键词来唤醒我";
SendTextMessageVO voh = new SendTextMessageVO();
voh.setContent(content);
voh.setCode(SendMessageTypeEnum.SELF.getCode());
voh.setWxId(agreeAddUserDTO.getRobotWxId());
voh.setAltId(agreeAddUserDTO.getRobotWxId());
voh.setWxGroupId(agreeAddUserDTO.getUserWxId());
voh.setIp(agreeAddUserDTO.getIp());
WxGroupSDK.sendTextMessage(voh);
log.info("临时demo发送个人号加好友信息唤醒"+voh.toString());
Thread.sleep(5000);
} catch (InterruptedException e) {
log.error("发消息休眠5秒出错", e);
}*/
ThreadPoolUtils
.
SEND_MESSAGE_THREAD_POOL
.
execute
(()->{
ThreadPoolUtils
.
SEND_MESSAGE_THREAD_POOL
.
execute
(()->{
for
(
SelfRobotKeyword
selfRobotKeyword:
selfRobotKeywords
){
for
(
SelfRobotKeyword
selfRobotKeyword:
selfRobotKeywords
){
try
{
try
{
if
(
"长江作业本"
.
equals
(
selfRobotKeyword
.
getKeyword
())){
if
(
"长江作业本"
.
equals
(
selfRobotKeyword
.
getKeyword
())){
Thread
.
sleep
(
1000
*
60
*
10
);
Thread
.
sleep
(
1000
*
60
*
10
);
}
}
if
(!
StringUtil
.
isEmpty
(
selfRobotKeyword
.
getGuide
())){
SendTextMessageVO
vo
=
new
SendTextMessageVO
();
SendTextMessageVO
vo
=
new
SendTextMessageVO
();
vo
.
setContent
(
selfRobotKeyword
.
getGuide
());
vo
.
setContent
(
selfRobotKeyword
.
getGuide
());
vo
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
vo
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
...
@@ -200,6 +173,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -200,6 +173,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
vo
.
setWxGroupId
(
agreeAddUserDTO
.
getUserWxId
());
vo
.
setWxGroupId
(
agreeAddUserDTO
.
getUserWxId
());
vo
.
setIp
(
agreeAddUserDTO
.
getIp
());
vo
.
setIp
(
agreeAddUserDTO
.
getIp
());
WxGroupSDK
.
sendTextMessage
(
vo
);
WxGroupSDK
.
sendTextMessage
(
vo
);
log
.
info
(
"临时demo发送个人号加好友信息"
+
vo
.
toString
());
}
if
(
"学前"
.
equals
(
selfRobotKeyword
.
getKeyword
())
if
(
"学前"
.
equals
(
selfRobotKeyword
.
getKeyword
())
&&
envStr
.
toUpperCase
().
equals
(
"PRO"
)&&
agreeAddUserDTO
.
getRobotWxId
().
equals
(
"wxid_x8i897ryabo722"
)){
&&
envStr
.
toUpperCase
().
equals
(
"PRO"
)&&
agreeAddUserDTO
.
getRobotWxId
().
equals
(
"wxid_x8i897ryabo722"
)){
SendGroupInviteVO
sendGroupInviteVO
=
new
SendGroupInviteVO
();
SendGroupInviteVO
sendGroupInviteVO
=
new
SendGroupInviteVO
();
...
@@ -211,9 +186,15 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -211,9 +186,15 @@ public class BookGuideBizImpl implements BookGuideBiz {
log
.
info
(
"临时发送入群连接 sendGroupInviteVO:{}"
,
sendGroupInviteVO
);
log
.
info
(
"临时发送入群连接 sendGroupInviteVO:{}"
,
sendGroupInviteVO
);
}
}
if
(
"教辅书单"
.
equals
(
selfRobotKeyword
.
getKeyword
())){
if
(
"教辅书单"
.
equals
(
selfRobotKeyword
.
getKeyword
())){
List
<
SelfRobotKeywordReply
>
replyList
=
selfRobotKeywordReplyDao
.
getListByKeywordId
(
selfRobotKeyword
.
getId
());
if
(
ListUtils
.
isEmpty
(
replyList
)){
continue
;
}
for
(
SelfRobotKeywordReply
keywordReply
:
replyList
){
if
(
ReplyTypeEnum
.
RESOURCE
.
value
.
equals
(
keywordReply
.
getType
())){
SendFileVO
sendFileVO
=
new
SendFileVO
();
SendFileVO
sendFileVO
=
new
SendFileVO
();
Map
<
Long
,
ResourceDTO
>
map
=
resourceConsr
.
mapByIds
(
Arrays
.
asList
(
selfRobotKeyword
.
getResourceId
()));
Map
<
Long
,
ResourceDTO
>
map
=
resourceConsr
.
mapByIds
(
Arrays
.
asList
(
keywordReply
.
getResourceId
()));
ResourceDTO
resourceDTO
=
map
.
get
(
selfRobotKeyword
.
getResourceId
());
ResourceDTO
resourceDTO
=
map
.
get
(
keywordReply
.
getResourceId
());
if
(
resourceDTO
!=
null
)
{
if
(
resourceDTO
!=
null
)
{
sendFileVO
.
setFileUrl
(
resourceDTO
.
getFileUrl
());
sendFileVO
.
setFileUrl
(
resourceDTO
.
getFileUrl
());
sendFileVO
.
setFileName
(
resourceDTO
.
getResourceName
());
sendFileVO
.
setFileName
(
resourceDTO
.
getResourceName
());
...
@@ -223,7 +204,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -223,7 +204,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
sendFileVO
.
setWxId
(
agreeAddUserDTO
.
getUserWxId
());
sendFileVO
.
setWxId
(
agreeAddUserDTO
.
getUserWxId
());
WxGroupSDK
.
sendFile
(
sendFileVO
);
WxGroupSDK
.
sendFile
(
sendFileVO
);
}
}
log
.
info
(
"临时demo发送个人号加好友信息"
+
vo
.
toString
());
}
}
Thread
.
sleep
(
1000
*
40
);
Thread
.
sleep
(
1000
*
40
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"发消息休眠5秒出错"
,
e
);
log
.
error
(
"发消息休眠5秒出错"
,
e
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
bb956790
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
View file @
bb956790
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/dao/SelfRobotKeywordReplyDao.java
0 → 100644
View file @
bb956790
package
com
.
pcloud
.
book
.
keywords
.
dao
;
import
com.pcloud.book.keywords.dto.MaxSeqNAndBGDTO
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.entity.SelfRobotKeywordReply
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
/**
* @Description
* @Author zhuyajie
* @Date 2020/02/03 11:39
**/
public
interface
SelfRobotKeywordReplyDao
extends
BaseDao
<
SelfRobotKeywordReply
>
{
void
deleteByKeywordId
(
Long
keywordId
);
List
<
SelfRobotKeywordReply
>
getListByKeywordId
(
Long
keywordId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/dao/impl/SelfRobotKeywordReplyDaoImpl.java
0 → 100644
View file @
bb956790
package
com
.
pcloud
.
book
.
keywords
.
dao
.
impl
;
import
com.pcloud.book.keywords.dao.SelfRobotKeywordDao
;
import
com.pcloud.book.keywords.dao.SelfRobotKeywordReplyDao
;
import
com.pcloud.book.keywords.dto.MaxSeqNAndBGDTO
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.entity.SelfRobotKeywordReply
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Description
* @Author zhuyajie
* @Date 2020/02/03 11:39
**/
@Component
(
"selfRobotKeywordReplyDao"
)
public
class
SelfRobotKeywordReplyDaoImpl
extends
BaseDaoImpl
<
SelfRobotKeywordReply
>
implements
SelfRobotKeywordReplyDao
{
@Override
public
void
deleteByKeywordId
(
Long
keywordId
)
{
getSessionTemplate
().
delete
(
getStatement
(
"deleteByKeywordId"
),
keywordId
);
}
@Override
public
List
<
SelfRobotKeywordReply
>
getListByKeywordId
(
Long
keywordId
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getListByKeywordId"
),
keywordId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/entity/SelfRobotKeyword.java
View file @
bb956790
...
@@ -27,66 +27,12 @@ public class SelfRobotKeyword extends BaseEntity {
...
@@ -27,66 +27,12 @@ public class SelfRobotKeyword extends BaseEntity {
@ApiModelProperty
(
"关键词"
)
@ApiModelProperty
(
"关键词"
)
private
String
keyword
;
private
String
keyword
;
@ApiModelProperty
(
"类型 1 文字 2 图片 3 链接 4应用 5素材"
)
private
Integer
type
;
@ApiModelProperty
(
"内容"
)
private
String
content
;
@ApiModelProperty
(
"描述"
)
private
String
description
;
@ApiModelProperty
(
"链接地址"
)
private
String
linkUrl
;
@ApiModelProperty
(
"图片地址"
)
private
String
picUrl
;
@ApiModelProperty
(
"应用或作品id"
)
private
Long
serveId
;
@ApiModelProperty
(
"应用或作品类型"
)
private
String
serveType
;
@ApiModelProperty
(
"资源id"
)
private
Long
resourceId
;
@ApiModelProperty
(
"排序值"
)
@ApiModelProperty
(
"排序值"
)
private
Integer
seqNum
;
private
Integer
seqNum
;
@ApiModelProperty
(
"创建人"
)
@ApiModelProperty
(
"创建人"
)
private
Long
createUser
;
private
Long
createUser
;
@ApiModelProperty
(
"应用或作品图片"
)
@ApiModelProperty
(
"关键词回复列表"
)
private
String
servePic
;
private
List
<
SelfRobotKeywordReply
>
keywordReplyList
;
@ApiModelProperty
(
"应用或作品名称"
)
private
String
serveName
;
@ApiModelProperty
(
"应用或作品类型名称"
)
private
String
serveTypeName
;
@ApiModelProperty
(
"应用或作品类型编码"
)
private
String
serveTypeCode
;
@ApiModelProperty
(
"资源链接"
)
private
String
resourceUrl
;
@ApiModelProperty
(
"资源名称"
)
private
String
resourceName
;
@ApiModelProperty
(
"资源类型编码"
)
private
String
resourceTypeCode
;
@ApiModelProperty
(
"资源类型名称"
)
private
String
resourceTypeName
;
@ApiModelProperty
(
"文件类型"
)
private
String
fileType
;
@ApiModelProperty
(
"pdf转码后的单张图片集合"
)
private
List
<
ResourcePdfItemDTO
>
resourcePdfItems
;
@ApiModelProperty
(
"文件转码后的单张图片集合"
)
private
List
<
ResourceOfficeItemDTO
>
resourceOfficeItemDTOs
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/entity/SelfRobotKeywordReply.java
0 → 100644
View file @
bb956790
package
com
.
pcloud
.
book
.
keywords
.
entity
;
import
com.pcloud.common.entity.BaseEntity
;
import
com.pcloud.contentcenter.resource.dto.ResourceOfficeItemDTO
;
import
com.pcloud.contentcenter.resource.dto.ResourcePdfItemDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Description
* @Author zhuyajie
* @Date 2020/02/03 11:39
**/
@Data
@ApiModel
(
"个人号关键词回复"
)
public
class
SelfRobotKeywordReply
extends
BaseEntity
{
@ApiModelProperty
(
"关键词id"
)
private
Long
keywordId
;
@ApiModelProperty
(
"类型 1 文字 2 图片 3 链接 4应用 5素材"
)
private
Integer
type
;
@ApiModelProperty
(
"内容"
)
private
String
content
;
@ApiModelProperty
(
"描述"
)
private
String
description
;
@ApiModelProperty
(
"链接地址"
)
private
String
linkUrl
;
@ApiModelProperty
(
"图片地址"
)
private
String
picUrl
;
@ApiModelProperty
(
"应用或作品id"
)
private
Long
serveId
;
@ApiModelProperty
(
"应用或作品类型"
)
private
String
serveType
;
@ApiModelProperty
(
"资源id"
)
private
Long
resourceId
;
@ApiModelProperty
(
"排序值"
)
private
Integer
seqNum
;
@ApiModelProperty
(
"创建人"
)
private
Long
createUser
;
@ApiModelProperty
(
"应用或作品图片"
)
private
String
servePic
;
@ApiModelProperty
(
"应用或作品名称"
)
private
String
serveName
;
@ApiModelProperty
(
"应用或作品类型名称"
)
private
String
serveTypeName
;
@ApiModelProperty
(
"应用或作品类型编码"
)
private
String
serveTypeCode
;
@ApiModelProperty
(
"资源链接"
)
private
String
resourceUrl
;
@ApiModelProperty
(
"资源名称"
)
private
String
resourceName
;
@ApiModelProperty
(
"资源类型编码"
)
private
String
resourceTypeCode
;
@ApiModelProperty
(
"资源类型名称"
)
private
String
resourceTypeName
;
@ApiModelProperty
(
"文件类型"
)
private
String
fileType
;
@ApiModelProperty
(
"pdf转码后的单张图片集合"
)
private
List
<
ResourcePdfItemDTO
>
resourcePdfItems
;
@ApiModelProperty
(
"文件转码后的单张图片集合"
)
private
List
<
ResourceOfficeItemDTO
>
resourceOfficeItemDTOs
;
}
pcloud-service-book/src/main/resources/mapper/group/SelfRobotKeyword.xml
View file @
bb956790
...
@@ -6,14 +6,6 @@
...
@@ -6,14 +6,6 @@
<result
column=
"book_group_id"
property=
"bookGroupId"
jdbcType=
"BIGINT"
/>
<result
column=
"book_group_id"
property=
"bookGroupId"
jdbcType=
"BIGINT"
/>
<result
column=
"guide"
property=
"guide"
jdbcType=
"VARCHAR"
/>
<result
column=
"guide"
property=
"guide"
jdbcType=
"VARCHAR"
/>
<result
column=
"keyword"
property=
"keyword"
jdbcType=
"VARCHAR"
/>
<result
column=
"keyword"
property=
"keyword"
jdbcType=
"VARCHAR"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"content"
property=
"content"
jdbcType=
"VARCHAR"
/>
<result
column=
"description"
property=
"description"
jdbcType=
"VARCHAR"
/>
<result
column=
"link_url"
property=
"linkUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"pic_url"
property=
"picUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"serve_id"
property=
"serveId"
jdbcType=
"BIGINT"
/>
<result
column=
"serve_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"resource_id"
property=
"resourceId"
jdbcType=
"BIGINT"
/>
<result
column=
"seq_num"
property=
"seqNum"
jdbcType=
"INTEGER"
/>
<result
column=
"seq_num"
property=
"seqNum"
jdbcType=
"INTEGER"
/>
<result
column=
"create_user"
property=
"createUser"
jdbcType=
"BIGINT"
/>
<result
column=
"create_user"
property=
"createUser"
jdbcType=
"BIGINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
...
@@ -21,8 +13,7 @@
...
@@ -21,8 +13,7 @@
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, book_group_id, guide, keyword, type, content, description, link_url, pic_url, serve_id,
id, book_group_id, guide, keyword, seq_num, create_user, create_time
serve_type, resource_id,seq_num,create_user, create_time
</sql>
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.keywords.entity.SelfRobotKeyword"
useGeneratedKeys=
"true"
<insert
id=
"insert"
parameterType=
"com.pcloud.book.keywords.entity.SelfRobotKeyword"
useGeneratedKeys=
"true"
...
@@ -32,14 +23,6 @@
...
@@ -32,14 +23,6 @@
book_group_id,
book_group_id,
guide,
guide,
keyword,
keyword,
type,
content,
description,
link_url,
pic_url,
serve_id,
serve_type,
resource_id,
seq_num,
seq_num,
create_user,
create_user,
create_time
create_time
...
@@ -48,14 +31,6 @@
...
@@ -48,14 +31,6 @@
#{bookGroupId,jdbcType=BIGINT},
#{bookGroupId,jdbcType=BIGINT},
#{guide,jdbcType=VARCHAR},
#{guide,jdbcType=VARCHAR},
#{keyword,jdbcType=VARCHAR},
#{keyword,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{content,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR},
#{linkUrl,jdbcType=VARCHAR},
#{picUrl,jdbcType=VARCHAR},
#{serveId,jdbcType=BIGINT},
#{serveType,jdbcType=VARCHAR},
#{resourceId,jdbcType=BIGINT},
#{seqNum,jdbcType=INTEGER},
#{seqNum,jdbcType=INTEGER},
#{createUser,jdbcType=BIGINT},
#{createUser,jdbcType=BIGINT},
NOW()
NOW()
...
@@ -68,14 +43,6 @@
...
@@ -68,14 +43,6 @@
book_group_id,
book_group_id,
guide,
guide,
keyword,
keyword,
type,
content,
description,
link_url,
pic_url,
serve_id,
serve_type,
resource_id,
seq_num,
seq_num,
create_user,
create_user,
create_time
create_time
...
@@ -85,14 +52,6 @@
...
@@ -85,14 +52,6 @@
#{item.bookGroupId,jdbcType=BIGINT},
#{item.bookGroupId,jdbcType=BIGINT},
#{item.guide,jdbcType=VARCHAR},
#{item.guide,jdbcType=VARCHAR},
#{item.keyword,jdbcType=VARCHAR},
#{item.keyword,jdbcType=VARCHAR},
#{item.type,jdbcType=INTEGER},
#{item.content,jdbcType=VARCHAR},
#{item.description,jdbcType=VARCHAR},
#{item.linkUrl,jdbcType=VARCHAR},
#{item.picUrl,jdbcType=VARCHAR},
#{item.serveId,jdbcType=BIGINT},
#{item.serveType,jdbcType=VARCHAR},
#{item.resourceId,jdbcType=BIGINT},
#{item.seqNum,jdbcType=INTEGER},
#{item.seqNum,jdbcType=INTEGER},
#{item.createUser,jdbcType=BIGINT},
#{item.createUser,jdbcType=BIGINT},
NOW()
NOW()
...
@@ -106,14 +65,6 @@
...
@@ -106,14 +65,6 @@
book_group_id = #{bookGroupId,jdbcType=BIGINT},
book_group_id = #{bookGroupId,jdbcType=BIGINT},
guide = #{guide,jdbcType=VARCHAR},
guide = #{guide,jdbcType=VARCHAR},
keyword = #{keyword,jdbcType=VARCHAR},
keyword = #{keyword,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
content = #{content,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
link_url = #{linkUrl,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR},
serve_id = #{serveId,jdbcType=BIGINT},
serve_type = #{serveType,jdbcType=VARCHAR},
resource_id = #{resourceId,jdbcType=BIGINT},
seq_num = #{seqNum,jdbcType=INTEGER}
seq_num = #{seqNum,jdbcType=INTEGER}
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
...
@@ -203,4 +154,10 @@
...
@@ -203,4 +154,10 @@
${item}
${item}
</foreach>
</foreach>
</select>
</select>
<select
id=
"getById"
parameterType=
"long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from self_robot_keyword
where id=#{id}
</select>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/group/SelfRobotKeywordReply.xml
0 → 100644
View file @
bb956790
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.keywords.dao.impl.SelfRobotKeywordReplyDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.keywords.entity.SelfRobotKeywordReply"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"keyword_id"
property=
"keywordId"
jdbcType=
"BIGINT"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"content"
property=
"content"
jdbcType=
"VARCHAR"
/>
<result
column=
"description"
property=
"description"
jdbcType=
"VARCHAR"
/>
<result
column=
"link_url"
property=
"linkUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"pic_url"
property=
"picUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"serve_id"
property=
"serveId"
jdbcType=
"BIGINT"
/>
<result
column=
"serve_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"resource_id"
property=
"resourceId"
jdbcType=
"BIGINT"
/>
<result
column=
"seq_num"
property=
"seqNum"
jdbcType=
"INTEGER"
/>
<result
column=
"create_user"
property=
"createUser"
jdbcType=
"BIGINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, keyword_id, type, content, description, link_url, pic_url, serve_id,
serve_type, resource_id, seq_num, create_user, create_time
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.keywords.entity.SelfRobotKeywordReply"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into self_robot_keyword_reply
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
keyword_id,
type,
content,
description,
link_url,
pic_url,
serve_id,
serve_type,
resource_id,
seq_num,
create_user,
create_time
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{keywordId,jdbcType=BIGINT},
#{type,jdbcType=INTEGER},
#{content,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR},
#{linkUrl,jdbcType=VARCHAR},
#{picUrl,jdbcType=VARCHAR},
#{serveId,jdbcType=BIGINT},
#{serveType,jdbcType=VARCHAR},
#{resourceId,jdbcType=BIGINT},
#{seqNum,jdbcType=INTEGER},
#{createUser,jdbcType=BIGINT},
NOW()
</trim>
</insert>
<!--批量插入-->
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.keywords.entity.SelfRobotKeywordReply"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into self_robot_keyword_reply (
keyword_id,
type,
content,
description,
link_url,
pic_url,
serve_id,
serve_type,
resource_id,
seq_num,
create_user,
create_time
) values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.keywordId,jdbcType=BIGINT},
#{item.type,jdbcType=INTEGER},
#{item.content,jdbcType=VARCHAR},
#{item.description,jdbcType=VARCHAR},
#{item.linkUrl,jdbcType=VARCHAR},
#{item.picUrl,jdbcType=VARCHAR},
#{item.serveId,jdbcType=BIGINT},
#{item.serveType,jdbcType=VARCHAR},
#{item.resourceId,jdbcType=BIGINT},
#{item.seqNum,jdbcType=INTEGER},
#{item.createUser,jdbcType=BIGINT},
NOW()
)
</foreach>
</insert>
<delete
id=
"deleteByKeywordId"
parameterType=
"map"
>
delete from self_robot_keyword_reply
where keyword_id = #{keywordId}
</delete>
<select
id=
"getListByKeywordId"
parameterType=
"long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from self_robot_keyword_reply
where keyword_id = #{keywordId}
order by seq_num, id
</select>
</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