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
378d7423
Commit
378d7423
authored
Feb 20, 2020
by
zhuyajie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人工客服
parent
dc20d34f
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
726 additions
and
8 deletions
+726
-8
WechatGroupConsr.java
...om/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
+12
-0
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+12
-0
PcloudRobotBiz.java
...ava/com/pcloud/book/pcloudkeyword/biz/PcloudRobotBiz.java
+17
-0
PcloudRobotMemoBiz.java
...com/pcloud/book/pcloudkeyword/biz/PcloudRobotMemoBiz.java
+27
-0
PcloudRobotBizImpl.java
...cloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
+101
-1
PcloudRobotMemoBizImpl.java
...d/book/pcloudkeyword/biz/impl/PcloudRobotMemoBizImpl.java
+115
-0
PcloudRobotMemoDao.java
...com/pcloud/book/pcloudkeyword/dao/PcloudRobotMemoDao.java
+19
-0
PcloudRobotMemoGroupDao.java
...cloud/book/pcloudkeyword/dao/PcloudRobotMemoGroupDao.java
+17
-0
PcloudRobotMemoDaoImpl.java
...d/book/pcloudkeyword/dao/impl/PcloudRobotMemoDaoImpl.java
+38
-0
PcloudRobotMemoGroupDaoImpl.java
...k/pcloudkeyword/dao/impl/PcloudRobotMemoGroupDaoImpl.java
+31
-0
PcloudRobotMemoGroupDto.java
...cloud/book/pcloudkeyword/dto/PcloudRobotMemoGroupDto.java
+17
-0
PcloudRobot.java
...ava/com/pcloud/book/pcloudkeyword/entity/PcloudRobot.java
+3
-0
PcloudRobotMemo.java
...com/pcloud/book/pcloudkeyword/entity/PcloudRobotMemo.java
+14
-0
PcloudRobotMemoGroup.java
...cloud/book/pcloudkeyword/entity/PcloudRobotMemoGroup.java
+16
-0
PcloudRobotFacade.java
...m/pcloud/book/pcloudkeyword/facade/PcloudRobotFacade.java
+41
-0
PcloudRobotMemoFacade.java
...loud/book/pcloudkeyword/facade/PcloudRobotMemoFacade.java
+116
-0
PcloudSkillBiz.java
...c/main/java/com/pcloud/book/skill/biz/PcloudSkillBiz.java
+3
-1
PcloudSkillBizImpl.java
...va/com/pcloud/book/skill/biz/impl/PcloudSkillBizImpl.java
+6
-1
PcloudSkillFacade.java
.../java/com/pcloud/book/skill/facade/PcloudSkillFacade.java
+5
-2
PcloudRobotMemo.Mapper.xml
...resources/mapper/pcloudkeyword/PcloudRobotMemo.Mapper.xml
+55
-0
PcloudRobotMemoGroup.Mapper.xml
...rces/mapper/pcloudkeyword/PcloudRobotMemoGroup.Mapper.xml
+40
-0
PcloudSkilll.xml
...ice-book/src/main/resources/mapper/skill/PcloudSkilll.xml
+21
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
View file @
378d7423
...
...
@@ -657,4 +657,16 @@ public class WechatGroupConsr {
log
.
error
(
"[groupMemberService.sendQrcodeLoginEmail]发送登录二维码邮件调用失败"
+
e
.
getMessage
(),
e
);
}
}
@ParamLog
(
"获取用户服务状态"
)
public
Integer
getServiceStateByRobotUser
(
String
robotId
,
String
wxUserId
){
Integer
serviceState
=
0
;
try
{
serviceState
=
ResponseHandleUtil
.
parseResponse
(
selfRobotService
.
getServiceStateByRobotUser
(
robotId
,
wxUserId
),
Integer
.
class
);
}
catch
(
Exception
e
){
log
.
error
(
"[selfRobotService.getServiceStateByRobotUser]调用失败"
+
e
.
getMessage
(),
e
);
}
return
serviceState
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
378d7423
...
...
@@ -746,6 +746,12 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
Integer
code
=
sendTextDTO
.
getCode
();
String
robotId
=
sendTextDTO
.
getWxId
();
Long
robotClassifyId
=
pcloudRobot
.
getRobotType
().
longValue
();
//判断人工客服服务状态
Integer
serviceState
=
wechatGroupConsr
.
getServiceStateByRobotUser
(
robotId
,
userWxId
);
if
(
serviceState
==
1
){
log
.
info
(
"人工客服服务中,userWxId="
+
userWxId
+
"+robotId+"
+
robotId
);
return
;
}
PcloudRobotClassify
robotClassify
=
pcloudRobotClassifyDao
.
getById
(
robotClassifyId
);
if
(
robotClassify
==
null
||
robotClassify
.
getKeywordClassifyId
()==
null
){
return
;
...
...
@@ -1111,6 +1117,12 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
@ParamLog
(
"非关键词响应"
)
@Override
public
void
sendPcloudNotKeyWord
(
String
userWxId
,
String
ip
,
Integer
code
,
String
robotId
,
Long
pcloudClassifyId
,
Integer
userMessageType
)
{
//判断人工客服服务状态
Integer
serviceState
=
wechatGroupConsr
.
getServiceStateByRobotUser
(
robotId
,
userWxId
);
if
(
serviceState
==
1
){
log
.
info
(
"人工客服服务中,userWxId="
+
userWxId
+
"+robotId+"
+
robotId
);
return
;
}
//1min不重复回复
String
key
=
"BOOK:PCLOUD_NOT_KEYWORD:"
+
userWxId
+
"-"
+
robotId
+
"-"
+
pcloudClassifyId
;
String
redisContent
=
JedisClusterUtils
.
getJson
(
key
,
String
.
class
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/PcloudRobotBiz.java
View file @
378d7423
...
...
@@ -80,4 +80,21 @@ public interface PcloudRobotBiz {
void
setClassifyRobot
(
String
wxId
,
Integer
classifyId
);
void
removeClassifyRobot
(
String
wxId
,
Integer
classifyId
);
PageBeanNew
<
PcloudRobot
>
listPcloudRobot4Service
(
Integer
classifyId
,
String
nickName
,
Integer
currentPage
,
Integer
numPerPage
);
/**
* 生成技能链接
*/
public
String
generateLinkBySkill
(
Long
skillId
,
String
userWxId
,
String
robotId
);
/**
* 生成图书链接
*/
public
String
generateLinkByBook
(
Long
bookId
,
Long
adviserId
,
Long
channelId
,
String
userWxId
,
String
robotId
);
/**
* 生成应用/作品链接
*/
public
String
generateLinkbyAppProduct
(
String
link
,
Long
serveId
,
String
serveType
,
String
userWxId
,
String
robotId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/PcloudRobotMemoBiz.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
biz
;
import
com.pcloud.book.pcloudkeyword.dto.PcloudRobotMemoGroupDto
;
import
com.pcloud.book.pcloudkeyword.entity.*
;
import
java.util.List
;
public
interface
PcloudRobotMemoBiz
{
void
createMemoGroup
(
PcloudRobotMemoGroup
pcloudRobotMemoGroup
);
void
createPcloudRobotMemo
(
PcloudRobotMemo
pcloudRobotMemo
);
void
updatePcloudRobotMemo
(
PcloudRobotMemo
pcloudRobotMemo
);
void
deleteById
(
Long
MemoId
);
List
<
PcloudRobotMemoGroupDto
>
getPcloudRobotMemo
();
List
<
PcloudRobotMemo
>
getMemoByContext
(
String
context
);
void
updateMemoGroup
(
PcloudRobotMemoGroup
pcloudRobotMemoGroup
);
void
deleteMemoGroupById
(
Long
id
);
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
biz
.
impl
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.book.dao.BookDao
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.consumer.channel.QrcodeSceneConsr
;
import
com.pcloud.book.consumer.content.ResourceConsr
;
import
com.pcloud.book.consumer.resource.ProductConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.group.constant.BookBusinessConstants
;
import
com.pcloud.book.group.enums.AppAndProductTypeEnum
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.guide.biz.PcloudGuideBiz
;
import
com.pcloud.book.guide.biz.PcloudRobotWakeUpBiz
;
import
com.pcloud.book.guide.mapper.PcloudRobotSilenceMapper
;
...
...
@@ -25,7 +32,10 @@ import com.pcloud.book.pcloudkeyword.enums.WelcomeReplyTypeEnum;
import
com.pcloud.book.pcloudkeyword.set.PcloudRobotSet
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotResponseVO
;
import
com.pcloud.book.push.biz.SelfPushBiz
;
import
com.pcloud.book.skill.biz.PcloudSkillBiz
;
import
com.pcloud.book.skill.entity.PcloudSkill
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.channelcenter.wechat.dto.AccountSettingDto
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageParam
;
...
...
@@ -36,6 +46,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import
com.pcloud.common.utils.httpclient.UrlUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.contentcenter.resource.dto.ResourceDTO
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
com.pcloud.wechatgroup.message.dto.SendTextDTO
;
import
com.pcloud.wechatgroup.selfrobot.dto.RobotBaseInfoDTO
;
import
com.sdk.wxgroup.SendFileVO
;
...
...
@@ -43,6 +54,7 @@ import com.sdk.wxgroup.SendMessageTypeEnum;
import
com.sdk.wxgroup.SendPicMessageVO
;
import
com.sdk.wxgroup.SendTextMessageVO
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
org.apache.commons.collections.MapUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -50,7 +62,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.pcloud.book.consumer.app.AppConsr
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -98,6 +110,16 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
private
PcloudRobotSet
pcloudRobotSet
;
@Autowired
private
WechatGroupConsr
wechatGroupConsr
;
@Autowired
private
PcloudSkillBiz
pcloudSkillBiz
;
@Autowired
private
BookDao
bookDao
;
@Autowired
private
AppConsr
appConsr
;
@Autowired
private
ProductConsr
productConsr
;
@Autowired
private
QrcodeSceneConsr
qrcodeSceneConsr
;
@ParamLog
(
value
=
"[changeRobotRealStatus]"
,
isAfterReturn
=
false
)
@Override
...
...
@@ -673,4 +695,82 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
}
}
}
@Override
@ParamLog
public
PageBeanNew
<
PcloudRobot
>
listPcloudRobot4Service
(
Integer
classifyId
,
String
nickName
,
Integer
currentPage
,
Integer
numPerPage
)
{
if
(
currentPage
==
null
||
currentPage
<
0
||
numPerPage
==
null
||
numPerPage
<=
0
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"分页参数错误"
);
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"classifyId"
,
classifyId
);
map
.
put
(
"nickName"
,
nickName
);
PageBeanNew
<
PcloudRobot
>
pageBeanNew
=
pcloudRobotDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"getPcloudRobotList"
);
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
}
List
<
PcloudRobot
>
list
=
pageBeanNew
.
getRecordList
();
List
<
String
>
robotIds
=
list
.
stream
().
filter
(
s
->
s
.
getWxId
()!=
null
).
map
(
PcloudRobot:
:
getWxId
).
distinct
().
collect
(
Collectors
.
toList
());
//接收消息数量
Map
<
String
,
Integer
>
msgCountMap
=
new
HashMap
<>();
if
(!
ListUtils
.
isEmpty
(
robotIds
)){
msgCountMap
=
wechatGroupConsr
.
mapReceiveMsgCountByIds
(
robotIds
);
}
for
(
PcloudRobot
pcloudRobot
:
pageBeanNew
.
getRecordList
())
{
if
(!
MapUtils
.
isEmpty
(
msgCountMap
)
&&
msgCountMap
.
containsKey
(
pcloudRobot
.
getWxId
())){
pcloudRobot
.
setReceiveMsgCount
(
msgCountMap
.
get
(
pcloudRobot
.
getWxId
()));
}
}
return
pageBeanNew
;
}
@Override
public
String
generateLinkBySkill
(
Long
skillId
,
String
userWxId
,
String
robotId
){
String
content
=
""
;
PcloudSkill
pcloudSkill
=
pcloudSkillBiz
.
getPcloudSkill
(
skillId
);
if
(
null
!=
pcloudSkill
){
content
=
pcloudSkill
.
getTitle
();
}
String
h5link
=
wechatLinkPrefix
+
"/dialog?wxId="
+
userWxId
+
"&robotWxId="
+
robotId
+
"&skillId="
+
skillId
;
String
linkUrl
=
content
+
"\n"
+
UrlUtils
.
getShortUrl4Own
(
h5link
);
return
linkUrl
;
}
@Override
public
String
generateLinkByBook
(
Long
bookId
,
Long
adviserId
,
Long
channelId
,
String
userWxId
,
String
robotId
){
String
content
=
""
;
BookDto
bookDto
=
bookDao
.
getBaseById
(
bookId
);
if
(
null
!=
bookDto
){
content
=
bookDto
.
getBookName
();
}
String
h5link
=
wechatLinkPrefix
+
"/dialog/resource?bookId="
+
bookId
+
"&adviserId="
+
adviserId
+
"&channelId="
+
channelId
+
"&wxId="
+
userWxId
+
"&robotWxId="
+
robotId
;
String
linkUrl
=
content
+
"\n"
+
UrlUtils
.
getShortUrl4Own
(
h5link
);
return
linkUrl
;
}
@Override
public
String
generateLinkbyAppProduct
(
String
link
,
Long
serveId
,
String
serveType
,
String
userWxId
,
String
robotId
){
String
title
=
""
;
String
resultUrl
=
""
;
String
linkUrl
=
""
;
if
(
AppAndProductTypeEnum
.
APP
.
value
.
equalsIgnoreCase
(
serveType
))
{
AppDto
appDto
=
appConsr
.
getBaseById
(
serveId
);
if
(
appDto
!=
null
)
{
title
=
appDto
.
getTitle
();
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
appDto
.
getChannelId
());
String
endUrl
=
link
+
"&wxId="
+
userWxId
+
"&robotWxId="
+
robotId
;
linkUrl
=
SendWeixinRequestTools
.
splitUrl
(
accountSettingDto
,
endUrl
);
}
}
else
if
(
AppAndProductTypeEnum
.
PRODUCT
.
value
.
equalsIgnoreCase
(
serveType
)){
ProductDto
productDto
=
productConsr
.
getProBaseById
(
serveId
);
if
(
productDto
!=
null
)
{
title
=
productDto
.
getProductName
();
linkUrl
=
link
+
"&wxId="
+
userWxId
+
"&robotWxId="
+
robotId
;
}
}
resultUrl
=
title
+
"\n"
+
UrlUtils
.
getShortUrl4Own
(
linkUrl
);
return
resultUrl
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/impl/PcloudRobotMemoBizImpl.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
biz
.
impl
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.consumer.content.ResourceConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.guide.biz.PcloudGuideBiz
;
import
com.pcloud.book.guide.biz.PcloudRobotWakeUpBiz
;
import
com.pcloud.book.guide.mapper.PcloudRobotSilenceMapper
;
import
com.pcloud.book.pcloudKeyword.dto.RobotClassifyDTO
;
import
com.pcloud.book.pcloudkeyword.biz.PcloudRobotBiz
;
import
com.pcloud.book.pcloudkeyword.biz.PcloudRobotClassifyBiz
;
import
com.pcloud.book.pcloudkeyword.biz.PcloudRobotMemoBiz
;
import
com.pcloud.book.pcloudkeyword.dao.*
;
import
com.pcloud.book.pcloudkeyword.dto.PcloudRobotMemoGroupDto
;
import
com.pcloud.book.pcloudkeyword.dto.PcloudTdDTO
;
import
com.pcloud.book.pcloudkeyword.dto.PcloudTdReplyDTO
;
import
com.pcloud.book.pcloudkeyword.entity.*
;
import
com.pcloud.book.pcloudkeyword.enums.WelcomeReplyTypeEnum
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotResponseVO
;
import
com.pcloud.book.pcloudkeyword.set.PcloudRobotSet
;
import
com.pcloud.book.push.biz.SelfPushBiz
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.utils.BeanUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.QrcodeUtils
;
import
com.pcloud.common.utils.httpclient.UrlUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.contentcenter.resource.dto.ResourceDTO
;
import
com.pcloud.wechatgroup.message.dto.SendTextDTO
;
import
com.pcloud.wechatgroup.selfrobot.dto.RobotBaseInfoDTO
;
import
com.sdk.wxgroup.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Component
(
"pcloudRobotMemoBiz"
)
public
class
PcloudRobotMemoBizImpl
implements
PcloudRobotMemoBiz
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
PcloudRobotMemoBizImpl
.
class
);
@Autowired
private
PcloudRobotMemoDao
pcloudRobotMemoDao
;
@Autowired
private
PcloudRobotMemoGroupDao
pcloudRobotMemoGroupDao
;
@Override
public
void
createMemoGroup
(
PcloudRobotMemoGroup
pcloudRobotMemoGroup
)
{
pcloudRobotMemoGroupDao
.
insert
(
pcloudRobotMemoGroup
);
}
@Override
public
void
createPcloudRobotMemo
(
PcloudRobotMemo
pcloudRobotMemo
)
{
pcloudRobotMemoDao
.
insert
(
pcloudRobotMemo
);
}
@Override
public
void
updatePcloudRobotMemo
(
PcloudRobotMemo
pcloudRobotMemo
)
{
pcloudRobotMemoDao
.
updateById
(
pcloudRobotMemo
);
}
@Override
public
void
deleteById
(
Long
memoId
)
{
pcloudRobotMemoDao
.
deleteById
(
memoId
);
}
@Override
public
List
<
PcloudRobotMemoGroupDto
>
getPcloudRobotMemo
()
{
List
<
PcloudRobotMemoGroupDto
>
dtoList
=
new
ArrayList
<>();
List
<
PcloudRobotMemoGroup
>
pcloudRobotMemoGroupList
=
pcloudRobotMemoGroupDao
.
getAllGroup
();
for
(
PcloudRobotMemoGroup
group:
pcloudRobotMemoGroupList
)
{
PcloudRobotMemoGroupDto
dto
=
new
PcloudRobotMemoGroupDto
();
dto
.
setGroupId
(
group
.
getId
());
dto
.
setGroupName
(
group
.
getGroupName
());
List
<
PcloudRobotMemo
>
list
=
pcloudRobotMemoDao
.
getMemoListByGroupId
(
group
.
getId
());
dto
.
setPcloudRobotMemoList
(
list
);
dtoList
.
add
(
dto
);
}
return
dtoList
;
}
@Override
public
List
<
PcloudRobotMemo
>
getMemoByContext
(
String
context
)
{
return
pcloudRobotMemoDao
.
getMemoByContext
(
context
);
}
@Override
public
void
updateMemoGroup
(
PcloudRobotMemoGroup
pcloudRobotMemoGroup
)
{
pcloudRobotMemoGroupDao
.
updateById
(
pcloudRobotMemoGroup
);
}
@Override
public
void
deleteMemoGroupById
(
Long
id
)
{
pcloudRobotMemoGroupDao
.
deleteById
(
id
);
List
<
PcloudRobotMemo
>
list
=
pcloudRobotMemoDao
.
getMemoListByGroupId
(
id
);
for
(
PcloudRobotMemo
memo:
list
)
{
pcloudRobotMemoDao
.
deleteById
(
memo
.
getId
());
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/PcloudRobotMemoDao.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
dao
;
import
com.pcloud.book.pcloudKeyword.dto.RobotClassifyDTO
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobot
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobotMemo
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
import
java.util.Map
;
public
interface
PcloudRobotMemoDao
extends
BaseDao
<
PcloudRobotMemo
>
{
List
<
PcloudRobotMemo
>
getMemoListByGroupId
(
Long
id
);
List
<
PcloudRobotMemo
>
getMemoByContext
(
String
context
);
void
updateById
(
PcloudRobotMemo
pcloudRobotMemo
);
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/PcloudRobotMemoGroupDao.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
dao
;
import
com.pcloud.book.pcloudKeyword.dto.RobotClassifyDTO
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobot
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobotMemoGroup
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
import
java.util.Map
;
public
interface
PcloudRobotMemoGroupDao
extends
BaseDao
<
PcloudRobotMemoGroup
>
{
List
<
PcloudRobotMemoGroup
>
getAllGroup
();
void
updateById
(
PcloudRobotMemoGroup
pcloudRobotMemoGroup
);
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/impl/PcloudRobotMemoDaoImpl.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
dao
.
impl
;
import
com.pcloud.book.pcloudkeyword.dao.PcloudRobotMemoDao
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobotMemo
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Component
(
"pcloudRobotMemoDao"
)
public
class
PcloudRobotMemoDaoImpl
extends
BaseDaoImpl
<
PcloudRobotMemo
>
implements
PcloudRobotMemoDao
{
@Override
public
List
<
PcloudRobotMemo
>
getMemoListByGroupId
(
Long
groupId
)
{
return
this
.
getSessionTemplate
().
selectList
(
this
.
getStatement
(
"getMemoListByGroupId"
),
groupId
);
}
@Override
public
List
<
PcloudRobotMemo
>
getMemoByContext
(
String
context
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"context"
,
context
);
return
this
.
getSessionTemplate
().
selectList
(
this
.
getStatement
(
"getMemoByContext"
),
paramMap
);
}
@Override
public
void
updateById
(
PcloudRobotMemo
pcloudRobotMemo
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"id"
,
pcloudRobotMemo
.
getId
());
paramMap
.
put
(
"context"
,
pcloudRobotMemo
.
getContext
());
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"updateById"
),
paramMap
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/impl/PcloudRobotMemoGroupDaoImpl.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
dao
.
impl
;
import
com.pcloud.book.pcloudKeyword.dto.RobotClassifyDTO
;
import
com.pcloud.book.pcloudkeyword.dao.PcloudRobotDao
;
import
com.pcloud.book.pcloudkeyword.dao.PcloudRobotMemoGroupDao
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobot
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobotMemoGroup
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Component
(
"pcloudRobotMemoGroupDao"
)
public
class
PcloudRobotMemoGroupDaoImpl
extends
BaseDaoImpl
<
PcloudRobotMemoGroup
>
implements
PcloudRobotMemoGroupDao
{
@Override
public
List
<
PcloudRobotMemoGroup
>
getAllGroup
()
{
return
this
.
getSessionTemplate
().
selectList
(
this
.
getStatement
(
"getAllGroup"
));
}
@Override
public
void
updateById
(
PcloudRobotMemoGroup
pcloudRobotMemoGroup
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"id"
,
pcloudRobotMemoGroup
.
getId
());
paramMap
.
put
(
"groupName"
,
pcloudRobotMemoGroup
.
getGroupName
());
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"updateById"
),
paramMap
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dto/PcloudRobotMemoGroupDto.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
dto
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobotMemo
;
import
com.pcloud.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
"备忘录分组"
)
public
class
PcloudRobotMemoGroupDto
extends
BaseEntity
{
private
Long
groupId
;
private
String
groupName
;
List
<
PcloudRobotMemo
>
pcloudRobotMemoList
;
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/entity/PcloudRobot.java
View file @
378d7423
...
...
@@ -61,4 +61,7 @@ public class PcloudRobot extends BaseEntity {
@ApiModelProperty
(
"欢迎语间隔时长"
)
private
Integer
welcomeDuration
;
@ApiModelProperty
(
"接收消息数量"
)
private
Integer
receiveMsgCount
;
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/entity/PcloudRobotMemo.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
entity
;
import
com.pcloud.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
"备忘录"
)
public
class
PcloudRobotMemo
extends
BaseEntity
{
private
Long
id
;
private
Long
groupId
;
private
String
context
;
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/entity/PcloudRobotMemoGroup.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
entity
;
import
com.pcloud.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
"备忘录分组"
)
public
class
PcloudRobotMemoGroup
extends
BaseEntity
{
private
Long
id
;
private
String
groupName
;
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/facade/PcloudRobotFacade.java
View file @
378d7423
...
...
@@ -239,4 +239,45 @@ public class PcloudRobotFacade {
return
new
ResponseDto
<>();
}
@ApiOperation
(
"人工客服获取全平台个人号列表"
)
@GetMapping
(
"/listPcloudRobot4Service"
)
ResponseDto
<?>
listPcloudRobot4Service
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestParam
(
value
=
"classifyId"
,
required
=
false
)
@ApiParam
(
"分类"
)
Integer
classifyId
,
@RequestParam
(
value
=
"nickName"
,
required
=
false
)
@ApiParam
(
"昵称"
)
String
nickName
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
pcloudRobotBiz
.
listPcloudRobot4Service
(
classifyId
,
nickName
,
currentPage
,
numPerPage
));
}
@ApiOperation
(
"生成技能链接"
)
@GetMapping
(
"generateLinkBySkill"
)
public
ResponseDto
<?>
generateLinkBySkill
(
@RequestParam
(
"skillId"
)
@ApiParam
(
"技能id"
)
Long
skillId
,
@RequestParam
(
"userWxId"
)
@ApiParam
(
"用户微信id"
)
String
userWxId
,
@RequestParam
(
"robotId"
)
@ApiParam
(
"个人号id"
)
String
robotId
){
return
new
ResponseDto
<>(
pcloudRobotBiz
.
generateLinkBySkill
(
skillId
,
userWxId
,
robotId
));
}
@ApiOperation
(
"生成图书链接"
)
@GetMapping
(
"generateLinkByBook"
)
public
ResponseDto
<?>
generateLinkByBook
(
@RequestParam
(
"bookId"
)
@ApiParam
(
"图书id"
)
Long
bookId
,
@RequestParam
(
"adviserId"
)
@ApiParam
(
"编辑id"
)
Long
adviserId
,
@RequestParam
(
"channelId"
)
@ApiParam
(
"渠道id"
)
Long
channelId
,
@RequestParam
(
"userWxId"
)
@ApiParam
(
"用户微信id"
)
String
userWxId
,
@RequestParam
(
"robotId"
)
@ApiParam
(
"个人号id"
)
String
robotId
){
return
new
ResponseDto
<>(
pcloudRobotBiz
.
generateLinkByBook
(
bookId
,
adviserId
,
channelId
,
userWxId
,
robotId
));
}
@ApiOperation
(
"生成应用/作品链接"
)
@GetMapping
(
"generateLinkbyAppProduct"
)
public
ResponseDto
<?>
generateLinkbyAppProduct
(
@RequestParam
(
"link"
)
@ApiParam
(
"链接路由"
)
String
link
,
@RequestParam
(
"serveId"
)
@ApiParam
(
"应用/作品id"
)
Long
serveId
,
@RequestParam
(
"serveType"
)
@ApiParam
(
"APP/PRODUCT"
)
String
serveType
,
@RequestParam
(
"userWxId"
)
@ApiParam
(
"用户微信id"
)
String
userWxId
,
@RequestParam
(
"robotId"
)
@ApiParam
(
"个人号id"
)
String
robotId
){
return
new
ResponseDto
<>(
pcloudRobotBiz
.
generateLinkbyAppProduct
(
link
,
serveId
,
serveType
,
userWxId
,
robotId
));
}
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/facade/PcloudRobotMemoFacade.java
0 → 100644
View file @
378d7423
package
com
.
pcloud
.
book
.
pcloudkeyword
.
facade
;
import
com.pcloud.book.pcloudkeyword.biz.PcloudRobotMemoBiz
;
import
com.pcloud.book.pcloudkeyword.entity.*
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.SessionUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
@Api
(
"备忘录"
)
@RestController
(
"pcloudRobotMemo"
)
@RequestMapping
(
"pcloudRobotMemoFacade"
)
public
class
PcloudRobotMemoFacade
{
@Autowired
private
PcloudRobotMemoBiz
pcloudRobotMemoBiz
;
@ApiOperation
(
"新建分组"
)
@PostMapping
(
"/createMemoGroup"
)
ResponseDto
<?>
createMemoGroup
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
@ApiParam
(
"备忘录分组"
)
PcloudRobotMemoGroup
pcloudRobotMemoGroup
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
pcloudRobotMemoBiz
.
createMemoGroup
(
pcloudRobotMemoGroup
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
"修改分组"
)
@PostMapping
(
"/updateMemoGroup"
)
ResponseDto
<?>
updateMemoGroup
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
@ApiParam
(
"备忘录"
)
PcloudRobotMemoGroup
pcloudRobotMemoGroup
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
pcloudRobotMemoBiz
.
updateMemoGroup
(
pcloudRobotMemoGroup
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
"删除分组"
)
@PostMapping
(
"/deleteMemoGroup"
)
ResponseDto
<?>
deleteMemoGroup
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
@ApiParam
(
"备忘录Id"
)
PcloudRobotMemoGroup
pcloudRobotMemoGroup
)
throws
Exception
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
pcloudRobotMemoGroup
.
getId
()==
1
){
throw
new
Exception
(
"默认分组无法被删除"
);
}
pcloudRobotMemoBiz
.
deleteMemoGroupById
(
pcloudRobotMemoGroup
.
getId
());
return
new
ResponseDto
<>();
}
@ApiOperation
(
"新建备忘录"
)
@PostMapping
(
"/createPcloudRobotMemo"
)
ResponseDto
<?>
createPcloudRobotMemo
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
@ApiParam
(
"备忘录"
)
PcloudRobotMemo
pcloudRobotMemo
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
pcloudRobotMemoBiz
.
createPcloudRobotMemo
(
pcloudRobotMemo
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
"修改备忘录"
)
@PostMapping
(
"/updatePcloudRobotMemo"
)
ResponseDto
<?>
updatePcloudRobotMemo
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
@ApiParam
(
"备忘录"
)
PcloudRobotMemo
pcloudRobotMemo
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
pcloudRobotMemoBiz
.
updatePcloudRobotMemo
(
pcloudRobotMemo
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
"删除备忘录"
)
@PostMapping
(
"/deletePcloudRobotMemo"
)
ResponseDto
<?>
deletePcloudRobotMemo
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
@ApiParam
(
"备忘录Id"
)
PcloudRobotMemo
pcloudRobotMemo
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
pcloudRobotMemoBiz
.
deleteById
(
pcloudRobotMemo
.
getId
());
return
new
ResponseDto
<>();
}
@ApiOperation
(
"查询备忘录"
)
@GetMapping
(
"/getPcloudRobotMemo"
)
ResponseDto
<?>
getPcloudRobotMemo
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
pcloudRobotMemoBiz
.
getPcloudRobotMemo
());
}
@ApiOperation
(
"通过内容查询备忘录"
)
@GetMapping
(
"/getMemoByContext"
)
ResponseDto
<?>
getMemoByContext
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
String
context
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
pcloudRobotMemoBiz
.
getMemoByContext
(
context
));
}
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/PcloudSkillBiz.java
View file @
378d7423
...
...
@@ -20,7 +20,9 @@ public interface PcloudSkillBiz {
void
sendResource
(
Integer
id
,
String
wxUserId
,
String
robotId
,
Integer
relSkillId
);
PageBeanNew
<
PcloudSkill
>
getPcloudSkillList4Select
(
Integer
skillType
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
);
PageBeanNew
<
PcloudSkill
>
getPcloudSkillList4Select
(
Integer
skillType
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
depLabelId
,
Long
proLabelId
,
Long
purLabelId
);
PcloudSkill
getPcloudSkillBaseInfoById
(
Long
id
);
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/impl/PcloudSkillBizImpl.java
View file @
378d7423
...
...
@@ -312,7 +312,9 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz {
}
@Override
public
PageBeanNew
<
PcloudSkill
>
getPcloudSkillList4Select
(
Integer
skillType
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
)
{
public
PageBeanNew
<
PcloudSkill
>
getPcloudSkillList4Select
(
Integer
skillType
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
depLabelId
,
Long
proLabelId
,
Long
purLabelId
)
{
if
(
currentPage
==
null
||
currentPage
<
0
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"当前页不能为空且不能小于0!"
);
}
...
...
@@ -322,6 +324,9 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"skillType"
,
skillType
);
map
.
put
(
"name"
,
name
);
map
.
put
(
"depLabelId"
,
depLabelId
);
map
.
put
(
"proLabelId"
,
proLabelId
);
map
.
put
(
"purLabelId"
,
purLabelId
);
PageBeanNew
<
PcloudSkill
>
page
=
pcloudSkillDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"getPcloudSkillList4Select"
);
if
(
ListUtils
.
isEmpty
(
page
.
getRecordList
())){
return
page
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/skill/facade/PcloudSkillFacade.java
View file @
378d7423
...
...
@@ -71,10 +71,13 @@ public class PcloudSkillFacade {
@RequestParam
(
value
=
"skillType"
,
required
=
false
)
@ApiParam
(
"技能类型:1时间管理,2共读活动,3配套资料,4教辅书单,5配套老师,6音乐"
)
Integer
skillType
,
@RequestParam
(
"currentPage"
)
@ApiParam
(
"当前页"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
@ApiParam
(
"每页条数"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
@ApiParam
(
"名称搜索"
)
String
name
@RequestParam
(
value
=
"name"
,
required
=
false
)
@ApiParam
(
"名称搜索"
)
String
name
,
@RequestParam
(
value
=
"depLabelId"
,
required
=
false
)
@ApiParam
(
"深度标签"
)
Long
depLabelId
,
@RequestParam
(
value
=
"proLabelId"
,
required
=
false
)
@ApiParam
(
"专业标签"
)
Long
proLabelId
,
@RequestParam
(
value
=
"purLabelId"
,
required
=
false
)
@ApiParam
(
"目的标签"
)
Long
purLabelId
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
pcloudSkillBiz
.
getPcloudSkillList4Select
(
skillType
,
currentPage
,
numPerPage
,
name
));
return
new
ResponseDto
<>(
pcloudSkillBiz
.
getPcloudSkillList4Select
(
skillType
,
currentPage
,
numPerPage
,
name
,
depLabelId
,
proLabelId
,
purLabelId
));
}
@ApiOperation
(
"删除技能"
)
...
...
pcloud-service-book/src/main/resources/mapper/pcloudkeyword/PcloudRobotMemo.Mapper.xml
0 → 100644
View file @
378d7423
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.pcloudkeyword.dao.impl.PcloudRobotMemoDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"PcloudRobotMemo"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"group_id"
property=
"groupId"
jdbcType=
"INTEGER"
/>
<result
column=
"context"
property=
"context"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, group_id,context,create_time,update_time
</sql>
<insert
id=
"insert"
parameterType=
"PcloudRobotMemo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into pcloud_robot_memo (
group_id,
context
)
values (
#{groupId,jdbcType=INTEGER},
#{context,jdbcType=VARCHAR}
)
</insert>
<delete
id=
"deleteById"
parameterType=
"long"
>
delete from pcloud_robot_memo where id=#{memoId}
</delete>
<select
id=
"getMemoListByGroupId"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from pcloud_robot_memo where group_id=#{groupId}
</select>
<select
id=
"getMemoByContext"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from pcloud_robot_memo where 1=1
<if
test=
"context !=null"
>
and context like concat('%', #{context}, '%')
</if>
</select>
<update
id=
"updateById"
parameterType=
"map"
>
update pcloud_robot_memo set context=#{context}
where id=#{id}
</update>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/pcloudkeyword/PcloudRobotMemoGroup.Mapper.xml
0 → 100644
View file @
378d7423
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.pcloudkeyword.dao.impl.PcloudRobotMemoGroupDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"PcloudRobotMemoGroup"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"group_name"
property=
"groupName"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, group_name
</sql>
<insert
id=
"insert"
parameterType=
"PcloudRobotMemoGroup"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into pcloud_robot_memo_group (
group_name
)
values (
#{groupName,jdbcType=VARCHAR}
)
</insert>
<select
id=
"getAllGroup"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from pcloud_robot_memo_group
</select>
<update
id=
"updateById"
parameterType=
"map"
>
update pcloud_robot_memo_group set group_name=#{groupName}
where id=#{id}
</update>
<delete
id=
"deleteById"
parameterType=
"long"
>
delete from pcloud_robot_memo_group where id=#{id}
</delete>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/skill/PcloudSkilll.xml
View file @
378d7423
...
...
@@ -204,14 +204,32 @@
</if>
<if
test=
"name !=null"
>
and (
<!-- t.task_name like concat('%', #{name}, '%') or-->
t.task_introduce like concat('%', #{name}, '%') or
<!-- a.`name` like concat('%', #{name}, '%') or-->
a.description like concat('%', #{name}, '%') or
<!-- r.`name` like concat('%', #{name}, '%') or-->
r.description like concat('%', #{name}, '%')
)
</if>
<if
test=
"depLabelId != null"
>
and (
t.dep_label_id = #{depLabelId} or
a.dep_label_id = #{depLabelId} or
r.dep_label_id = #{depLabelId}
)
</if>
<if
test=
"proLabelId != null"
>
and (
t.pro_label_id = #{proLabelId} or
a.pro_label_id = #{proLabelId} or
r.pro_label_id = #{proLabelId}
)
</if>
<if
test=
"purLabelId != null"
>
and (
t.pur_label_id = #{purLabelId} or
a.pur_label_id = #{purLabelId} or
r.pur_label_id = #{purLabelId}
)
</if>
ORDER BY
s.seq_num
</select>
...
...
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