Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
training-project
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
training-project
Commits
a1741649
Commit
a1741649
authored
Apr 22, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.21bug优化
parent
b6700978
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TpCommentController.java
+7
-4
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TpCommentMapper.xml
+2
-2
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TrainingProjectMapper.xml
+14
-1
No files found.
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TpCommentController.java
View file @
a1741649
...
@@ -9,6 +9,7 @@ import com.yizhi.core.application.context.ContextHolder;
...
@@ -9,6 +9,7 @@ import com.yizhi.core.application.context.ContextHolder;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.system.application.system.remote.AccountClient
;
import
com.yizhi.system.application.system.remote.AccountClient
;
import
com.yizhi.system.application.vo.AccountVO
;
import
com.yizhi.system.application.vo.AccountVO
;
import
com.yizhi.training.application.constant.ProjectConstant
;
import
com.yizhi.training.application.domain.TpComment
;
import
com.yizhi.training.application.domain.TpComment
;
import
com.yizhi.training.application.domain.TpCommentReply
;
import
com.yizhi.training.application.domain.TpCommentReply
;
import
com.yizhi.training.application.service.ITpCommentReplyService
;
import
com.yizhi.training.application.service.ITpCommentReplyService
;
...
@@ -72,8 +73,9 @@ public class TpCommentController {
...
@@ -72,8 +73,9 @@ public class TpCommentController {
// tpComment.setContent(StringEscapeUtils.escapeJava(tpComment.getContent()));
// tpComment.setContent(StringEscapeUtils.escapeJava(tpComment.getContent()));
TpComment
tp
=
new
TpComment
();
TpComment
tp
=
new
TpComment
();
if
(
Objects
.
equals
(
tpComment
.
getBizType
(),
2
)){
if
(
Objects
.
equals
(
tpComment
.
getBizType
(),
2
)){
tpComment
.
set
AuditStatus
(
"1"
);
tpComment
.
set
State
(
1
);
}
}
tpComment
.
setAuditStatus
(
ProjectConstant
.
COMMENT_AUDIT_STATUS_UP
.
toString
());
BeanUtils
.
copyProperties
(
tpComment
,
tp
);
BeanUtils
.
copyProperties
(
tpComment
,
tp
);
Boolean
f
=
iTpCommentService
.
insert
(
tp
);
Boolean
f
=
iTpCommentService
.
insert
(
tp
);
return
f
;
return
f
;
...
@@ -105,14 +107,15 @@ public class TpCommentController {
...
@@ -105,14 +107,15 @@ public class TpCommentController {
}
}
List
<
Long
>
ids
=
page
.
getRecords
().
stream
().
map
(
PageCommentVo:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
ids
=
page
.
getRecords
().
stream
().
map
(
PageCommentVo:
:
getId
).
collect
(
Collectors
.
toList
());
TpCommentReply
reply
=
new
TpCommentReply
();
TpCommentReply
reply
=
new
TpCommentReply
();
if
(
type
!=
0
)
{
reply
.
setState
(
0
);
}
reply
.
setAuditStatus
(
"0"
);
reply
.
setAuditStatus
(
"0"
);
EntityWrapper
<
TpCommentReply
>
wrapper
=
new
EntityWrapper
<
TpCommentReply
>(
reply
);
EntityWrapper
<
TpCommentReply
>
wrapper
=
new
EntityWrapper
<
TpCommentReply
>(
reply
);
List
<
String
>
list
=
new
ArrayList
<
String
>();
List
<
String
>
list
=
new
ArrayList
<
String
>();
list
.
add
(
"createTime"
);
list
.
add
(
"createTime"
);
wrapper
.
in
(
"tp_comment_id"
,
ids
);
wrapper
.
in
(
"tp_comment_id"
,
ids
);
if
(
type
!=
0
)
{
reply
.
setState
(
0
);
wrapper
.
and
(
"state = {0} or create_by_id = {1}"
,
0
,
ContextHolder
.
get
().
getAccountId
());
}
wrapper
.
orderDesc
(
list
);
wrapper
.
orderDesc
(
list
);
List
<
TpCommentReply
>
replies
=
iTpCommentReplyService
.
selectList
(
wrapper
);
List
<
TpCommentReply
>
replies
=
iTpCommentReplyService
.
selectList
(
wrapper
);
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TpCommentMapper.xml
View file @
a1741649
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
AND c.biz_type=#{bizType}
AND c.biz_type=#{bizType}
</if>
</if>
<if
test=
"type != 0 "
>
<if
test=
"type != 0 "
>
and c.state=0
and (c.state=0 or c.`create_by_id` = #{accountId})
</if>
</if>
GROUP BY
GROUP BY
c.`id`
c.`id`
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
AND c.biz_type=#{bizType}
AND c.biz_type=#{bizType}
</if>
</if>
<if
test=
"type != 0 "
>
<if
test=
"type != 0 "
>
and c.state=0
and (c.state=0 or c.`create_by_id` = #{accountId})
</if>
</if>
GROUP BY
GROUP BY
c.`id`
c.`id`
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TrainingProjectMapper.xml
View file @
a1741649
...
@@ -165,7 +165,20 @@
...
@@ -165,7 +165,20 @@
</if>
</if>
</where>
</where>
GROUP BY tp.id
GROUP BY tp.id,
tp.id,
tp.`logo_img`,
tp.`name`,
tp.`start_time`,
tp.`end_time`,
tp.status,
tp.visible_range,
tp.enable_enroll,
tp.enable_sign,
tp.enable_queue,
enroll.actual_price,
enroll.original_price,
enroll.enable_pay
ORDER BY tp.`create_time` DESC
ORDER BY tp.`create_time` DESC
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment