Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
ims-ci-test
Commits
b97aaa2d
提交
b97aaa2d
authored
9月 25, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dyna(update)
上级
3913ca39
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
53 行增加
和
0 行删除
+53
-0
GambitDao.java
...c/main/java/com/mmc/csf/release/dao/gambit/GambitDao.java
+2
-0
ForumReviewDO.java
.../java/com/mmc/csf/release/entity/forum/ForumReviewDO.java
+7
-0
GambitServiceImpl.java
...mc/csf/release/service/gambit/impl/GambitServiceImpl.java
+34
-0
GambitDao.xml
...se-service/src/main/resources/mapper/gambit/GambitDao.xml
+10
-0
没有找到文件。
release-service/src/main/java/com/mmc/csf/release/dao/gambit/GambitDao.java
浏览文件 @
b97aaa2d
...
@@ -121,4 +121,6 @@ public interface GambitDao {
...
@@ -121,4 +121,6 @@ public interface GambitDao {
ForumCountDO
userMessage
(
Integer
userAccountId
);
ForumCountDO
userMessage
(
Integer
userAccountId
);
ForumReviewVO
selectForumReviewMessage
(
Integer
dynamicId
);
ForumReviewVO
selectForumReviewMessage
(
Integer
dynamicId
);
int
replyCount
(
ForumReviewDO
forumReviewDO
);
}
}
release-service/src/main/java/com/mmc/csf/release/entity/forum/ForumReviewDO.java
浏览文件 @
b97aaa2d
package
com
.
mmc
.
csf
.
release
.
entity
.
forum
;
package
com
.
mmc
.
csf
.
release
.
entity
.
forum
;
import
com.mmc.csf.user.vo.UserAccountVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -50,6 +51,12 @@ public class ForumReviewDO implements Serializable {
...
@@ -50,6 +51,12 @@ public class ForumReviewDO implements Serializable {
@ApiModelProperty
(
value
=
"status"
,
example
=
"true表示已评论 null 就没有评论"
)
@ApiModelProperty
(
value
=
"status"
,
example
=
"true表示已评论 null 就没有评论"
)
private
Boolean
status
;
private
Boolean
status
;
@ApiModelProperty
(
value
=
"回复数量"
)
private
Integer
replyCount
;
@ApiModelProperty
(
value
=
"用户信息"
)
private
UserAccountVO
userAccountVO
;
}
}
release-service/src/main/java/com/mmc/csf/release/service/gambit/impl/GambitServiceImpl.java
浏览文件 @
b97aaa2d
package
com
.
mmc
.
csf
.
release
.
service
.
gambit
.
impl
;
package
com
.
mmc
.
csf
.
release
.
service
.
gambit
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.release.dao.DynamicDao
;
import
com.mmc.csf.release.dao.DynamicDao
;
...
@@ -11,8 +13,12 @@ import com.mmc.csf.release.gambit.dto.ForumGambitDTO;
...
@@ -11,8 +13,12 @@ import com.mmc.csf.release.gambit.dto.ForumGambitDTO;
import
com.mmc.csf.release.gambit.qo.*
;
import
com.mmc.csf.release.gambit.qo.*
;
import
com.mmc.csf.release.gambit.vo.ForumGambitVO
;
import
com.mmc.csf.release.gambit.vo.ForumGambitVO
;
import
com.mmc.csf.release.service.gambit.GambitService
;
import
com.mmc.csf.release.service.gambit.GambitService
;
import
com.mmc.csf.user.vo.UserAccountVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.*
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -32,6 +38,12 @@ public class GambitServiceImpl implements GambitService {
...
@@ -32,6 +38,12 @@ public class GambitServiceImpl implements GambitService {
@Autowired
@Autowired
private
DynamicDao
dynamicDao
;
private
DynamicDao
dynamicDao
;
@Autowired
private
RestTemplate
restTemplate
;
@Value
(
"${iuav.userapp.url}"
)
private
String
userApp
;
/**
/**
* 添加话题
* 添加话题
* @param forumGambitVO
* @param forumGambitVO
...
@@ -226,6 +238,14 @@ public class GambitServiceImpl implements GambitService {
...
@@ -226,6 +238,14 @@ public class GambitServiceImpl implements GambitService {
allReviewQO
.
buildCurrentPage
();
allReviewQO
.
buildCurrentPage
();
int
count
=
gambitDao
.
allCommentListCount
(
allReviewQO
);
int
count
=
gambitDao
.
allCommentListCount
(
allReviewQO
);
List
<
ForumReviewDO
>
forumReviewDOS
=
gambitDao
.
allCommentList
(
allReviewQO
);
List
<
ForumReviewDO
>
forumReviewDOS
=
gambitDao
.
allCommentList
(
allReviewQO
);
for
(
ForumReviewDO
forumReviewDO
:
forumReviewDOS
)
{
UserAccountVO
info
=
info
(
forumReviewDO
.
getUserAccountId
());
forumReviewDO
.
setUserAccountVO
(
info
);
}
for
(
ForumReviewDO
forumReviewDO
:
forumReviewDOS
)
{
int
counts
=
gambitDao
.
replyCount
(
forumReviewDO
);
forumReviewDO
.
setReplyCount
(
counts
);
}
return
PageResult
.
buildPage
(
pageNo
,
allReviewQO
.
getPageSize
(),
count
,
forumReviewDOS
);
return
PageResult
.
buildPage
(
pageNo
,
allReviewQO
.
getPageSize
(),
count
,
forumReviewDOS
);
}
}
...
@@ -239,5 +259,19 @@ public class GambitServiceImpl implements GambitService {
...
@@ -239,5 +259,19 @@ public class GambitServiceImpl implements GambitService {
}
}
public
UserAccountVO
info
(
Integer
userAccountId
)
{
String
token
=
null
;
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
add
(
"token"
,
token
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
userAccountId
.
toString
(),
headers
);
ResponseEntity
<
String
>
exchange
=
restTemplate
.
exchange
(
userApp
+
"/userapp/user-account/interiorInfo?userAccountId="
+
userAccountId
,
HttpMethod
.
GET
,
entity
,
String
.
class
);
Object
body
=
exchange
.
getBody
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
((
String
)
body
);
JSONObject
result1
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
UserAccountVO
userAccountVO
=
JSON
.
parseObject
(
result1
.
toJSONString
(),
UserAccountVO
.
class
);
return
userAccountVO
;
}
}
}
release-service/src/main/resources/mapper/gambit/GambitDao.xml
浏览文件 @
b97aaa2d
...
@@ -154,6 +154,16 @@
...
@@ -154,6 +154,16 @@
LIMIT 0,1
LIMIT 0,1
</select>
</select>
<select
id=
"replyCount"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.csf.release.entity.forum.ForumReviewDO"
>
SELECT
count(*)
FROM
forum_review fr
WHERE
fr.dynamic_id = #{dynamicId}
AND fr.review_id = #{id}
</select>
<select
id=
"selectResourceList"
resultType=
"com.mmc.csf.release.entity.forum.ForumResourceDO"
>
<select
id=
"selectResourceList"
resultType=
"com.mmc.csf.release.entity.forum.ForumResourceDO"
>
select dynamic_id,resource_url,create_time,update_time,`type` from forum_resource where dynamic_id=#{dynamicId}
select dynamic_id,resource_url,create_time,update_time,`type` from forum_resource where dynamic_id=#{dynamicId}
</select>
</select>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论