Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
ims-ci-test
Commits
8419a84d
提交
8419a84d
authored
10月 09, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GambitDao.xml(update)
上级
23cb6542
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
32 行增加
和
3 行删除
+32
-3
GambitDao.java
...c/main/java/com/mmc/csf/release/dao/gambit/GambitDao.java
+2
-0
MyAttentionDO.java
.../java/com/mmc/csf/release/entity/forum/MyAttentionDO.java
+3
-0
MyFansDO.java
.../main/java/com/mmc/csf/release/entity/forum/MyFansDO.java
+3
-0
GambitServiceImpl.java
...mc/csf/release/service/gambit/impl/GambitServiceImpl.java
+14
-0
GambitDao.xml
...se-service/src/main/resources/mapper/gambit/GambitDao.xml
+10
-3
没有找到文件。
release-service/src/main/java/com/mmc/csf/release/dao/gambit/GambitDao.java
浏览文件 @
8419a84d
...
...
@@ -128,6 +128,8 @@ public interface GambitDao {
int
selectCountAttentions
(
Integer
userAccountId
,
Integer
userId
);
int
selectCountAttentionMutualAttention
(
Integer
userAccountId
,
Integer
userId
);
int
selectGambitAndDynamic
(
Integer
id
);
Integer
selectStatus
(
Integer
id
,
Integer
userId
);
...
...
release-service/src/main/java/com/mmc/csf/release/entity/forum/MyAttentionDO.java
浏览文件 @
8419a84d
package
com
.
mmc
.
csf
.
release
.
entity
.
forum
;
import
com.mmc.csf.user.vo.UserAccountVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
@@ -31,6 +32,8 @@ public class MyAttentionDO implements Serializable {
@ApiModelProperty
(
value
=
"用户信息"
)
private
ForumCountDO
countDO
;
private
UserAccountVO
userAccountVO
;
...
...
release-service/src/main/java/com/mmc/csf/release/entity/forum/MyFansDO.java
浏览文件 @
8419a84d
package
com
.
mmc
.
csf
.
release
.
entity
.
forum
;
import
com.mmc.csf.user.vo.UserAccountVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
@@ -31,6 +32,8 @@ public class MyFansDO implements Serializable {
@ApiModelProperty
(
value
=
"用户信息"
)
private
ForumCountDO
countDO
;
private
UserAccountVO
userAccountVO
;
...
...
release-service/src/main/java/com/mmc/csf/release/service/gambit/impl/GambitServiceImpl.java
浏览文件 @
8419a84d
...
...
@@ -286,6 +286,11 @@ public class GambitServiceImpl implements GambitService {
userTopicDynamicsQO
.
buildCurrentPage
();
int
count
=
gambitDao
.
myInterestListCount
(
userTopicDynamicsQO
);
List
<
MyAttentionDO
>
myAttentionDOS
=
gambitDao
.
myInterestList
(
userTopicDynamicsQO
);
for
(
MyAttentionDO
myAttentionDO
:
myAttentionDOS
)
{
Integer
userAccountId
=
myAttentionDO
.
getUserAccountId
();
UserAccountVO
info
=
info
(
userAccountId
);
myAttentionDO
.
setUserAccountVO
(
info
);
}
return
PageResult
.
buildPage
(
pageNo
,
userTopicDynamicsQO
.
getPageSize
(),
count
,
myAttentionDOS
);
}
...
...
@@ -295,6 +300,11 @@ public class GambitServiceImpl implements GambitService {
userTopicDynamicsQO
.
buildCurrentPage
();
int
count
=
gambitDao
.
myFansListCount
(
userTopicDynamicsQO
);
List
<
MyFansDO
>
myAttentionDOS
=
gambitDao
.
myFansList
(
userTopicDynamicsQO
);
for
(
MyFansDO
myAttentionDO
:
myAttentionDOS
)
{
Integer
userAccountId
=
myAttentionDO
.
getUserAccountId
();
UserAccountVO
info
=
info
(
userAccountId
);
myAttentionDO
.
setUserAccountVO
(
info
);
}
return
PageResult
.
buildPage
(
pageNo
,
userTopicDynamicsQO
.
getPageSize
(),
count
,
myAttentionDOS
);
}
...
...
@@ -303,12 +313,16 @@ public class GambitServiceImpl implements GambitService {
public
ResultBody
userMessage
(
Integer
userAccountId
,
Integer
userId
)
{
ForumCountDO
forumCountDO
=
gambitDao
.
userMessage
(
userAccountId
);
int
i
=
gambitDao
.
selectCountAttentions
(
userAccountId
,
userId
);
int
i1
=
gambitDao
.
selectCountAttentionMutualAttention
(
userId
,
userAccountId
);
UserAccountMessageVo
userAccountMessageVo
=
infoMessage
(
userAccountId
);
forumCountDO
.
setUserAccountMessageVo
(
userAccountMessageVo
);
// int i = gambitDao.selectCountAttention(userId);
if
(
i
!=
0
){
forumCountDO
.
setStatus
(
true
);
}
if
(
i1
!=
0
){
forumCountDO
.
setStatus
(
true
);
}
return
ResultBody
.
success
(
forumCountDO
);
}
...
...
release-service/src/main/resources/mapper/gambit/GambitDao.xml
浏览文件 @
8419a84d
...
...
@@ -70,7 +70,7 @@
<resultMap
id=
"myInterestListMap"
type=
"com.mmc.csf.release.entity.forum.MyAttentionDO"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userAccountId"
column=
"
attention_
user_account_id"
/>
<result
property=
"userAccountId"
column=
"user_account_id"
/>
<result
property=
"mutualAttention"
column=
"mutual_attention"
/>
<collection
property=
"dynamicCount"
ofType=
"java.lang.Integer"
select=
"selectCountUser"
column=
"{userAccountId=user_account_id}"
>
...
...
@@ -197,6 +197,10 @@
select count(*) from forum_attention where attention_user_account_id=#{userId} and user_account_id=#{userAccountId}
</select>
<select
id=
"selectCountAttentionMutualAttention"
resultType=
"java.lang.Integer"
>
select count(*) from forum_attention where attention_user_account_id=#{userId} and user_account_id=#{userAccountId} and mutual_attention=1
</select>
<select
id=
"selectGambitAndDynamic"
resultType=
"java.lang.Integer"
>
select count(*) from forum_dynamic_gambit where gambit_id=#{id}
</select>
...
...
@@ -652,7 +656,10 @@
</select>
<select
id=
"myInterestList"
resultMap=
"myInterestListMap"
>
select attention_user_account_id,mutual_attention,id from forum_attention where attention_user_account_id=#{userAccountId}
select attention_user_account_id,mutual_attention,id,user_account_id from forum_attention where attention_user_account_id=#{userAccountId}
ORDER BY
create_time DESC
limit #{pageNo}, #{pageSize}
</select>
<select
id=
"myFansListCount"
resultType=
"java.lang.Integer"
>
...
...
@@ -660,7 +667,7 @@
</select>
<select
id=
"myFansList"
resultMap=
"myFansListMap"
>
select user_account_id,mutual_attention,id,attention_user_account_id from forum_attention where
attention_
user_account_id=#{userAccountId}
select user_account_id,mutual_attention,id,attention_user_account_id from forum_attention where user_account_id=#{userAccountId}
ORDER BY
create_time DESC
limit #{pageNo}, #{pageSize}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论