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
45acbe71
Commit
45acbe71
authored
Mar 06, 2020
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多个进度单
parent
a8af2672
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
257 additions
and
54 deletions
+257
-54
PersonalStageBiz.java
...a/com/pcloud/book/personalstage/biz/PersonalStageBiz.java
+1
-1
PersonalStageJumpBiz.java
...m/pcloud/book/personalstage/biz/PersonalStageJumpBiz.java
+1
-2
PersonalStageProgressMessageBiz.java
...ok/personalstage/biz/PersonalStageProgressMessageBiz.java
+8
-1
PersonalStageBizImpl.java
...oud/book/personalstage/biz/impl/PersonalStageBizImpl.java
+29
-10
PersonalStageJumpBizImpl.java
...book/personalstage/biz/impl/PersonalStageJumpBizImpl.java
+8
-6
PersonalStageProgressMessageBizImpl.java
...alstage/biz/impl/PersonalStageProgressMessageBizImpl.java
+12
-4
PersonalStageCheck.java
...m/pcloud/book/personalstage/check/PersonalStageCheck.java
+10
-0
PersonalStageConstant.java
...ud/book/personalstage/constant/PersonalStageConstant.java
+6
-0
PersonalStageProgressMessageDao.java
...ok/personalstage/dao/PersonalStageProgressMessageDao.java
+14
-4
PersonalStageProgressMessageDaoImpl.java
...alstage/dao/impl/PersonalStageProgressMessageDaoImpl.java
+24
-11
LinkClickRecordDTO.java
...com/pcloud/book/personalstage/dto/LinkClickRecordDTO.java
+2
-0
PersonalStageProgressDTO.java
...loud/book/personalstage/dto/PersonalStageProgressDTO.java
+35
-0
ProgressDelayDTO.java
...a/com/pcloud/book/personalstage/dto/ProgressDelayDTO.java
+2
-0
PersonalStageProgressMessage.java
...ok/personalstage/entity/PersonalStageProgressMessage.java
+2
-1
PersonalStageReply.java
.../pcloud/book/personalstage/entity/PersonalStageReply.java
+7
-0
PersonalStageFacade.java
...pcloud/book/personalstage/facade/PersonalStageFacade.java
+15
-4
PersonalStageProgressMessage.Mapper.xml
...per/personalstage/PersonalStageProgressMessage.Mapper.xml
+69
-6
PersonalStageReply.xml
...ain/resources/mapper/personalstage/PersonalStageReply.xml
+12
-4
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/PersonalStageBiz.java
View file @
45acbe71
...
@@ -59,7 +59,7 @@ public interface PersonalStageBiz {
...
@@ -59,7 +59,7 @@ public interface PersonalStageBiz {
void
dealDelayFusingFinish
(
DelayQueueDTO
dto
);
void
dealDelayFusingFinish
(
DelayQueueDTO
dto
);
PersonalStageProgressDTO
getPersonalProgress
(
String
wxUserId
,
Long
personalStageUserId
);
PersonalStageProgressDTO
getPersonalProgress
(
String
wxUserId
,
Long
personalStageUserId
,
Long
progressId
);
/**
/**
* 增加进度值
* 增加进度值
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/PersonalStageJumpBiz.java
View file @
45acbe71
...
@@ -9,7 +9,6 @@ import com.pcloud.book.personalstage.vo.request.UpdateStageJumpRequestVO;
...
@@ -9,7 +9,6 @@ import com.pcloud.book.personalstage.vo.request.UpdateStageJumpRequestVO;
import
com.pcloud.common.core.mq.DelayQueueDTO
;
import
com.pcloud.common.core.mq.DelayQueueDTO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
public
interface
PersonalStageJumpBiz
{
public
interface
PersonalStageJumpBiz
{
...
@@ -65,7 +64,7 @@ public interface PersonalStageJumpBiz {
...
@@ -65,7 +64,7 @@ public interface PersonalStageJumpBiz {
/**
/**
* 进度单发送时添加未点链接回复延迟
* 进度单发送时添加未点链接回复延迟
*/
*/
public
void
addProgressDelay
(
String
userWxId
,
String
robotWxId
,
String
ip
);
public
void
addProgressDelay
(
String
userWxId
,
String
robotWxId
,
String
ip
,
Integer
personalStageProgress1
);
/**
/**
* 添加点击记录
* 添加点击记录
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/PersonalStageProgressMessageBiz.java
View file @
45acbe71
package
com
.
pcloud
.
book
.
personalstage
.
biz
;
package
com
.
pcloud
.
book
.
personalstage
.
biz
;
import
com.pcloud.book.personalstage.dto.PersonalStageProgressDTO
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.List
;
...
@@ -23,7 +24,7 @@ public interface PersonalStageProgressMessageBiz {
...
@@ -23,7 +24,7 @@ public interface PersonalStageProgressMessageBiz {
/**
/**
* 分页查询
* 分页查询
*/
*/
List
<
PersonalStageProgressMessage
>
getProgressMessageList
();
List
<
PersonalStageProgressMessage
>
getProgressMessageList
(
Integer
progressId
);
/**
/**
* 新增数据
* 新增数据
...
@@ -41,4 +42,9 @@ public interface PersonalStageProgressMessageBiz {
...
@@ -41,4 +42,9 @@ public interface PersonalStageProgressMessageBiz {
*/
*/
void
deleteById
(
Long
id
);
void
deleteById
(
Long
id
);
/**
* 获取进度单列表
* @return
*/
List
<
PersonalStageProgressDTO
>
getProgressList
();
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageBizImpl.java
View file @
45acbe71
...
@@ -698,19 +698,37 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -698,19 +698,37 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
@ParamLog
(
"尝试插入单号"
)
@ParamLog
(
"尝试插入单号"
)
private
void
tryInsertNumber
(
Long
personalStageUserId
)
{
private
void
tryInsertNumber
(
Long
personalStageUserId
)
{
String
requireNumber
=
DateUtils
.
formatDate
(
new
Date
(),
"yyyyMMddHHmmss"
).
concat
(
String
.
valueOf
((
int
)((
Math
.
random
()*
9
+
1
)*
100000
)));
PersonalStageUser
personalStageUser
=
personalStageUserDao
.
getById
(
personalStageUserId
);
personalStageUserDao
.
updateRequireNumber
(
personalStageUserId
,
requireNumber
);
if
(
StringUtil
.
isEmpty
(
personalStageUser
.
getRequireNumber
())){
}
String
requireNumber
=
DateUtils
.
formatDate
(
new
Date
(),
"yyyyMMddHHmmss"
).
concat
(
String
.
valueOf
((
int
)((
Math
.
random
()*
9
+
1
)*
100000
)));
personalStageUserDao
.
updateRequireNumber
(
personalStageUserId
,
requireNumber
);
}
}
@Override
@Override
@ParamLog
(
"替换进度链接"
)
@ParamLog
(
"替换进度链接"
)
public
String
replaceProjectProgressUrl
(
String
content
,
String
robotId
,
String
userWxId
,
Long
personalStageUserId
,
String
ip
)
{
public
String
replaceProjectProgressUrl
(
String
content
,
String
robotId
,
String
userWxId
,
Long
personalStageUserId
,
String
ip
)
{
if
(
content
.
indexOf
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE
)
>
-
1
){
if
(
content
.
indexOf
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_1
)
>
-
1
){
tryInsertNumber
(
personalStageUserId
);
String
longUrl
=
wechatLinkPrefix
.
concat
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS
).
concat
(
"?wxUserId="
+
userWxId
+
"&robotId="
+
robotId
+
"&personalStageUserId="
+
personalStageUserId
+
"&progressId="
+
PersonalStageConstant
.
PERSONAL_STAGE_PROGRESS_1
);
content
=
content
.
replace
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_1
,
UrlUtils
.
getShortUrl4Own
(
longUrl
));
//添加进度单回复延迟队列
personalStageJumpBiz
.
addProgressDelay
(
userWxId
,
robotId
,
ip
,
PersonalStageConstant
.
PERSONAL_STAGE_PROGRESS_1
);
}
else
if
(
content
.
indexOf
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_2
)
>
-
1
){
tryInsertNumber
(
personalStageUserId
);
String
longUrl
=
wechatLinkPrefix
.
concat
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS
).
concat
(
"?wxUserId="
+
userWxId
+
"&robotId="
+
robotId
+
"&personalStageUserId="
+
personalStageUserId
+
"&progressId="
+
PersonalStageConstant
.
PERSONAL_STAGE_PROGRESS_2
);
content
=
content
.
replace
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_2
,
UrlUtils
.
getShortUrl4Own
(
longUrl
));
//添加进度单回复延迟队列
personalStageJumpBiz
.
addProgressDelay
(
userWxId
,
robotId
,
ip
,
PersonalStageConstant
.
PERSONAL_STAGE_PROGRESS_2
);
}
else
if
(
content
.
indexOf
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_3
)
>
-
1
){
tryInsertNumber
(
personalStageUserId
);
tryInsertNumber
(
personalStageUserId
);
String
longUrl
=
wechatLinkPrefix
.
concat
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS
).
concat
(
"?wxUserId="
+
userWxId
+
"&robotId="
+
robotId
+
"&personalStageUserId="
+
personalStageUserId
);
String
longUrl
=
wechatLinkPrefix
.
concat
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS
).
concat
(
"?wxUserId="
+
userWxId
+
content
=
content
.
replace
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE
,
UrlUtils
.
getShortUrl4Own
(
longUrl
));
"&robotId="
+
robotId
+
"&personalStageUserId="
+
personalStageUserId
+
"&progressId="
+
PersonalStageConstant
.
PERSONAL_STAGE_PROGRESS_3
);
content
=
content
.
replace
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_3
,
UrlUtils
.
getShortUrl4Own
(
longUrl
));
//添加进度单回复延迟队列
//添加进度单回复延迟队列
personalStageJumpBiz
.
addProgressDelay
(
userWxId
,
robotId
,
ip
);
personalStageJumpBiz
.
addProgressDelay
(
userWxId
,
robotId
,
ip
,
PersonalStageConstant
.
PERSONAL_STAGE_PROGRESS_3
);
}
}
content
=
replaceUserSendContent
(
content
,
robotId
,
userWxId
);
content
=
replaceUserSendContent
(
content
,
robotId
,
userWxId
);
content
=
replaceReadingStyle
(
content
,
robotId
,
userWxId
);
content
=
replaceReadingStyle
(
content
,
robotId
,
userWxId
);
...
@@ -926,7 +944,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -926,7 +944,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
}
}
@Override
@Override
public
PersonalStageProgressDTO
getPersonalProgress
(
String
wxUserId
,
Long
personalStageUserId
)
{
public
PersonalStageProgressDTO
getPersonalProgress
(
String
wxUserId
,
Long
personalStageUserId
,
Long
progressId
)
{
PersonalStageProgressDTO
personalStageProgressDTO
=
new
PersonalStageProgressDTO
();
PersonalStageProgressDTO
personalStageProgressDTO
=
new
PersonalStageProgressDTO
();
PersonalStageUser
personalStageUser
=
personalStageUserDao
.
getById
(
personalStageUserId
);
PersonalStageUser
personalStageUser
=
personalStageUserDao
.
getById
(
personalStageUserId
);
if
(
personalStageUser
==
null
){
if
(
personalStageUser
==
null
){
...
@@ -940,8 +958,9 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -940,8 +958,9 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
personalStageProgressDTO
.
setSex
(
groupUserDTO
.
getSex
());
personalStageProgressDTO
.
setSex
(
groupUserDTO
.
getSex
());
personalStageProgressDTO
.
setRequireNumber
(
personalStageUser
.
getRequireNumber
());
personalStageProgressDTO
.
setRequireNumber
(
personalStageUser
.
getRequireNumber
());
personalStageProgressDTO
.
setScore
(
personalStageUser
.
getScore
());
personalStageProgressDTO
.
setScore
(
personalStageUser
.
getScore
());
List
<
PersonalStageProgressMessage
>
personalStageProgressMessages
=
personalStageProgressMessageDao
.
selectAllProgressMessage
();
List
<
PersonalStageProgressMessage
>
personalStageProgressMessages
=
Integer
totalProgress
=
personalStageProgressMessageDao
.
countProgressMessage
();
personalStageProgressMessageDao
.
getPersonalProgress
(
startTime
,
progressId
);
Integer
totalProgress
=
personalStageProgressMessageDao
.
countProgressMessage
(
progressId
);
personalStageProgressDTO
.
setTotalProgress
(
totalProgress
==
null
?
0
:
totalProgress
);
personalStageProgressDTO
.
setTotalProgress
(
totalProgress
==
null
?
0
:
totalProgress
);
if
(!
ListUtils
.
isEmpty
(
personalStageProgressMessages
)){
if
(!
ListUtils
.
isEmpty
(
personalStageProgressMessages
)){
List
<
PersonalStageProgressMessage
>
newList
=
this
.
setProgressTime
(
personalStageProgressMessages
,
startTime
);
List
<
PersonalStageProgressMessage
>
newList
=
this
.
setProgressTime
(
personalStageProgressMessages
,
startTime
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageJumpBizImpl.java
View file @
45acbe71
...
@@ -826,8 +826,8 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
...
@@ -826,8 +826,8 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
@Override
@Override
@ParamLog
(
"添加进度单延时"
)
@ParamLog
(
"添加进度单延时"
)
public
void
addProgressDelay
(
String
userWxId
,
String
robotWxId
,
String
ip
){
public
void
addProgressDelay
(
String
userWxId
,
String
robotWxId
,
String
ip
,
Integer
progressId
){
PersonalStageProgressMessage
progressMessage
=
personalStageProgressMessageDao
.
getWaitClickProgress
();
PersonalStageProgressMessage
progressMessage
=
personalStageProgressMessageDao
.
getWaitClickProgress
(
progressId
);
if
(
null
==
progressMessage
||
null
==
progressMessage
.
getMinutes
()){
if
(
null
==
progressMessage
||
null
==
progressMessage
.
getMinutes
()){
return
;
return
;
}
}
...
@@ -842,6 +842,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
...
@@ -842,6 +842,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
progressDelayDTO
.
setRobotId
(
robotWxId
);
progressDelayDTO
.
setRobotId
(
robotWxId
);
progressDelayDTO
.
setWxId
(
userWxId
);
progressDelayDTO
.
setWxId
(
userWxId
);
progressDelayDTO
.
setPersonalStageId
(
personalStageId
);
progressDelayDTO
.
setPersonalStageId
(
personalStageId
);
progressDelayDTO
.
setProgressId
(
progressId
);
DelayQueueDTO
delayQueueDTONew
=
DelayQueueDTO
.
builder
().
key
(
userWxId
).
type
(
PersonalStageConstant
.
PERSONALSTAGE_DELAY_PROGRESS
).
msg
(
progressDelayDTO
).
timeout
(
time
).
build
();
DelayQueueDTO
delayQueueDTONew
=
DelayQueueDTO
.
builder
().
key
(
userWxId
).
type
(
PersonalStageConstant
.
PERSONALSTAGE_DELAY_PROGRESS
).
msg
(
progressDelayDTO
).
timeout
(
time
).
build
();
delayMessageSender
.
send
(
delayQueueDTONew
);
delayMessageSender
.
send
(
delayQueueDTONew
);
String
key
=
"BOOK:LINK_PROGRESS:"
+
userWxId
+
"-"
+
robotWxId
;
String
key
=
"BOOK:LINK_PROGRESS:"
+
userWxId
+
"-"
+
robotWxId
;
...
@@ -856,7 +857,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
...
@@ -856,7 +857,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
String
userWxId
=
linkClickRecordDTO
.
getWxId
();
String
userWxId
=
linkClickRecordDTO
.
getWxId
();
String
robotId
=
linkClickRecordDTO
.
getRobotId
();
String
robotId
=
linkClickRecordDTO
.
getRobotId
();
if
(
linkType
==
1
){
if
(
linkType
==
1
){
String
key
=
"BOOK:LINK_PROGRESS:"
+
userWxId
+
"-"
+
robotId
;
String
key
=
"BOOK:LINK_PROGRESS:"
+
userWxId
+
"-"
+
robotId
+
"-"
+
linkClickRecordDTO
.
getProgressId
()
;
JedisClusterUtils
.
setJson
(
key
,
userWxId
,
5
*
3600
);
JedisClusterUtils
.
setJson
(
key
,
userWxId
,
5
*
3600
);
}
else
if
(
linkType
==
2
){
}
else
if
(
linkType
==
2
){
String
key
=
"BOOK:LINK_PAPER:"
+
userWxId
+
"-"
+
robotId
+
"-"
+
linkClickRecordDTO
.
getPaperId
();
String
key
=
"BOOK:LINK_PAPER:"
+
userWxId
+
"-"
+
robotId
+
"-"
+
linkClickRecordDTO
.
getPaperId
();
...
@@ -867,17 +868,18 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
...
@@ -867,17 +868,18 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
@Override
@Override
@ParamLog
(
"进度单延迟处理"
)
@ParamLog
(
"进度单延迟处理"
)
public
void
delayProgress
(
DelayQueueDTO
dto
)
{
public
void
delayProgress
(
DelayQueueDTO
dto
)
{
PersonalStageProgressMessage
progressMessage
=
personalStageProgressMessageDao
.
getWaitClickProgress
();
ProgressDelayDTO
progressDelayDTO
=(
ProgressDelayDTO
)
dto
.
getMsg
();
Integer
progressId
=
progressDelayDTO
.
getProgressId
();
PersonalStageProgressMessage
progressMessage
=
personalStageProgressMessageDao
.
getWaitClickProgress
(
progressId
);
if
(
null
==
progressMessage
||
StringUtil
.
isEmpty
(
progressMessage
.
getContent
())){
if
(
null
==
progressMessage
||
StringUtil
.
isEmpty
(
progressMessage
.
getContent
())){
return
;
return
;
}
}
String
userWxId
=
dto
.
getKey
();
String
userWxId
=
dto
.
getKey
();
ProgressDelayDTO
progressDelayDTO
=(
ProgressDelayDTO
)
dto
.
getMsg
();
String
robotId
=
progressDelayDTO
.
getRobotId
();
String
robotId
=
progressDelayDTO
.
getRobotId
();
Long
personalStageId
=
progressDelayDTO
.
getPersonalStageId
();
Long
personalStageId
=
progressDelayDTO
.
getPersonalStageId
();
String
ip
=
progressDelayDTO
.
getIp
();
String
ip
=
progressDelayDTO
.
getIp
();
//是否点击过进度单链接
//是否点击过进度单链接
String
key
=
"BOOK:LINK_PROGRESS:"
+
userWxId
+
"-"
+
robotId
;
String
key
=
"BOOK:LINK_PROGRESS:"
+
userWxId
+
"-"
+
robotId
+
"-"
+
progressId
;
String
value
=
JedisClusterUtils
.
getJson
(
key
,
String
.
class
);
String
value
=
JedisClusterUtils
.
getJson
(
key
,
String
.
class
);
if
(!
StringUtil
.
isEmpty
(
value
)){
if
(!
StringUtil
.
isEmpty
(
value
)){
log
.
info
(
"用户已点击进度单链接"
);
log
.
info
(
"用户已点击进度单链接"
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageProgressMessageBizImpl.java
View file @
45acbe71
package
com
.
pcloud
.
book
.
personalstage
.
biz
.
impl
;
package
com
.
pcloud
.
book
.
personalstage
.
biz
.
impl
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.pcloud.book.personalstage.dto.PersonalStageProgressDTO
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.book.personalstage.dao.PersonalStageProgressMessageDao
;
import
com.pcloud.book.personalstage.dao.PersonalStageProgressMessageDao
;
import
com.pcloud.book.personalstage.biz.PersonalStageProgressMessageBiz
;
import
com.pcloud.book.personalstage.biz.PersonalStageProgressMessageBiz
;
...
@@ -41,8 +43,8 @@ public class PersonalStageProgressMessageBizImpl implements PersonalStageProgres
...
@@ -41,8 +43,8 @@ public class PersonalStageProgressMessageBizImpl implements PersonalStageProgres
@Override
@Override
@ParamLog
(
"查询多条数据"
)
@ParamLog
(
"查询多条数据"
)
public
List
<
PersonalStageProgressMessage
>
getProgressMessageList
()
{
public
List
<
PersonalStageProgressMessage
>
getProgressMessageList
(
Integer
progressId
)
{
List
<
PersonalStageProgressMessage
>
progressMessageList
=
personalStageProgressMessageDao
.
getProgressMessageList
();
List
<
PersonalStageProgressMessage
>
progressMessageList
=
personalStageProgressMessageDao
.
getProgressMessageList
(
progressId
);
if
(
ListUtils
.
isEmpty
(
progressMessageList
)){
if
(
ListUtils
.
isEmpty
(
progressMessageList
)){
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
...
@@ -64,9 +66,9 @@ public class PersonalStageProgressMessageBizImpl implements PersonalStageProgres
...
@@ -64,9 +66,9 @@ public class PersonalStageProgressMessageBizImpl implements PersonalStageProgres
if
(
personalStageProgressMessage
.
stream
().
filter
(
x
->
StringUtil
.
isEmpty
(
x
.
getContent
())).
count
()
>
0
){
if
(
personalStageProgressMessage
.
stream
().
filter
(
x
->
StringUtil
.
isEmpty
(
x
.
getContent
())).
count
()
>
0
){
throw
BizException
.
PARAM_IS_NULL
;
throw
BizException
.
PARAM_IS_NULL
;
}
}
Integer
progressId
=
personalStageProgressMessage
.
get
(
0
).
getProgressId
();
// 删除所有旧数据
// 删除所有旧数据
personalStageProgressMessageDao
.
delete
All
(
);
personalStageProgressMessageDao
.
delete
ByProgressId
(
progressId
);
personalStageProgressMessage
.
stream
().
forEach
(
x
->{
personalStageProgressMessage
.
stream
().
forEach
(
x
->{
if
(
x
.
getType
()
==
null
||
x
.
getType
()
==
0
){
if
(
x
.
getType
()
==
null
||
x
.
getType
()
==
0
){
x
.
setType
(
1
);
x
.
setType
(
1
);
...
@@ -81,4 +83,9 @@ public class PersonalStageProgressMessageBizImpl implements PersonalStageProgres
...
@@ -81,4 +83,9 @@ public class PersonalStageProgressMessageBizImpl implements PersonalStageProgres
public
void
deleteById
(
Long
id
)
{
public
void
deleteById
(
Long
id
)
{
personalStageProgressMessageDao
.
deleteById
(
id
);
personalStageProgressMessageDao
.
deleteById
(
id
);
}
}
@Override
public
List
<
PersonalStageProgressDTO
>
getProgressList
()
{
return
personalStageProgressMessageDao
.
getProgressList
();
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/check/PersonalStageCheck.java
View file @
45acbe71
...
@@ -75,6 +75,7 @@ public class PersonalStageCheck {
...
@@ -75,6 +75,7 @@ public class PersonalStageCheck {
@ParamLog
(
"校验回复"
)
@ParamLog
(
"校验回复"
)
private
Long
checkReplies
(
List
<
PersonalStageReply
>
list
)
{
private
Long
checkReplies
(
List
<
PersonalStageReply
>
list
)
{
Long
paperId
=
null
;
Long
paperId
=
null
;
Long
progressId
=
null
;
for
(
PersonalStageReply
reply:
list
){
for
(
PersonalStageReply
reply:
list
){
if
(
reply
==
null
){
if
(
reply
==
null
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"回复不能为空!"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"回复不能为空!"
);
...
@@ -91,6 +92,15 @@ public class PersonalStageCheck {
...
@@ -91,6 +92,15 @@ public class PersonalStageCheck {
paperId
=
reply
.
getPaperId
();
paperId
=
reply
.
getPaperId
();
}
}
}
}
if
(
null
!=
reply
.
getProgressId
()){
if
(
null
!=
progressId
){
if
(!
reply
.
getProgressId
().
equals
(
progressId
)){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"非关键词回复存在不一样的进度单"
);
}
}
else
{
progressId
=
reply
.
getProgressId
();
}
}
checkReplayItems
(
reply
.
getPersonalStageReplyItems
());
checkReplayItems
(
reply
.
getPersonalStageReplyItems
());
}
}
return
paperId
;
return
paperId
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/constant/PersonalStageConstant.java
View file @
45acbe71
...
@@ -12,6 +12,12 @@ public class PersonalStageConstant {
...
@@ -12,6 +12,12 @@ public class PersonalStageConstant {
public
static
final
String
PERSONALSTAGE_DELAY_LINKUP
=
"PERSONALSTAGE_DELAY_LINKUP"
;
public
static
final
String
PERSONALSTAGE_DELAY_LINKUP
=
"PERSONALSTAGE_DELAY_LINKUP"
;
// 进度模板字符串
// 进度模板字符串
public
static
final
String
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE
=
"${PROGRESS_URL}"
;
public
static
final
String
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE
=
"${PROGRESS_URL}"
;
public
static
final
String
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_1
=
"${PROGRESS_URL_1}"
;
public
static
final
String
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_2
=
"${PROGRESS_URL_2}"
;
public
static
final
String
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE_3
=
"${PROGRESS_URL_3}"
;
public
static
final
Integer
PERSONAL_STAGE_PROGRESS_1
=
1
;
public
static
final
Integer
PERSONAL_STAGE_PROGRESS_2
=
2
;
public
static
final
Integer
PERSONAL_STAGE_PROGRESS_3
=
3
;
// 项目进度页面路由
// 项目进度页面路由
public
static
final
String
PERSONAL_STAGE_PROJECT_PROGRESS
=
"/personalCenter/projectProgress"
;
public
static
final
String
PERSONAL_STAGE_PROJECT_PROGRESS
=
"/personalCenter/projectProgress"
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dao/PersonalStageProgressMessageDao.java
View file @
45acbe71
package
com
.
pcloud
.
book
.
personalstage
.
dao
;
package
com
.
pcloud
.
book
.
personalstage
.
dao
;
import
com.pcloud.book.personalstage.dto.PersonalStageProgressDTO
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.common.core.dao.BaseDao
;
import
com.pcloud.common.core.dao.BaseDao
;
...
@@ -14,19 +15,27 @@ import java.util.List;
...
@@ -14,19 +15,27 @@ import java.util.List;
*/
*/
public
interface
PersonalStageProgressMessageDao
extends
BaseDao
<
PersonalStageProgressMessage
>
{
public
interface
PersonalStageProgressMessageDao
extends
BaseDao
<
PersonalStageProgressMessage
>
{
List
<
PersonalStageProgressMessage
>
getPersonalProgress
(
Date
startTime
);
List
<
PersonalStageProgressMessage
>
getPersonalProgress
(
Date
startTime
,
Long
progressId
);
List
<
PersonalStageProgressMessage
>
selectAllProgressMessage
();
List
<
PersonalStageProgressMessage
>
selectAllProgressMessage
();
List
<
PersonalStageProgressMessage
>
getProgressMessageList
();
List
<
PersonalStageProgressMessage
>
getProgressMessageList
(
Integer
progressId
);
void
deleteAll
();
void
deleteAll
();
/**
/**
* 获取进度总数
* 获取进度总数
* @return
* @return
* @param progressId
*/
*/
Integer
countProgressMessage
();
Integer
countProgressMessage
(
Long
progressId
);
PersonalStageProgressMessage
getWaitClickProgress
(
Integer
progressId
);
List
<
PersonalStageProgressDTO
>
getProgressList
();
PersonalStageProgressMessage
getWaitClickProgress
(
);
void
deleteByProgressId
(
Integer
progressId
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dao/impl/PersonalStageProgressMessageDaoImpl.java
View file @
45acbe71
package
com
.
pcloud
.
book
.
personalstage
.
dao
.
impl
;
package
com
.
pcloud
.
book
.
personalstage
.
dao
.
impl
;
import
com.pcloud.book.personalstage.dto.PersonalStageProgressDTO
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.book.personalstage.entity.PersonalStageProgressMessage
;
import
com.pcloud.book.personalstage.dao.PersonalStageProgressMessageDao
;
import
com.pcloud.book.personalstage.dao.PersonalStageProgressMessageDao
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.List
;
/**
/**
* (PersonalStageProgressMessage)表数据库访问层
* (PersonalStageProgressMessage)表数据库访问层
...
@@ -19,8 +18,11 @@ import java.util.List;
...
@@ -19,8 +18,11 @@ import java.util.List;
public
class
PersonalStageProgressMessageDaoImpl
extends
BaseDaoImpl
<
PersonalStageProgressMessage
>
implements
PersonalStageProgressMessageDao
{
public
class
PersonalStageProgressMessageDaoImpl
extends
BaseDaoImpl
<
PersonalStageProgressMessage
>
implements
PersonalStageProgressMessageDao
{
@Override
@Override
public
List
<
PersonalStageProgressMessage
>
getPersonalProgress
(
Date
startTime
)
{
public
List
<
PersonalStageProgressMessage
>
getPersonalProgress
(
Date
startTime
,
Long
progressId
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getPersonalProgress"
),
startTime
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"startTime"
,
startTime
);
paramMap
.
put
(
"progressId"
,
progressId
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getPersonalProgress"
),
paramMap
);
}
}
public
List
<
PersonalStageProgressMessage
>
selectAllProgressMessage
(){
public
List
<
PersonalStageProgressMessage
>
selectAllProgressMessage
(){
...
@@ -28,8 +30,8 @@ public class PersonalStageProgressMessageDaoImpl extends BaseDaoImpl<PersonalSta
...
@@ -28,8 +30,8 @@ public class PersonalStageProgressMessageDaoImpl extends BaseDaoImpl<PersonalSta
}
}
@Override
@Override
public
List
<
PersonalStageProgressMessage
>
getProgressMessageList
()
{
public
List
<
PersonalStageProgressMessage
>
getProgressMessageList
(
Integer
progressId
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getProgressMessageList"
));
return
getSessionTemplate
().
selectList
(
getStatement
(
"getProgressMessageList"
)
,
progressId
);
}
}
@Override
@Override
...
@@ -38,12 +40,22 @@ public class PersonalStageProgressMessageDaoImpl extends BaseDaoImpl<PersonalSta
...
@@ -38,12 +40,22 @@ public class PersonalStageProgressMessageDaoImpl extends BaseDaoImpl<PersonalSta
}
}
@Override
@Override
public
Integer
countProgressMessage
()
{
public
Integer
countProgressMessage
(
Long
progressId
)
{
return
super
.
sqlSessionTemplate
.
selectOne
(
getStatement
(
"countProgressMessage"
));
return
super
.
sqlSessionTemplate
.
selectOne
(
getStatement
(
"countProgressMessage"
)
,
progressId
);
}
}
@Override
@Override
public
PersonalStageProgressMessage
getWaitClickProgress
()
{
public
PersonalStageProgressMessage
getWaitClickProgress
(
Integer
progressId
)
{
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getWaitClickProgress"
));
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getWaitClickProgress"
),
progressId
);
}
@Override
public
List
<
PersonalStageProgressDTO
>
getProgressList
()
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getProgressList"
));
}
@Override
public
void
deleteByProgressId
(
Integer
progressId
)
{
super
.
getSessionTemplate
().
delete
(
getStatement
(
"deleteByProgressId"
),
progressId
);
}
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dto/LinkClickRecordDTO.java
View file @
45acbe71
...
@@ -17,4 +17,6 @@ public class LinkClickRecordDTO extends BaseDto {
...
@@ -17,4 +17,6 @@ public class LinkClickRecordDTO extends BaseDto {
private
String
wxId
;
private
String
wxId
;
@ApiModelProperty
(
"需求定制单id"
)
@ApiModelProperty
(
"需求定制单id"
)
private
Long
paperId
;
private
Long
paperId
;
@ApiModelProperty
(
"进度单id"
)
private
Integer
progressId
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dto/PersonalStageProgressDTO.java
View file @
45acbe71
...
@@ -48,4 +48,39 @@ public class PersonalStageProgressDTO {
...
@@ -48,4 +48,39 @@ public class PersonalStageProgressDTO {
* 进度总数
* 进度总数
*/
*/
private
Integer
totalProgress
;
private
Integer
totalProgress
;
/**
* 进度单id
*/
private
Integer
progressId
;
/**
* 进度单名称
*/
private
String
progressName
;
/**
* 开始文案
*/
private
String
startText
;
/**
* 开始进度内容id
*/
private
Integer
startMessageId
;
/**
* 结束文案
*/
private
String
endText
;
/**
* 结束进度内容id
*/
private
Integer
endMessageId
;
/**
* 特殊符号
*/
private
String
specialSymbol
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dto/ProgressDelayDTO.java
View file @
45acbe71
...
@@ -18,5 +18,7 @@ public class ProgressDelayDTO implements Serializable {
...
@@ -18,5 +18,7 @@ public class ProgressDelayDTO implements Serializable {
private
String
wxId
;
private
String
wxId
;
@ApiModelProperty
(
"ip地址"
)
@ApiModelProperty
(
"ip地址"
)
private
String
ip
;
private
String
ip
;
@ApiModelProperty
(
"进度id"
)
private
Integer
progressId
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/entity/PersonalStageProgressMessage.java
View file @
45acbe71
...
@@ -17,7 +17,8 @@ import lombok.Data;
...
@@ -17,7 +17,8 @@ import lombok.Data;
public
class
PersonalStageProgressMessage
extends
BaseEntity
{
public
class
PersonalStageProgressMessage
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
783203450632034209L
;
private
static
final
long
serialVersionUID
=
783203450632034209L
;
private
Integer
progressId
;
private
String
content
;
private
String
content
;
private
Integer
minutes
;
private
Integer
minutes
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/entity/PersonalStageReply.java
View file @
45acbe71
...
@@ -35,4 +35,10 @@ public class PersonalStageReply extends BaseEntity {
...
@@ -35,4 +35,10 @@ public class PersonalStageReply extends BaseEntity {
@ApiModelProperty
(
"回复项集合"
)
@ApiModelProperty
(
"回复项集合"
)
private
List
<
PersonalStageReplyItem
>
personalStageReplyItems
;
private
List
<
PersonalStageReplyItem
>
personalStageReplyItems
;
@ApiModelProperty
(
"进度单id"
)
private
Long
progressId
;
@ApiModelProperty
(
"进度单id"
)
private
String
progressName
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/facade/PersonalStageFacade.java
View file @
45acbe71
...
@@ -198,16 +198,18 @@ public class PersonalStageFacade {
...
@@ -198,16 +198,18 @@ public class PersonalStageFacade {
@ApiOperation
(
"获取进度"
)
@ApiOperation
(
"获取进度"
)
@GetMapping
(
"getPersonalProgress"
)
@GetMapping
(
"getPersonalProgress"
)
public
ResponseDto
<?>
getPersonalProgress
(
@RequestParam
(
"wxUserId"
)
String
wxUserId
,
@RequestParam
(
"personalStageUserId"
)
Long
personalStageUserId
)
throws
PermissionException
,
BizException
{
public
ResponseDto
<?>
getPersonalProgress
(
@RequestParam
(
"wxUserId"
)
String
wxUserId
,
PersonalStageProgressDTO
personalStageProgressDTO
=
personalStageBiz
.
getPersonalProgress
(
wxUserId
,
personalStageUserId
);
@RequestParam
(
"personalStageUserId"
)
Long
personalStageUserId
,
@RequestParam
(
"progressId"
)
Long
progressId
)
throws
PermissionException
,
BizException
{
PersonalStageProgressDTO
personalStageProgressDTO
=
personalStageBiz
.
getPersonalProgress
(
wxUserId
,
personalStageUserId
,
progressId
);
return
new
ResponseDto
<>(
personalStageProgressDTO
);
return
new
ResponseDto
<>(
personalStageProgressDTO
);
}
}
@ApiOperation
(
"查询所有的进度消息"
)
@ApiOperation
(
"查询所有的进度消息"
)
@GetMapping
(
"getProgressMessageList"
)
@GetMapping
(
"getProgressMessageList"
)
public
ResponseDto
<?>
getProgressMessageList
()
public
ResponseDto
<?>
getProgressMessageList
(
@RequestParam
(
"progressId"
)
Integer
progressId
)
throws
BizException
,
PermissionException
{
throws
BizException
,
PermissionException
{
return
new
ResponseDto
<>(
personalStageProgressMessageBiz
.
getProgressMessageList
());
return
new
ResponseDto
<>(
personalStageProgressMessageBiz
.
getProgressMessageList
(
progressId
));
}
}
@ApiOperation
(
"保存进度消息"
)
@ApiOperation
(
"保存进度消息"
)
...
@@ -289,4 +291,13 @@ public class PersonalStageFacade {
...
@@ -289,4 +291,13 @@ public class PersonalStageFacade {
personalStageJumpBiz
.
endServiceJumpNext
(
endServiceJumpNextDTO
);
personalStageJumpBiz
.
endServiceJumpNext
(
endServiceJumpNextDTO
);
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
}
}
@ApiOperation
(
"获取进度单列表"
)
@GetMapping
(
"getProgressList"
)
public
ResponseDto
<?>
getProgressList
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
)
throws
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
List
<
PersonalStageProgressDTO
>
personalStageProgressDTOS
=
personalStageProgressMessageBiz
.
getProgressList
();
return
new
ResponseDto
<>(
personalStageProgressDTOS
);
}
}
}
pcloud-service-book/src/main/resources/mapper/personalstage/PersonalStageProgressMessage.Mapper.xml
View file @
45acbe71
...
@@ -4,15 +4,21 @@
...
@@ -4,15 +4,21 @@
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.personalstage.entity.PersonalStageProgressMessage"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.personalstage.entity.PersonalStageProgressMessage"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"progress_id"
property=
"progressId"
jdbcType=
"INTEGER"
/>
<result
column=
"content"
property=
"content"
jdbcType=
"VARCHAR"
/>
<result
column=
"content"
property=
"content"
jdbcType=
"VARCHAR"
/>
<result
column=
"minutes"
property=
"minutes"
jdbcType=
"INTEGER"
/>
<result
column=
"minutes"
property=
"minutes"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<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=
"ProgressDTOMap"
type=
"com.pcloud.book.personalstage.dto.PersonalStageProgressDTO"
>
<association
property=
"startText"
column=
"startMessageId"
javaType=
"string"
select=
"getContentById"
/>
<association
property=
"endText"
column=
"endMessageId"
javaType=
"string"
select=
"getContentById"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,
content, minutes, type, create_time, update_tim
e
id,
progress_id,content, minutes, create_time, update_time,typ
e
</sql>
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
...
@@ -26,17 +32,20 @@
...
@@ -26,17 +32,20 @@
SELECT
SELECT
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM personal_stage_progress_message
FROM personal_stage_progress_message
where progress_id=#{progressId}
ORDER BY type
ORDER BY type
</select>
</select>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO personal_stage_progress_message(
INSERT INTO personal_stage_progress_message(
progress_id,
content,
content,
minutes,
minutes,
type,
type,
create_time,
create_time,
update_time
update_time
) VALUES (
) VALUES (
#{progressId, jdbcType=INTEGER},
#{content, jdbcType=VARCHAR},
#{content, jdbcType=VARCHAR},
#{minutes, jdbcType=INTEGER},
#{minutes, jdbcType=INTEGER},
#{type, jdbcType=INTEGER},
#{type, jdbcType=INTEGER},
...
@@ -47,6 +56,7 @@
...
@@ -47,6 +56,7 @@
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO personal_stage_progress_message (
INSERT INTO personal_stage_progress_message (
progress_id,
content,
content,
minutes,
minutes,
type,
type,
...
@@ -55,6 +65,7 @@
...
@@ -55,6 +65,7 @@
) VALUES
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
(
#{item.progressId, jdbcType=INTEGER},
#{item.content, jdbcType=VARCHAR},
#{item.content, jdbcType=VARCHAR},
#{item.minutes, jdbcType=INTEGER},
#{item.minutes, jdbcType=INTEGER},
#{item.type, jdbcType=INTEGER},
#{item.type, jdbcType=INTEGER},
...
@@ -68,6 +79,9 @@
...
@@ -68,6 +79,9 @@
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE personal_stage_progress_message
UPDATE personal_stage_progress_message
<set>
<set>
<if
test=
"progressId != null"
>
progress_id = #{progressId},
</if>
<if
test=
"content != null and content != ''"
>
<if
test=
"content != null and content != ''"
>
content = #{content},
content = #{content},
</if>
</if>
...
@@ -96,26 +110,28 @@
...
@@ -96,26 +110,28 @@
DELETE FROM personal_stage_progress_message
DELETE FROM personal_stage_progress_message
</delete>
</delete>
<select
id=
"getPersonalProgress"
parameterType=
"
date
"
resultType=
"com.pcloud.book.personalstage.entity.PersonalStageProgressMessage"
>
<select
id=
"getPersonalProgress"
parameterType=
"
map
"
resultType=
"com.pcloud.book.personalstage.entity.PersonalStageProgressMessage"
>
select
select
id,
id,
progress_id,
content,
content,
minutes,
minutes,
type
type
from
from
personal_stage_progress_message
personal_stage_progress_message
where
where
TIMESTAMPDIFF(MINUTE,#{startTime}, now())
>
= minutes
type = 1
and
type = 1
and
progress_id = #{progress_id}
order by id asc
order by id asc
</select>
</select>
<select
id=
"getWaitClickProgress"
resultMap=
"BaseResultMap"
>
<select
id=
"getWaitClickProgress"
resultMap=
"BaseResultMap"
parameterType=
"integer"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from
from
personal_stage_progress_message
personal_stage_progress_message
where type = 2
where type = 2
and progress_id = #{progressId}
limit 1
limit 1
</select>
</select>
...
@@ -129,7 +145,53 @@
...
@@ -129,7 +145,53 @@
order by id asc
order by id asc
</select>
</select>
<select
id=
"countProgressMessage"
resultType=
"int"
>
<select
id=
"countProgressMessage"
resultType=
"int"
parameterType=
"long"
>
select count(id) from personal_stage_progress_message
select count(id) from personal_stage_progress_message
where
type = 1
and progress_id = #{progressId}
</select>
<select
id=
"getProgressList"
resultMap=
"ProgressDTOMap"
>
select
p.id progressId,
p.NAME progressName,
min(pm.id) startMessageId,
max(pm.id) endMessageId,
p.special_symbol specialSymbol
from
personal_stage_progress p
left join personal_stage_progress_message pm
on p.id = pm.progress_id
where type = 1
GROUP BY p.id
</select>
<select
id=
"getContentById"
resultType=
"string"
>
select
content
from
personal_stage_progress_message
where
id = #{_parameter}
</select>
</select>
<select
id=
"getNameById"
resultType=
"string"
>
select
name
from
personal_stage_progress
where
id = #{_parameter}
</select>
<delete
id=
"deleteByProgressId"
parameterType=
"integer"
>
delete
from
personal_stage_progress_message
where
progress_id = #{progressId}
</delete>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/personalstage/PersonalStageReply.xml
View file @
45acbe71
...
@@ -11,10 +11,16 @@
...
@@ -11,10 +11,16 @@
<result
property=
"paperId"
column=
"paper_id"
jdbcType=
"BIGINT"
/>
<result
property=
"paperId"
column=
"paper_id"
jdbcType=
"BIGINT"
/>
<result
property=
"paperTitle"
column=
"paper_title"
jdbcType=
"VARCHAR"
/>
<result
property=
"paperTitle"
column=
"paper_title"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"progressId"
column=
"progress_id"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"PersonalStageReplyMap"
extends=
"BaseResultMap"
type=
"com.pcloud.book.personalstage.entity.PersonalStageReply"
>
<association
property=
"progressName"
column=
"progress_id"
javaType=
"string"
select=
"com.pcloud.book.personalstage.dao.impl.PersonalStageProgressMessageDaoImpl.getNameById"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, name, personal_stage_id, relevance_id, relevance_type, paper_id, paper_title, create_time
id, name, personal_stage_id, relevance_id, relevance_type, paper_id, paper_title, create_time
,progress_id
</sql>
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
...
@@ -59,7 +65,8 @@
...
@@ -59,7 +65,8 @@
relevance_type,
relevance_type,
paper_id,
paper_id,
paper_title,
paper_title,
create_time
create_time,
progress_id
) values
) values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
(
...
@@ -69,7 +76,8 @@
...
@@ -69,7 +76,8 @@
#{item.relevanceType,jdbcType=INTEGER},
#{item.relevanceType,jdbcType=INTEGER},
#{item.paperId},
#{item.paperId},
#{item.paperTitle},
#{item.paperTitle},
NOW()
NOW(),
#{item.progressId}
)
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -87,7 +95,7 @@
...
@@ -87,7 +95,7 @@
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"getListByPersonalStageId"
parameterType=
"long"
resultMap=
"
BaseResult
Map"
>
<select
id=
"getListByPersonalStageId"
parameterType=
"long"
resultMap=
"
PersonalStageReply
Map"
>
select
<include
refid=
"Base_Column_List"
/>
select
<include
refid=
"Base_Column_List"
/>
from personal_stage_reply
from personal_stage_reply
where personal_stage_id=#{personalStageId}
where personal_stage_id=#{personalStageId}
...
...
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