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
882cc361
Commit
882cc361
authored
Feb 16, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-1002370' into 'master'
唤醒 See merge request rays/pcloud-book!419
parents
159d33f4
f05647f4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
325 additions
and
9 deletions
+325
-9
RobotWakeUpConfigVO.java
...in/java/com/pcloud/book/guide/vo/RobotWakeUpConfigVO.java
+3
-0
RobotWakeUpMsgVO.java
.../main/java/com/pcloud/book/guide/vo/RobotWakeUpMsgVO.java
+6
-0
RobotWakeUpShowVO.java
...main/java/com/pcloud/book/guide/vo/RobotWakeUpShowVO.java
+8
-0
PcloudRobotWakeUpBiz.java
.../java/com/pcloud/book/guide/biz/PcloudRobotWakeUpBiz.java
+11
-2
PcloudRobotWakeUpBizImpl.java
.../pcloud/book/guide/biz/impl/PcloudRobotWakeUpBizImpl.java
+0
-0
WakeUpInfoDto.java
...rc/main/java/com/pcloud/book/guide/dto/WakeUpInfoDto.java
+1
-0
PcloudRobotWakeup.java
.../java/com/pcloud/book/guide/entity/PcloudRobotWakeup.java
+4
-0
PcloudRobotWakeupClassify.java
...m/pcloud/book/guide/entity/PcloudRobotWakeupClassify.java
+25
-0
PcloudWakeupMessage.java
...ava/com/pcloud/book/guide/entity/PcloudWakeupMessage.java
+10
-0
PcloudRobotWakeUpFacadeImpl.java
...d/book/guide/facade/impl/PcloudRobotWakeUpFacadeImpl.java
+42
-3
PcloudRobotWakeupClassifyMapper.java
...ud/book/guide/mapper/PcloudRobotWakeupClassifyMapper.java
+26
-0
PcloudRobotWakeupMapper.java
...com/pcloud/book/guide/mapper/PcloudRobotWakeupMapper.java
+9
-0
PcloudWakeupMessageMapper.java
...m/pcloud/book/guide/mapper/PcloudWakeupMessageMapper.java
+7
-0
PcloudRobotWakeUpServiceImpl.java
...loud/book/guide/service/PcloudRobotWakeUpServiceImpl.java
+4
-2
PcloudRobotDao.java
...ava/com/pcloud/book/pcloudkeyword/dao/PcloudRobotDao.java
+3
-0
PcloudRobotDaoImpl.java
...cloud/book/pcloudkeyword/dao/impl/PcloudRobotDaoImpl.java
+7
-0
PcloudRobotWakeupMapper.xml
...c/main/resources/mapper/guide/PcloudRobotWakeupMapper.xml
+37
-1
PcloudRobotWakeupMapperClassify.xml
...esources/mapper/guide/PcloudRobotWakeupMapperClassify.xml
+62
-0
PcloudWakeupMessageMapper.xml
...main/resources/mapper/guide/PcloudWakeupMessageMapper.xml
+46
-1
PcloudRobot.Mapper.xml
...ain/resources/mapper/pcloudkeyword/PcloudRobot.Mapper.xml
+14
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/guide/vo/RobotWakeUpConfigVO.java
View file @
882cc361
...
@@ -12,6 +12,9 @@ import java.util.List;
...
@@ -12,6 +12,9 @@ import java.util.List;
@ApiModel
(
description
=
"机器人唤醒配置"
)
@ApiModel
(
description
=
"机器人唤醒配置"
)
public
class
RobotWakeUpConfigVO
{
public
class
RobotWakeUpConfigVO
{
@ApiModelProperty
(
"唤醒id"
)
private
Integer
wakeUpId
;
@ApiModelProperty
(
"开始时间"
)
@ApiModelProperty
(
"开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
startTime
;
private
Date
startTime
;
...
...
pcloud-facade-book/src/main/java/com/pcloud/book/guide/vo/RobotWakeUpMsgVO.java
View file @
882cc361
...
@@ -13,6 +13,9 @@ public class RobotWakeUpMsgVO {
...
@@ -13,6 +13,9 @@ public class RobotWakeUpMsgVO {
@ApiModelProperty
(
"消息类型 text image file"
)
@ApiModelProperty
(
"消息类型 text image file"
)
private
Integer
replyType
;
private
Integer
replyType
;
@ApiModelProperty
(
"消息类型 text image file"
)
private
String
type
;
@ApiModelProperty
(
"文本内容"
)
@ApiModelProperty
(
"文本内容"
)
private
String
content
;
private
String
content
;
...
@@ -22,6 +25,9 @@ public class RobotWakeUpMsgVO {
...
@@ -22,6 +25,9 @@ public class RobotWakeUpMsgVO {
@ApiModelProperty
(
"文件地址"
)
@ApiModelProperty
(
"文件地址"
)
private
String
fileUrl
;
private
String
fileUrl
;
@ApiModelProperty
(
"文件地址"
)
private
String
fileName
;
@ApiModelProperty
(
"排序值"
)
@ApiModelProperty
(
"排序值"
)
private
Integer
seqNum
;
private
Integer
seqNum
;
...
...
pcloud-facade-book/src/main/java/com/pcloud/book/guide/vo/RobotWakeUpShowVO.java
View file @
882cc361
package
com
.
pcloud
.
book
.
guide
.
vo
;
package
com
.
pcloud
.
book
.
guide
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.pcloud.book.pcloudKeyword.dto.RobotClassifyDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -12,6 +14,10 @@ import java.util.List;
...
@@ -12,6 +14,10 @@ import java.util.List;
@Data
@Data
public
class
RobotWakeUpShowVO
{
public
class
RobotWakeUpShowVO
{
@ApiModelProperty
(
"唤醒id"
)
private
Integer
wakeUpId
;
@ApiModelProperty
(
"开始时间"
)
@ApiModelProperty
(
"开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
startTime
;
private
Date
startTime
;
...
@@ -28,5 +34,7 @@ public class RobotWakeUpShowVO {
...
@@ -28,5 +34,7 @@ public class RobotWakeUpShowVO {
@ApiModelProperty
(
"回复消息列表"
)
@ApiModelProperty
(
"回复消息列表"
)
private
List
<
RobotWakeUpMsgVO
>
msgList
;
private
List
<
RobotWakeUpMsgVO
>
msgList
;
@ApiModelProperty
(
"机器人分类列表"
)
private
List
<
RobotClassifyDTO
>
classifyDTOList
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/guide/biz/PcloudRobotWakeUpBiz.java
View file @
882cc361
...
@@ -3,6 +3,7 @@ package com.pcloud.book.guide.biz;
...
@@ -3,6 +3,7 @@ package com.pcloud.book.guide.biz;
import
com.pcloud.book.guide.vo.RobotWakeUpConfigVO
;
import
com.pcloud.book.guide.vo.RobotWakeUpConfigVO
;
import
com.pcloud.book.guide.vo.RobotWakeUpShowVO
;
import
com.pcloud.book.guide.vo.RobotWakeUpShowVO
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.List
;
...
@@ -13,11 +14,19 @@ public interface PcloudRobotWakeUpBiz {
...
@@ -13,11 +14,19 @@ public interface PcloudRobotWakeUpBiz {
void
robotWakeUpRemove
();
void
robotWakeUpRemove
();
RobotWakeUpShowVO
getRobotWakeUpConfig
();
RobotWakeUpShowVO
getRobotWakeUpConfig
(
Integer
wakeUpId
);
void
doJob
();
void
doJob
(
Integer
wakeUpId
);
List
<
PcloudRobotClassifyResponseVO
>
listAllClassify
();
List
<
PcloudRobotClassifyResponseVO
>
listAllClassify
();
void
copyRobotWakeUp
(
String
sourceWxId
,
String
targetWxId
);
void
copyRobotWakeUp
(
String
sourceWxId
,
String
targetWxId
);
void
addrobotWakeUpConfig
(
RobotWakeUpConfigVO
robotWakeUpConfigVO
);
PageBeanNew
<
RobotWakeUpShowVO
>
getRobotWakeUpConfigList
(
Integer
currentPage
,
Integer
numPerPage
);
void
deleterobotWakeUp
(
Integer
wakeUpid
);
void
updaterobotWakeUp
(
RobotWakeUpConfigVO
robotWakeUpConfigVO
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/guide/biz/impl/PcloudRobotWakeUpBizImpl.java
View file @
882cc361
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/guide/dto/WakeUpInfoDto.java
View file @
882cc361
...
@@ -8,4 +8,5 @@ import java.util.Date;
...
@@ -8,4 +8,5 @@ import java.util.Date;
public
class
WakeUpInfoDto
{
public
class
WakeUpInfoDto
{
private
String
ip
;
private
String
ip
;
private
Date
time
;
private
Date
time
;
private
Integer
wakeUpId
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/guide/entity/PcloudRobotWakeup.java
View file @
882cc361
...
@@ -67,4 +67,7 @@ public class PcloudRobotWakeup {
...
@@ -67,4 +67,7 @@ public class PcloudRobotWakeup {
public
void
setUpdateTime
(
Date
updateTime
)
{
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
public
void
deleteByWakeUpId
(
Integer
wakeUpId
)
{
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/guide/entity/PcloudRobotWakeupClassify.java
0 → 100644
View file @
882cc361
package
com
.
pcloud
.
book
.
guide
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.util.Date
;
import
lombok.Data
;
@Data
public
class
PcloudRobotWakeupClassify
{
private
Integer
id
;
private
Integer
wakeUpId
;
private
Integer
robotClassifyId
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updateTime
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/guide/entity/PcloudWakeupMessage.java
View file @
882cc361
...
@@ -7,6 +7,8 @@ import java.util.Date;
...
@@ -7,6 +7,8 @@ import java.util.Date;
public
class
PcloudWakeupMessage
{
public
class
PcloudWakeupMessage
{
private
Integer
id
;
private
Integer
id
;
private
Integer
wakeUpId
;
private
String
type
;
private
String
type
;
private
String
textContent
;
private
String
textContent
;
...
@@ -25,6 +27,14 @@ public class PcloudWakeupMessage {
...
@@ -25,6 +27,14 @@ public class PcloudWakeupMessage {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updateTime
;
private
Date
updateTime
;
public
Integer
getWakeUpId
()
{
return
wakeUpId
;
}
public
void
setWakeUpId
(
Integer
wakeUpId
)
{
this
.
wakeUpId
=
wakeUpId
;
}
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/guide/facade/impl/PcloudRobotWakeUpFacadeImpl.java
View file @
882cc361
...
@@ -7,9 +7,12 @@ import com.pcloud.book.guide.vo.RobotWakeUpShowVO;
...
@@ -7,9 +7,12 @@ import com.pcloud.book.guide.vo.RobotWakeUpShowVO;
import
com.pcloud.book.pcloudkeyword.biz.PcloudRobotClassifyBiz
;
import
com.pcloud.book.pcloudkeyword.biz.PcloudRobotClassifyBiz
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.SessionUtil
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.models.auth.In
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -33,6 +36,7 @@ public class PcloudRobotWakeUpFacadeImpl {
...
@@ -33,6 +36,7 @@ public class PcloudRobotWakeUpFacadeImpl {
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
}
}
@ApiOperation
(
value
=
"解除机器人小号唤醒配置"
)
@ApiOperation
(
value
=
"解除机器人小号唤醒配置"
)
@PostMapping
(
"remove"
)
@PostMapping
(
"remove"
)
ResponseDto
<?>
robotWakeUpClose
(
@RequestHeader
String
token
)
throws
PermissionException
{
ResponseDto
<?>
robotWakeUpClose
(
@RequestHeader
String
token
)
throws
PermissionException
{
...
@@ -42,10 +46,10 @@ public class PcloudRobotWakeUpFacadeImpl {
...
@@ -42,10 +46,10 @@ public class PcloudRobotWakeUpFacadeImpl {
}
}
@ApiOperation
(
value
=
"获取机器人小号配置"
)
@ApiOperation
(
value
=
"获取机器人小号配置"
)
@GetMapping
(
"get"
)
@GetMapping
(
"get
RobotWakeUpConfig
"
)
ResponseDto
<?>
getRobotWakeUpConfig
(
@RequestHeader
String
token
)
throws
PermissionException
{
ResponseDto
<?>
getRobotWakeUpConfig
(
@RequestHeader
String
token
,
@RequestParam
(
"wakeUpId"
)
Integer
wakeUpId
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
SessionUtil
.
getToken4Redis
(
token
);
return
new
ResponseDto
<>(
pcloudRobotWakeUpBiz
.
getRobotWakeUpConfig
());
return
new
ResponseDto
<>(
pcloudRobotWakeUpBiz
.
getRobotWakeUpConfig
(
wakeUpId
));
}
}
...
@@ -56,4 +60,39 @@ public class PcloudRobotWakeUpFacadeImpl {
...
@@ -56,4 +60,39 @@ public class PcloudRobotWakeUpFacadeImpl {
List
<
PcloudRobotClassifyResponseVO
>
classify
=
pcloudRobotWakeUpBiz
.
listAllClassify
();
List
<
PcloudRobotClassifyResponseVO
>
classify
=
pcloudRobotWakeUpBiz
.
listAllClassify
();
return
new
ResponseDto
<>(
classify
);
return
new
ResponseDto
<>(
classify
);
}
}
@ApiOperation
(
value
=
"新增机器人小号唤醒配置"
)
@PostMapping
(
"addrobotWakeUpConfig"
)
ResponseDto
<?>
addrobotWakeUpConfig
(
@RequestHeader
String
token
,
@RequestBody
RobotWakeUpConfigVO
robotWakeUpConfigVO
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
pcloudRobotWakeUpBiz
.
addrobotWakeUpConfig
(
robotWakeUpConfigVO
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
value
=
"获取机器人小号配置列表"
)
@GetMapping
(
"getRobotWakeUpConfigList"
)
ResponseDto
<
PageBeanNew
<
RobotWakeUpShowVO
>>
getRobotWakeUpConfigList
(
@RequestHeader
String
token
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
return
new
ResponseDto
<
PageBeanNew
<
RobotWakeUpShowVO
>>(
pcloudRobotWakeUpBiz
.
getRobotWakeUpConfigList
(
currentPage
,
numPerPage
));
}
@ApiOperation
(
value
=
"删除机器人小号唤醒配置"
)
@GetMapping
(
"deleterobotWakeUp"
)
ResponseDto
<?>
deleterobotWakeUp
(
@RequestHeader
String
token
,
@RequestParam
(
"wakeUpId"
)
Integer
wakeUpid
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
pcloudRobotWakeUpBiz
.
deleterobotWakeUp
(
wakeUpid
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
value
=
"更新机器人小号唤醒配置"
)
@PostMapping
(
"updaterobotWakeUp"
)
ResponseDto
<?>
updaterobotWakeUp
(
@RequestHeader
String
token
,
@RequestBody
RobotWakeUpConfigVO
robotWakeUpConfigVO
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
pcloudRobotWakeUpBiz
.
updaterobotWakeUp
(
robotWakeUpConfigVO
);
return
new
ResponseDto
<>();
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/guide/mapper/PcloudRobotWakeupClassifyMapper.java
0 → 100644
View file @
882cc361
package
com
.
pcloud
.
book
.
guide
.
mapper
;
import
com.pcloud.book.guide.entity.PcloudRobotWakeup
;
import
com.pcloud.book.guide.entity.PcloudRobotWakeupClassify
;
import
com.pcloud.book.pcloudKeyword.dto.RobotClassifyDTO
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
public
interface
PcloudRobotWakeupClassifyMapper
{
int
insert
(
PcloudRobotWakeupClassify
pcloudRobotWakeupClassify
);
int
batchInsert
(
List
<
PcloudRobotWakeupClassify
>
pcloudRobotWakeupClassifies
);
void
deleteAll
();
List
<
RobotClassifyDTO
>
getRobotClassifyByWakeUpId
(
Integer
wakeUpId
);
void
deleteByWakeUpId
(
Integer
wakeUpId
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/guide/mapper/PcloudRobotWakeupMapper.java
View file @
882cc361
...
@@ -3,6 +3,8 @@ package com.pcloud.book.guide.mapper;
...
@@ -3,6 +3,8 @@ package com.pcloud.book.guide.mapper;
import
com.pcloud.book.guide.entity.PcloudRobotWakeup
;
import
com.pcloud.book.guide.entity.PcloudRobotWakeup
;
import
com.pcloud.book.guide.vo.RobotWakeUpShowVO
;
import
com.pcloud.book.guide.vo.RobotWakeUpShowVO
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO
;
import
com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.List
;
...
@@ -28,4 +30,10 @@ public interface PcloudRobotWakeupMapper {
...
@@ -28,4 +30,10 @@ public interface PcloudRobotWakeupMapper {
List
<
String
>
listAllRobot
();
List
<
String
>
listAllRobot
();
List
<
PcloudRobotClassifyResponseVO
>
listAllClassify
();
List
<
PcloudRobotClassifyResponseVO
>
listAllClassify
();
Integer
getRobotWakeUpConfigListCount
();
List
<
RobotWakeUpShowVO
>
getRobotWakeUpConfigList
(
@Param
(
"currentPage"
)
Integer
currentPage
,
@Param
(
"numPerPage"
)
Integer
numPerPage
);
RobotWakeUpShowVO
getRobotWakeUpConfigById
(
Integer
wakeUpId
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/guide/mapper/PcloudWakeupMessageMapper.java
View file @
882cc361
...
@@ -28,4 +28,10 @@ public interface PcloudWakeupMessageMapper {
...
@@ -28,4 +28,10 @@ public interface PcloudWakeupMessageMapper {
List
<
Integer
>
getAllClassifyInfo
();
List
<
Integer
>
getAllClassifyInfo
();
Integer
countAll
();
Integer
countAll
();
int
batchInsert
(
List
<
PcloudWakeupMessage
>
pcloudWakeupMessages
);
List
<
RobotWakeUpMsgVO
>
selectByWakeUpId
(
Integer
wakeUpId
);
void
delectByWakeUpId
(
Integer
wakeUpId
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/guide/service/PcloudRobotWakeUpServiceImpl.java
View file @
882cc361
...
@@ -31,7 +31,8 @@ public class PcloudRobotWakeUpServiceImpl implements PcloudRobotWakeUpService {
...
@@ -31,7 +31,8 @@ public class PcloudRobotWakeUpServiceImpl implements PcloudRobotWakeUpService {
@PostMapping
(
"/doJob"
)
@PostMapping
(
"/doJob"
)
public
void
doJob
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
BizException
{
public
void
doJob
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
BizException
{
log
.
info
(
"PcloudRobotWakeUpServiceImpl.doJob 开始执行定时任务"
);
log
.
info
(
"PcloudRobotWakeUpServiceImpl.doJob 开始执行定时任务"
);
pcloudRobotWakeUpBiz
.
doJob
();
Integer
wakeUpId
=
(
Integer
)
map
.
get
(
"wakeUpId"
);
pcloudRobotWakeUpBiz
.
doJob
(
wakeUpId
);
}
}
...
@@ -40,7 +41,8 @@ public class PcloudRobotWakeUpServiceImpl implements PcloudRobotWakeUpService {
...
@@ -40,7 +41,8 @@ public class PcloudRobotWakeUpServiceImpl implements PcloudRobotWakeUpService {
public
ResponseDto
<?>
hset
(
@RequestParam
(
"wxid"
)
String
wxid
,
public
ResponseDto
<?>
hset
(
@RequestParam
(
"wxid"
)
String
wxid
,
@RequestParam
(
"robotId"
)
String
robotId
,
@RequestParam
(
"robotId"
)
String
robotId
,
@RequestParam
(
"ip"
)
String
ip
,
@RequestParam
(
"ip"
)
String
ip
,
@RequestParam
(
"day"
)
Integer
day
){
@RequestParam
(
"day"
)
Integer
day
,
@RequestParam
(
"wakeUpId"
)
Integer
wakeUpId
){
WakeUpInfoDto
wakeUpInfoDto
=
new
WakeUpInfoDto
();
WakeUpInfoDto
wakeUpInfoDto
=
new
WakeUpInfoDto
();
wakeUpInfoDto
.
setIp
(
ip
);
wakeUpInfoDto
.
setIp
(
ip
);
wakeUpInfoDto
.
setTime
(
DateUtils
.
addDay
(
new
Date
(),
day
));
wakeUpInfoDto
.
setTime
(
DateUtils
.
addDay
(
new
Date
(),
day
));
...
...
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/PcloudRobotDao.java
View file @
882cc361
...
@@ -29,4 +29,7 @@ public interface PcloudRobotDao extends BaseDao<PcloudRobot> {
...
@@ -29,4 +29,7 @@ public interface PcloudRobotDao extends BaseDao<PcloudRobot> {
PcloudRobot
getByUniqueNumber
(
String
uniqueNumber
);
PcloudRobot
getByUniqueNumber
(
String
uniqueNumber
);
void
updatePcloudRobotByWxId
(
PcloudRobot
pcloudRobot
);
void
updatePcloudRobotByWxId
(
PcloudRobot
pcloudRobot
);
List
<
String
>
getPcloudRobotByTypes
(
List
<
Integer
>
classifyIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/impl/PcloudRobotDaoImpl.java
View file @
882cc361
...
@@ -48,8 +48,15 @@ public class PcloudRobotDaoImpl extends BaseDaoImpl<PcloudRobot> implements Pclo
...
@@ -48,8 +48,15 @@ public class PcloudRobotDaoImpl extends BaseDaoImpl<PcloudRobot> implements Pclo
}
}
@Override
@Override
public
void
updatePcloudRobotByWxId
(
PcloudRobot
pcloudRobot
)
{
public
void
updatePcloudRobotByWxId
(
PcloudRobot
pcloudRobot
)
{
this
.
getSessionTemplate
().
update
(
this
.
getStatement
(
"updatePcloudRobotByWxId"
),
pcloudRobot
);
this
.
getSessionTemplate
().
update
(
this
.
getStatement
(
"updatePcloudRobotByWxId"
),
pcloudRobot
);
}
}
@Override
public
List
<
String
>
getPcloudRobotByTypes
(
List
<
Integer
>
classifyIds
)
{
return
this
.
getSessionTemplate
().
selectList
(
this
.
getStatement
(
"getPcloudRobotByTypes"
),
classifyIds
);
}
}
}
pcloud-service-book/src/main/resources/mapper/guide/PcloudRobotWakeupMapper.xml
View file @
882cc361
...
@@ -9,6 +9,14 @@
...
@@ -9,6 +9,14 @@
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<resultMap
id=
"RobotWakeUpShowVOMap"
type=
"com.pcloud.book.guide.vo.RobotWakeUpShowVO"
>
<id
column=
"id"
property=
"wakeUpId"
jdbcType=
"BIGINT"
/>
<result
column=
"start_time"
property=
"startTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"last"
property=
"lastDay"
jdbcType=
"BIGINT"
/>
<collection
property=
"classifyDTOList"
column=
"id"
select=
"com.pcloud.book.guide.mapper.PcloudRobotWakeupClassifyMapper.getRobotClassifyByWakeUpId"
/>
<collection
property=
"msgList"
column=
"id"
select=
"com.pcloud.book.guide.mapper.PcloudWakeupMessageMapper.selectByWakeUpId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, start_time, cycle, last, create_time, update_time
id, start_time, cycle, last, create_time, update_time
</sql>
</sql>
...
@@ -30,7 +38,7 @@
...
@@ -30,7 +38,7 @@
#{last,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{last,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pcloud.book.guide.entity.PcloudRobotWakeup"
>
<insert
id=
"insertSelective"
parameterType=
"com.pcloud.book.guide.entity.PcloudRobotWakeup"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into pcloud_robot_wakeup
insert into pcloud_robot_wakeup
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -127,5 +135,32 @@
...
@@ -127,5 +135,32 @@
AND is_delete = 0
AND is_delete = 0
</select>
</select>
<select
id=
"getRobotWakeUpConfigListCount"
resultType=
"integer"
>
select
count(id)
from
pcloud_robot_wakeup
</select>
<select
id=
"getRobotWakeUpConfigList"
resultMap=
"RobotWakeUpShowVOMap"
>
select
id,
start_time,
last
from pcloud_robot_wakeup
order by create_time desc
<if
test=
"currentPage!=null"
>
limit #{currentPage},#{numPerPage}
</if>
</select>
<select
id=
"getRobotWakeUpConfigById"
parameterType=
"integer"
resultMap=
"RobotWakeUpShowVOMap"
>
select
id,
start_time,
last
from pcloud_robot_wakeup
where id = #{wakeUpId}
</select>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/guide/PcloudRobotWakeupMapperClassify.xml
0 → 100644
View file @
882cc361
<?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.guide.mapper.PcloudRobotWakeupClassifyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.guide.entity.PcloudRobotWakeupClassify"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"wake_up_id"
property=
"wakeUpId"
jdbcType=
"INTEGER"
/>
<result
column=
"robot_classify_id"
property=
"robotClassifyId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, wake_up_id, robot_classify_id,create_time, update_time
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.guide.entity.PcloudRobotWakeupClassify"
>
insert into pcloud_robot_wakeup_classify (wake_up_id, robot_classify_id, create_time
)
values (#{wakeUpId,jdbcType=INTEGER}, #{robotClassifyId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.guide.entity.PcloudRobotWakeupClassify"
>
insert into pcloud_robot_wakeup_classify (wake_up_id, robot_classify_id, create_time
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.wakeUpId},
#{item.robotClassifyId},
#{item.createTime}
)
</foreach>
</insert>
<delete
id=
"deleteAll"
>
delete from pcloud_robot_wakeup_classify
</delete>
<select
id=
"getRobotClassifyByWakeUpId"
parameterType=
"integer"
resultType=
"com.pcloud.book.pcloudKeyword.dto.RobotClassifyDTO"
>
select
prwc.robot_classify_id classifyId,
prc.classify_name classifyName
from
pcloud_robot_wakeup_classify prwc
left join pcloud_robot_classify prc
on prwc.robot_classify_id = prc.id
where prwc.wake_up_id = #{_parameter}
</select>
<select
id=
"deleteByWakeUpId"
parameterType=
"integer"
>
delete
from
pcloud_robot_wakeup_classify
where
wake_up_id = #{wakeUpId}
</select>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/guide/PcloudWakeupMessageMapper.xml
View file @
882cc361
...
@@ -12,6 +12,16 @@
...
@@ -12,6 +12,16 @@
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<resultMap
id=
"BaseResultMap4VO"
type=
"com.pcloud.book.guide.vo.RobotWakeUpMsgVO"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"VARCHAR"
/>
<result
column=
"text_content"
property=
"content"
jdbcType=
"VARCHAR"
/>
<result
column=
"img_url"
property=
"picUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_url"
property=
"fileUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_name"
property=
"fileName"
jdbcType=
"VARCHAR"
/>
<result
column=
"seq_num"
property=
"seqNum"
jdbcType=
"BIT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, type, text_content, img_url, file_url, file_name, seq_num, create_time, update_time
id, type, text_content, img_url, file_url, file_name, seq_num, create_time, update_time
</sql>
</sql>
...
@@ -96,7 +106,24 @@
...
@@ -96,7 +106,24 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.guide.entity.PcloudWakeupMessage"
>
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.guide.entity.PcloudWakeupMessage"
>
insert into pcloud_wakeup_message ( type, text_content,
img_url, file_url, file_name,
seq_num, create_time, update_time,wake_up_id
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.type,jdbcType=VARCHAR}, #{item.textContent,jdbcType=VARCHAR},
#{item.imgUrl,jdbcType=VARCHAR}, #{item.fileUrl,jdbcType=VARCHAR}, #{item.fileName,jdbcType=VARCHAR},
#{item.seqNum,jdbcType=BIT}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.wakeUpId}
)
</foreach>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.guide.entity.PcloudWakeupMessage"
>
update pcloud_wakeup_message
update pcloud_wakeup_message
<set
>
<set
>
<if
test=
"type != null"
>
<if
test=
"type != null"
>
...
@@ -161,5 +188,22 @@
...
@@ -161,5 +188,22 @@
select count(0) from pcloud_robot_classify
select count(0) from pcloud_robot_classify
</select>
</select>
<select
id=
"selectByWakeUpId"
resultMap=
"BaseResultMap4VO"
parameterType=
"integer"
>
select
id, type, text_content, img_url, file_url, file_name, seq_num
from
pcloud_wakeup_message
where
wake_up_id = #{_parameter}
</select>
<delete
id=
"delectByWakeUpId"
parameterType=
"integer"
>
delete
from
pcloud_wakeup_message
where
wake_up_id = #{wakeUpId}
</delete>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/pcloudkeyword/PcloudRobot.Mapper.xml
View file @
882cc361
...
@@ -239,4 +239,17 @@
...
@@ -239,4 +239,17 @@
limit 1
limit 1
</select>
</select>
<select
id=
"getPcloudRobotByTypes"
parameterType=
"list"
resultType=
"string"
>
select
DISTINCT wx_id
from
pcloud_robot p
where
robot_type in
<foreach
collection=
"list"
index=
"index"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
and state = 1
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment