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
6cc09c88
Commit
6cc09c88
authored
Feb 20, 2020
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间管理统一回复
parent
a5b4f0d0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
207 deletions
+74
-207
CreateReplyMessageDto.java
...om/pcloud/book/timecontrol/dto/CreateReplyMessageDto.java
+8
-19
ReplyMessageDto.java
...java/com/pcloud/book/timecontrol/dto/ReplyMessageDto.java
+14
-11
TaskBiz.java
...rc/main/java/com/pcloud/book/timecontrol/biz/TaskBiz.java
+3
-0
TaskBizImpl.java
...ava/com/pcloud/book/timecontrol/biz/impl/TaskBizImpl.java
+0
-0
TaskSubscribeBizImpl.java
...cloud/book/timecontrol/biz/impl/TaskSubscribeBizImpl.java
+4
-123
TimeControlReplyMessage.java
...loud/book/timecontrol/entity/TimeControlReplyMessage.java
+10
-16
TimeControlReplyMessageMapper.java
...ook/timecontrol/mapper/TimeControlReplyMessageMapper.java
+3
-2
TimeControlReplyMessageMapper.xml
...rces/mapper/timecontrol/TimeControlReplyMessageMapper.xml
+32
-36
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/timecontrol/dto/CreateReplyMessageDto.java
View file @
6cc09c88
...
@@ -3,7 +3,6 @@ package com.pcloud.book.timecontrol.dto;
...
@@ -3,7 +3,6 @@ package com.pcloud.book.timecontrol.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
/**
* @date: 2020年01月31日 9:50
* @date: 2020年01月31日 9:50
...
@@ -13,30 +12,20 @@ import java.math.BigDecimal;
...
@@ -13,30 +12,20 @@ import java.math.BigDecimal;
@Data
@Data
public
class
CreateReplyMessageDto
implements
Serializable
{
public
class
CreateReplyMessageDto
implements
Serializable
{
private
String
messageType
;
private
Integer
replyType
;
private
String
text
;
private
Integer
appId
;
private
Integer
productId
;
private
String
imgUrl
;
private
String
fileName
;
private
String
content
;
private
String
file
Url
;
private
String
pic
Url
;
private
String
linkUrl
;
private
String
linkUrl
;
/**
private
String
description
;
* 回复类型 0 普通回复 1 完成任务确认回复
*/
private
Long
serveId
;
private
Integer
replyType
;
private
String
fileId
;
private
String
serveType
;
private
String
fileType
;
private
Long
resourceId
;
private
BigDecimal
size
;
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/timecontrol/dto/ReplyMessageDto.java
View file @
6cc09c88
...
@@ -3,7 +3,6 @@ package com.pcloud.book.timecontrol.dto;
...
@@ -3,7 +3,6 @@ package com.pcloud.book.timecontrol.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
/**
* @date: 2020年01月31日 9:50
* @date: 2020年01月31日 9:50
...
@@ -13,27 +12,31 @@ import java.math.BigDecimal;
...
@@ -13,27 +12,31 @@ import java.math.BigDecimal;
@Data
@Data
public
class
ReplyMessageDto
implements
Serializable
{
public
class
ReplyMessageDto
implements
Serializable
{
private
String
message
Type
;
private
Integer
reply
Type
;
private
String
tex
t
;
private
String
conten
t
;
private
Integer
app
Id
;
private
Long
serve
Id
;
private
Integer
product
Id
;
private
Long
resource
Id
;
private
String
img
Url
;
private
String
pic
Url
;
private
String
fileNam
e
;
private
String
serveTyp
e
;
private
String
fileUrl
;
private
String
description
;
private
String
linkUrl
;
private
String
linkUrl
;
private
String
file
Id
;
private
Integer
taskItem
Id
;
private
String
fileType
;
private
String
fileType
;
private
BigDecimal
siz
e
;
private
String
resourceNam
e
;
private
Integer
taskItemId
;
private
String
resourceUrl
;
private
Long
fileSize
;
private
String
resourceTypeCode
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/timecontrol/biz/TaskBiz.java
View file @
6cc09c88
...
@@ -9,6 +9,7 @@ import com.pcloud.book.timecontrol.dto.TaskDto;
...
@@ -9,6 +9,7 @@ import com.pcloud.book.timecontrol.dto.TaskDto;
import
com.pcloud.book.timecontrol.dto.TaskItemDto
;
import
com.pcloud.book.timecontrol.dto.TaskItemDto
;
import
com.pcloud.book.timecontrol.dto.UpdateTaskDto
;
import
com.pcloud.book.timecontrol.dto.UpdateTaskDto
;
import
com.pcloud.book.timecontrol.dto.UpdateTaskItemDto
;
import
com.pcloud.book.timecontrol.dto.UpdateTaskItemDto
;
import
com.pcloud.book.timecontrol.entity.TimeControlReplyMessage
;
import
com.pcloud.book.timecontrol.vo.KeyWordTaskVO
;
import
com.pcloud.book.timecontrol.vo.KeyWordTaskVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
...
@@ -59,4 +60,6 @@ public interface TaskBiz {
...
@@ -59,4 +60,6 @@ public interface TaskBiz {
void
finishTaskSend
(
Integer
taskSendId
);
void
finishTaskSend
(
Integer
taskSendId
);
TaskDto
getTaskByIdAndWxUserId
(
Integer
relSkillId
,
String
wxUserId
);
TaskDto
getTaskByIdAndWxUserId
(
Integer
relSkillId
,
String
wxUserId
);
void
sendReplyMessage
(
List
<
TimeControlReplyMessage
>
replyMessages
,
String
wxUserId
,
String
robotWxId
,
String
ip
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/timecontrol/biz/impl/TaskBizImpl.java
View file @
6cc09c88
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/timecontrol/biz/impl/TaskSubscribeBizImpl.java
View file @
6cc09c88
package
com
.
pcloud
.
book
.
timecontrol
.
biz
.
impl
;
package
com
.
pcloud
.
book
.
timecontrol
.
biz
.
impl
;
import
com.google.common.util.concurrent.ThreadFactoryBuilder
;
import
com.google.common.util.concurrent.ThreadFactoryBuilder
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.book.consumer.app.AppConsr
;
import
com.pcloud.book.consumer.app.AppConsr
;
import
com.pcloud.book.consumer.channel.QrcodeSceneConsr
;
import
com.pcloud.book.consumer.channel.QrcodeSceneConsr
;
import
com.pcloud.book.consumer.content.ResourceConsr
;
import
com.pcloud.book.consumer.content.ResourceConsr
;
...
@@ -19,6 +18,7 @@ import com.pcloud.book.skill.entity.PcloudSkill;
...
@@ -19,6 +18,7 @@ import com.pcloud.book.skill.entity.PcloudSkill;
import
com.pcloud.book.skill.entity.PcloudSubReply
;
import
com.pcloud.book.skill.entity.PcloudSubReply
;
import
com.pcloud.book.skill.enums.SkillTypeEnum
;
import
com.pcloud.book.skill.enums.SkillTypeEnum
;
import
com.pcloud.book.skill.enums.SubTypeEnum
;
import
com.pcloud.book.skill.enums.SubTypeEnum
;
import
com.pcloud.book.timecontrol.biz.TaskBiz
;
import
com.pcloud.book.timecontrol.biz.TaskSubscribeBiz
;
import
com.pcloud.book.timecontrol.biz.TaskSubscribeBiz
;
import
com.pcloud.book.timecontrol.dto.ReplyMessageBaseDto
;
import
com.pcloud.book.timecontrol.dto.ReplyMessageBaseDto
;
import
com.pcloud.book.timecontrol.dto.TaskSendDto
;
import
com.pcloud.book.timecontrol.dto.TaskSendDto
;
...
@@ -44,7 +44,6 @@ import com.pcloud.common.utils.ListUtils;
...
@@ -44,7 +44,6 @@ import com.pcloud.common.utils.ListUtils;
import
com.pcloud.common.utils.httpclient.UrlUtils
;
import
com.pcloud.common.utils.httpclient.UrlUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.contentcenter.resource.dto.ResourceDTO
;
import
com.pcloud.contentcenter.resource.dto.ResourceDTO
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
com.pcloud.wechatgroup.group.dto.GroupRobotDTO
;
import
com.pcloud.wechatgroup.group.dto.GroupRobotDTO
;
import
com.sdk.wxgroup.SendArticleMessageVO
;
import
com.sdk.wxgroup.SendArticleMessageVO
;
import
com.sdk.wxgroup.SendFileVO
;
import
com.sdk.wxgroup.SendFileVO
;
...
@@ -122,7 +121,8 @@ public class TaskSubscribeBizImpl implements TaskSubscribeBiz {
...
@@ -122,7 +121,8 @@ public class TaskSubscribeBizImpl implements TaskSubscribeBiz {
private
PcloudRobotSet
pcloudRobotSet
;
private
PcloudRobotSet
pcloudRobotSet
;
@Autowired
@Autowired
private
PcloudSkillRecordDao
pcloudSkillRecordDao
;
private
PcloudSkillRecordDao
pcloudSkillRecordDao
;
@Autowired
private
TaskBiz
taskBiz
;
@Override
@Override
@ParamLog
(
"任务订阅"
)
@ParamLog
(
"任务订阅"
)
...
@@ -325,94 +325,7 @@ public class TaskSubscribeBizImpl implements TaskSubscribeBiz {
...
@@ -325,94 +325,7 @@ public class TaskSubscribeBizImpl implements TaskSubscribeBiz {
String
ip
=
weixinQrcodeBiz
.
getRobotIpByGeneration
(
groupRobotDTO
.
getVersion
());
String
ip
=
weixinQrcodeBiz
.
getRobotIpByGeneration
(
groupRobotDTO
.
getVersion
());
Integer
taskSendId
=
sendDto
.
getId
();
Integer
taskSendId
=
sendDto
.
getId
();
TimeControlTaskSend
timeControlTaskSend
=
timeControlTaskSendMapper
.
getById
(
taskSendId
);
TimeControlTaskSend
timeControlTaskSend
=
timeControlTaskSendMapper
.
getById
(
taskSendId
);
for
(
TimeControlReplyMessage
replyMessage
:
replyMessages
)
{
taskBiz
.
sendReplyMessage
(
replyMessages
,
wxUserId
,
robotWxId
,
ip
);
if
(
replyMessage
!=
null
)
{
switch
(
replyMessage
.
getMessageType
())
{
case
"text"
:
// 发送文本
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
sendTextMessageVO
.
setContent
(
replyMessage
.
getText
());
sendTextMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
sendTextMessageVO
.
setWxId
(
robotWxId
);
sendTextMessageVO
.
setAltId
(
robotWxId
);
sendTextMessageVO
.
setWxGroupId
(
wxUserId
);
sendTextMessageVO
.
setIp
(
ip
);
WxGroupSDK
.
sendTextMessage
(
sendTextMessageVO
);
break
;
case
"img"
:
// 发送图片
SendPicMessageVO
sendPicMessageVO
=
new
SendPicMessageVO
();
sendPicMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
sendPicMessageVO
.
setAltId
(
robotWxId
);
sendPicMessageVO
.
setWxGroupId
(
wxUserId
);
sendPicMessageVO
.
setPicUrl
(
replyMessage
.
getImgUrl
());
sendPicMessageVO
.
setIp
(
ip
);
WxGroupSDK
.
sendPicMessage
(
sendPicMessageVO
);
break
;
case
"file"
:
// 发送文件
String
fileUrl
=
replyMessage
.
getFileUrl
();
String
fileName
=
replyMessage
.
getFileName
();
String
fileType
=
fileUrl
.
substring
(
fileUrl
.
lastIndexOf
(
"."
),
fileUrl
.
length
());
if
(!
StringUtil
.
isEmpty
(
fileType
)
&&
fileName
.
contains
(
fileType
))
{
//去掉后缀
fileName
=
fileName
.
substring
(
0
,
fileName
.
indexOf
(
fileType
)
-
1
);
}
SendFileVO
sendFileVO
=
new
SendFileVO
();
sendFileVO
.
setFileUrl
(
fileUrl
);
sendFileVO
.
setFileName
(
fileName
);
sendFileVO
.
setIp
(
ip
);
sendFileVO
.
setAltId
(
robotWxId
);
sendFileVO
.
setWxId
(
wxUserId
);
WxGroupSDK
.
sendFile
(
sendFileVO
);
break
;
case
"app"
:
//发送应用
if
(
replyMessage
.
getAppId
()
!=
null
)
{
AppDto
appDto
=
appConsr
.
getBaseById
(
replyMessage
.
getAppId
().
longValue
());
if
(
appDto
!=
null
)
{
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
appDto
.
getChannelId
());
SendArticleMessageVO
sendArticleMessageVO
=
new
SendArticleMessageVO
();
sendArticleMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
sendArticleMessageVO
.
setAltId
(
robotWxId
);
sendArticleMessageVO
.
setDescription
(
appDto
.
getTypeName
());
sendArticleMessageVO
.
setWxGroupId
(
wxUserId
);
// 链接地址
String
linkUrl
=
this
.
splitUrl
(
accountSettingDto
,
replyMessage
.
getLinkUrl
());
sendArticleMessageVO
.
setLinkUrl
(
linkUrl
);
sendArticleMessageVO
.
setPicUrl
(
appDto
.
getSquareImg
());
sendArticleMessageVO
.
setTitle
(
appDto
.
getTitle
());
sendArticleMessageVO
.
setIp
(
ip
);
WxGroupSDK
.
sendArticleMessage
(
sendArticleMessageVO
);
}
}
//发送作品
if
(
replyMessage
.
getProductId
()
!=
null
)
{
ProductDto
productDto
=
productConsr
.
getProBaseById
(
replyMessage
.
getProductId
().
longValue
());
Long
channelId
=
productConsr
.
getOneChannelIdByProId
(
replyMessage
.
getProductId
().
longValue
());
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
if
(
productDto
!=
null
&&
accountSettingDto
!=
null
)
{
SendArticleMessageVO
sendArticleMessageVO
=
new
SendArticleMessageVO
();
sendArticleMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
sendArticleMessageVO
.
setAltId
(
robotWxId
);
if
(
productDto
.
getProductTypeDto
()
!=
null
)
{
sendArticleMessageVO
.
setDescription
(
productDto
.
getProductTypeDto
().
getTypeName
());
}
sendArticleMessageVO
.
setWxGroupId
(
wxUserId
);
// 处理链接地址
String
linkUrl
=
this
.
splitUrl
(
accountSettingDto
,
replyMessage
.
getLinkUrl
());
sendArticleMessageVO
.
setLinkUrl
(
linkUrl
);
sendArticleMessageVO
.
setPicUrl
(
productDto
.
getCoverImg
());
sendArticleMessageVO
.
setTitle
(
productDto
.
getProductName
());
sendArticleMessageVO
.
setIp
(
ip
);
WxGroupSDK
.
sendArticleMessage
(
sendArticleMessageVO
);
}
}
break
;
default
:
break
;
}
}
}
if
(
YesOrNoEnums
.
YES
.
getValue
().
equals
(
timeControlTaskItem
.
getAddSendTime
())){
if
(
YesOrNoEnums
.
YES
.
getValue
().
equals
(
timeControlTaskItem
.
getAddSendTime
())){
//封装退订提醒
//封装退订提醒
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
...
@@ -484,38 +397,6 @@ public class TaskSubscribeBizImpl implements TaskSubscribeBiz {
...
@@ -484,38 +397,6 @@ public class TaskSubscribeBizImpl implements TaskSubscribeBiz {
}
}
}
}
/**
* 补充退订提示信息
*
* @param replyMessages
*/
private
boolean
fillUnsubscribeInfo
(
List
<
TimeControlReplyMessage
>
replyMessages
,
boolean
lastOne
)
{
boolean
tmp
=
false
;
if
(
replyMessages
.
size
()
==
0
)
{
return
tmp
;
}
boolean
hasText
=
false
;
for
(
TimeControlReplyMessage
replyMessage
:
replyMessages
)
{
if
(
"text"
.
equals
(
replyMessage
.
getMessageType
()))
{
hasText
=
true
;
tmp
=
true
;
replyMessage
.
setText
(
replyMessage
.
getText
()
+
"\n如需退订,请回复 TD"
+
replyMessage
.
getTaskId
());
}
}
if
(
lastOne
&&
!
hasText
)
{
// 不存在文本消息 追加消息进行推送
TimeControlReplyMessage
text
=
TimeControlReplyMessage
.
builder
().
messageType
(
"text"
).
text
(
"如需退订,请回复 TD"
+
replyMessages
.
get
(
0
).
getTaskId
()).
build
();
replyMessages
.
add
(
text
);
}
return
tmp
;
}
@Override
@Override
public
TimeControlTaskSubscribe
getSubscribeState
(
String
wxUserId
,
Integer
taskId
)
{
public
TimeControlTaskSubscribe
getSubscribeState
(
String
wxUserId
,
Integer
taskId
)
{
TimeControlTaskSubscribe
timeControlTaskSubscribe
=
taskSubscribeMapper
.
getSubscribe
(
wxUserId
,
null
,
taskId
);
TimeControlTaskSubscribe
timeControlTaskSubscribe
=
taskSubscribeMapper
.
getSubscribe
(
wxUserId
,
null
,
taskId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/timecontrol/entity/TimeControlReplyMessage.java
View file @
6cc09c88
...
@@ -5,7 +5,6 @@ import lombok.Builder;
...
@@ -5,7 +5,6 @@ import lombok.Builder;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
@Data
@Data
...
@@ -19,21 +18,13 @@ public class TimeControlReplyMessage {
...
@@ -19,21 +18,13 @@ public class TimeControlReplyMessage {
private
Integer
taskItemId
;
private
Integer
taskItemId
;
private
Integer
replyType
;
private
Integer
type
;
private
String
messageType
;
private
String
text
;
private
Integer
appId
;
private
Integer
productId
;
private
Integer
replyType
;
private
String
imgUrl
;
private
String
fileName
;
private
String
content
;
private
String
file
Url
;
private
String
pic
Url
;
private
Date
createTime
;
private
Date
createTime
;
...
@@ -41,10 +32,12 @@ public class TimeControlReplyMessage {
...
@@ -41,10 +32,12 @@ public class TimeControlReplyMessage {
private
String
linkUrl
;
private
String
linkUrl
;
private
String
fileId
;
private
Long
serveId
;
private
String
serveType
;
private
String
fileType
;
private
Long
resourceId
;
private
BigDecimal
size
;
private
String
description
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/timecontrol/mapper/TimeControlReplyMessageMapper.java
View file @
6cc09c88
...
@@ -26,9 +26,9 @@ public interface TimeControlReplyMessageMapper {
...
@@ -26,9 +26,9 @@ public interface TimeControlReplyMessageMapper {
void
deleteByItemId
(
Integer
taskItemId
);
void
deleteByItemId
(
Integer
taskItemId
);
List
<
TimeControlReplyMessage
>
list4TaskItem
(
@Param
(
"taskItemId"
)
Integer
taskItemId
,
@Param
(
"
replyType"
)
Integer
replyT
ype
);
List
<
TimeControlReplyMessage
>
list4TaskItem
(
@Param
(
"taskItemId"
)
Integer
taskItemId
,
@Param
(
"
type"
)
Integer
t
ype
);
List
<
TimeControlReplyMessage
>
getByTaskItemId
(
Integer
taskItemId
);
List
<
TimeControlReplyMessage
>
getByTaskItemId
(
Integer
taskItemId
);
List
<
ReplyMessageDto
>
list4TaskItemList
(
@Param
(
"taskItemIds"
)
List
<
Integer
>
taskItemIds
,
@Param
(
"
replyType"
)
Integer
replyT
ype
);
List
<
ReplyMessageDto
>
list4TaskItemList
(
@Param
(
"taskItemIds"
)
List
<
Integer
>
taskItemIds
,
@Param
(
"
type"
)
Integer
t
ype
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/timecontrol/TimeControlReplyMessageMapper.xml
View file @
6cc09c88
...
@@ -5,24 +5,21 @@
...
@@ -5,24 +5,21 @@
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"task_item_id"
property=
"taskItemId"
jdbcType=
"INTEGER"
/>
<result
column=
"task_item_id"
property=
"taskItemId"
jdbcType=
"INTEGER"
/>
<result
column=
"task_id"
property=
"taskId"
jdbcType=
"INTEGER"
/>
<result
column=
"task_id"
property=
"taskId"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"reply_type"
property=
"replyType"
jdbcType=
"INTEGER"
/>
<result
column=
"reply_type"
property=
"replyType"
jdbcType=
"INTEGER"
/>
<result
column=
"message_type"
property=
"messageType"
jdbcType=
"VARCHAR"
/>
<result
column=
"content"
property=
"content"
jdbcType=
"VARCHAR"
/>
<result
column=
"text"
property=
"text"
jdbcType=
"VARCHAR"
/>
<result
column=
"serve_id"
property=
"serveId"
jdbcType=
"INTEGER"
/>
<result
column=
"app_id"
property=
"appId"
jdbcType=
"INTEGER"
/>
<result
column=
"resource_id"
property=
"resourceId"
jdbcType=
"INTEGER"
/>
<result
column=
"product_id"
property=
"productId"
jdbcType=
"INTEGER"
/>
<result
column=
"pic_url"
property=
"picUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"img_url"
property=
"imgUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"serve_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_name"
property=
"fileName"
jdbcType=
"VARCHAR"
/>
<result
column=
"description"
property=
"description"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_url"
property=
"fileUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_id"
property=
"fileId"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_type"
property=
"fileType"
jdbcType=
"VARCHAR"
/>
<result
column=
"size"
property=
"size"
jdbcType=
"DECIMAL"
/>
<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"
/>
<result
column=
"link_url"
property=
"linkUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"link_url"
property=
"linkUrl"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, task_id, task_item_id,
reply_type, message_type, text, app_id, product_id, img_url, file_nam
e,
id, task_id, task_item_id,
type, reply_type, content, serve_id, resource_id, pic_url, serve_typ
e,
file_url, create_time, update_time, link_url, file_id, file_type, size
description, create_time, update_time, link_url
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
select
...
@@ -32,10 +29,10 @@
...
@@ -32,10 +29,10 @@
</select>
</select>
<select
id=
"list4TaskItem"
resultMap=
"BaseResultMap"
>
<select
id=
"list4TaskItem"
resultMap=
"BaseResultMap"
>
select task_id, task_item_id,
reply_type, message_type, app_id, product_id, img_url, file_nam
e,
select task_id, task_item_id,
type, reply_type, serve_id, resource_id, pic_url, serve_typ
e,
file_url, create_time, text, link_url, file_id, file_type, size
description, create_time, content, link_url
from time_control_reply_message
from time_control_reply_message
where task_item_id = #{taskItemId} and
reply_type = #{replyT
ype}
where task_item_id = #{taskItemId} and
type = #{t
ype}
</select>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
...
@@ -46,26 +43,25 @@
...
@@ -46,26 +43,25 @@
delete from time_control_reply_message where task_item_id = #{taskItemId}
delete from time_control_reply_message where task_item_id = #{taskItemId}
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.timecontrol.entity.TimeControlReplyMessage"
>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.timecontrol.entity.TimeControlReplyMessage"
>
insert into time_control_reply_message (id, task_item_id,
reply_
type,
insert into time_control_reply_message (id, task_item_id, type,
message_type, app_id, product
_id,
reply_type, serve_id, resource
_id,
img_url, file_name, file_url
,
pic_url, serve_type, description
,
create_time, update_time)
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{taskItemId,jdbcType=INTEGER}, #{
replyT
ype,jdbcType=INTEGER},
values (#{id,jdbcType=INTEGER}, #{taskItemId,jdbcType=INTEGER}, #{
t
ype,jdbcType=INTEGER},
#{
messageType,jdbcType=VARCHAR}, #{appId,jdbcType=INTEGER}, #{product
Id,jdbcType=INTEGER},
#{
replyType,jdbcType=VARCHAR}, #{serveId,jdbcType=INTEGER}, #{resource
Id,jdbcType=INTEGER},
#{
imgUrl,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, #{fileUrl
,jdbcType=VARCHAR},
#{
picUrl,jdbcType=VARCHAR}, #{serveType,jdbcType=VARCHAR}, #{description
,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
</insert>
<insert
id=
"batchInsert"
>
<insert
id=
"batchInsert"
>
insert into time_control_reply_message (task_id, task_item_id,
reply_
type,
insert into time_control_reply_message (task_id, task_item_id, type,
message_type, text, app_id, product
_id,
reply_type, content, serve_id, resource
_id,
img_url, file_name, file_url
,
pic_url, serve_type, description
,
create_time, update_time, link_url
, file_id, file_type, size
)
create_time, update_time, link_url)
values
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.taskId}, #{item.taskItemId}, #{item.replyType}, #{item.messageType}, #{item.text}, #{item.appId},
(#{item.taskId}, #{item.taskItemId}, #{item.type}, #{item.replyType}, #{item.content}, #{item.serveId},
#{item.productId}, #{item.imgUrl}, #{item.fileName}, #{item.fileUrl}, now(), now(), #{item.linkUrl},
#{item.resourceId}, #{item.picUrl}, #{item.serveType}, #{item.description}, now(), now(), #{item.linkUrl})
#{item.fileId}, #{item.fileType}, #{item.size})
</foreach>
</foreach>
</insert>
</insert>
...
@@ -79,16 +75,16 @@
...
@@ -79,16 +75,16 @@
<select
id=
"list4TaskItemList"
resultType=
"com.pcloud.book.timecontrol.dto.ReplyMessageDto"
>
<select
id=
"list4TaskItemList"
resultType=
"com.pcloud.book.timecontrol.dto.ReplyMessageDto"
>
select
select
task_item_id taskItemId,
task_item_id taskItemId,
app_id app
Id,
serve_id serve
Id,
product_id product
Id,
resource_id resource
Id,
img_url img
Url,
pic_url pic
Url,
file_name fileNam
e,
serve_type serveTyp
e,
file_url fileUrl
,
description description
,
text tex
t,
content conten
t,
link_url linkUrl,
link_url linkUrl,
message_type message
Type, file_type fileType, size
reply_type reply
Type, file_type fileType, size
from time_control_reply_message
from time_control_reply_message
where
reply_type = #{replyT
ype}
where
type = #{t
ype}
<if
test=
"taskItemIds !=null and taskItemIds.size()>0"
>
<if
test=
"taskItemIds !=null and taskItemIds.size()>0"
>
AND task_item_id IN
AND task_item_id IN
<foreach
collection=
"taskItemIds"
open=
"("
close=
")"
separator=
","
item=
"item"
>
<foreach
collection=
"taskItemIds"
open=
"("
close=
")"
separator=
","
item=
"item"
>
...
...
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