Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xylt
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
xylt
Commits
16003be1
提交
16003be1
authored
2月 22, 2019
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
ef83f3f8
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
65 行增加
和
15 行删除
+65
-15
TalkController.java
...main/java/com/zrqx/talk/bg/controller/TalkController.java
+7
-2
ReplyMapper.java
...lk/src/main/java/com/zrqx/talk/bg/mapper/ReplyMapper.java
+25
-1
TalkMapper.java
...alk/src/main/java/com/zrqx/talk/bg/mapper/TalkMapper.java
+33
-12
没有找到文件。
com.zrqx.talk/src/main/java/com/zrqx/talk/bg/controller/TalkController.java
浏览文件 @
16003be1
...
@@ -23,6 +23,7 @@ import tk.mybatis.mapper.entity.Example.Criteria;
...
@@ -23,6 +23,7 @@ import tk.mybatis.mapper.entity.Example.Criteria;
import
com.zrqx.core.constant.talk.TalkRequestPath
;
import
com.zrqx.core.constant.talk.TalkRequestPath
;
import
com.zrqx.core.enums.ResponseCodeEnum
;
import
com.zrqx.core.enums.ResponseCodeEnum
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.exception.BaseException
;
import
com.zrqx.core.form.member.bg.member.QueryMemberForm
;
import
com.zrqx.core.form.talk.bg.AddHotForm
;
import
com.zrqx.core.form.talk.bg.AddHotForm
;
import
com.zrqx.core.form.talk.bg.QueryTalkForm
;
import
com.zrqx.core.form.talk.bg.QueryTalkForm
;
import
com.zrqx.core.form.talk.bg.SortTalkForm
;
import
com.zrqx.core.form.talk.bg.SortTalkForm
;
...
@@ -34,6 +35,7 @@ import com.zrqx.core.model.talk.Talk;
...
@@ -34,6 +35,7 @@ import com.zrqx.core.model.talk.Talk;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.vo.talk.StatisticVO
;
import
com.zrqx.core.vo.talk.TalkListVO
;
import
com.zrqx.core.vo.talk.TalkListVO
;
import
com.zrqx.talk.bg.service.ImgsService
;
import
com.zrqx.talk.bg.service.ImgsService
;
import
com.zrqx.talk.bg.service.ReplyService
;
import
com.zrqx.talk.bg.service.ReplyService
;
...
@@ -61,7 +63,6 @@ public class TalkController {
...
@@ -61,7 +63,6 @@ public class TalkController {
if
(
null
!=
pageParam
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
if
(
null
!=
pageParam
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
pageParam
.
setOrderBy
(
"sortNum desc, publishDate desc"
);
pageParam
.
setOrderBy
(
"sortNum desc, publishDate desc"
);
}
}
entity
.
setEndTime
(
entity
.
getEndTime
()+
" 23:59:59"
);
return
CallBack
.
success
(
talkService
.
queryTalkList
(
entity
,
pageParam
));
return
CallBack
.
success
(
talkService
.
queryTalkList
(
entity
,
pageParam
));
}
}
...
@@ -141,7 +142,11 @@ public class TalkController {
...
@@ -141,7 +142,11 @@ public class TalkController {
return
CallBack
.
success
();
return
CallBack
.
success
();
}
}
@ApiOperation
(
value
=
"统计信息"
,
notes
=
"统计信息"
)
@GetMapping
(
value
=
TalkRequestPath
.
STATISTICS
)
public
CallBack
<
StatisticVO
>
selectstatistics
(
QueryMemberForm
form
)
{
return
CallBack
.
success
(
talkService
.
selectstatistics
(
form
));
}
/*@ApiOperation(value = "根据作者id查询提问、回答、获赞、采纳", notes = "根据作者id查询提问、回答、获赞、采纳")
/*@ApiOperation(value = "根据作者id查询提问、回答、获赞、采纳", notes = "根据作者id查询提问、回答、获赞、采纳")
@PostMapping(value = TalkRequestPath.STATISTICNUM)
@PostMapping(value = TalkRequestPath.STATISTICNUM)
...
...
com.zrqx.talk/src/main/java/com/zrqx/talk/bg/mapper/ReplyMapper.java
浏览文件 @
16003be1
package
com
.
zrqx
.
talk
.
bg
.
mapper
;
package
com
.
zrqx
.
talk
.
bg
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.form.member.bg.member.QueryMemberForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.talk.Reply
;
import
com.zrqx.core.model.talk.Reply
;
public
interface
ReplyMapper
extends
BaseMapper
<
Reply
>
{
public
interface
ReplyMapper
extends
BaseMapper
<
Reply
>
{
/**
* 获取回复数
* @param m
* @return
* @author xjg
* @date 2019年1月24日 下午1:51:43
*/
@Select
(
"<script>"
+
" SELECT COUNT(*) from reply WHERE replyerId = #{form.id} "
+
"<if test = '"
+
NOTBLANK
+
"(form.statisticsBeginTime)' >"
+
"<![CDATA["
+
" and createDate >= #{form.statisticsBeginTime} "
+
"]]>"
+
"</if>"
+
"<if test = '"
+
NOTBLANK
+
"(form.statisticsEndTime)' >"
+
"<![CDATA["
+
" and createDate <= #{form.statisticsEndTime} "
+
"]]>"
+
"</if>"
+
"</script>"
)
Integer
selectReplyNum
(
@Param
(
"form"
)
QueryMemberForm
form
);
}
}
com.zrqx.talk/src/main/java/com/zrqx/talk/bg/mapper/TalkMapper.java
浏览文件 @
16003be1
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.form.member.bg.member.QueryMemberForm
;
import
com.zrqx.core.form.talk.bg.QueryTalkForm
;
import
com.zrqx.core.form.talk.bg.QueryTalkForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.talk.Talk
;
import
com.zrqx.core.model.talk.Talk
;
...
@@ -12,25 +13,25 @@ import com.zrqx.core.vo.talk.TalkListVO;
...
@@ -12,25 +13,25 @@ import com.zrqx.core.vo.talk.TalkListVO;
public
interface
TalkMapper
extends
BaseMapper
<
Talk
>
{
public
interface
TalkMapper
extends
BaseMapper
<
Talk
>
{
@Select
(
"<script>select * from talk where
talkType=#{talkType
} "
@Select
(
"<script>select * from talk where
plateId=#{form.plateId
} "
+
"<if test = '"
+
NOTBLANK
+
"(keyword)' >"
+
"<if test = '"
+
NOTBLANK
+
"(
form.
keyword)' >"
+
"<if test = 'type==1' >"
+
"<if test = '
form.
type==1' >"
+
"and theme like concat(#{keyword},'%') "
+
"and theme like concat(#{
form.
keyword},'%') "
+
"</if>"
+
"</if>"
+
"<if test = 'type==2' >"
+
"<if test = '
form.
type==2' >"
+
"and authorName like concat(#{keyword},'%') "
+
"and authorName like concat(#{
form.
keyword},'%') "
+
"</if>"
+
"</if>"
+
"</if>"
+
"</if>"
+
"<if test = '
status !=null' >"
+
"and status = #{
status} "
+
"<if test = '
form.status !=null' >"
+
"and status = #{form.
status} "
+
"</if>"
+
"<if test = '"
+
NOTBLANK
+
"(startTime)' >"
+
"</if>"
+
"<if test = '"
+
NOTBLANK
+
"(
form.
startTime)' >"
+
"<![CDATA["
+
"and publishDate >= #{startTime} "
+
"<![CDATA["
+
"and publishDate >= #{
form.
startTime} "
+
"]]>"
+
"]]>"
+
"</if>"
+
"</if>"
+
"<if test = '"
+
"<if test = '"
+
NOTBLANK
+
NOTBLANK
+
"(
endTime)' >"
+
"<![CDATA["
+
"and publishDate <= #{
endTime} "
+
"]]>"
+
"</if>"
+
"(
form.endTime)' >"
+
"<![CDATA["
+
"and publishDate <= #{form.
endTime} "
+
"]]>"
+
"</if>"
+
"</script>"
)
+
"</script>"
)
List
<
TalkListVO
>
queryTalkList
(
QueryTalkForm
queryTalkF
orm
);
List
<
TalkListVO
>
queryTalkList
(
@Param
(
"form"
)
QueryTalkForm
f
orm
);
@Select
(
"<script>"
@Select
(
"<script>"
+
"delete t,r from talk t left join reply r on t.id =r.talkId where t.id in"
+
"delete t,r from talk t left join reply r on t.id =r.talkId where t.id in"
...
@@ -40,6 +41,26 @@ public interface TalkMapper extends BaseMapper<Talk> {
...
@@ -40,6 +41,26 @@ public interface TalkMapper extends BaseMapper<Talk> {
+
"</script>"
)
+
"</script>"
)
Integer
deleteByIds
(
@Param
(
"array"
)
Integer
[]
ids
);
Integer
deleteByIds
(
@Param
(
"array"
)
Integer
[]
ids
);
/**
* 获取发布数
* @param memberId
* @return
* @author xjg
* @date 2019年1月21日 下午7:05:38
*/
@Select
(
"<script>"
+
" SELECT COUNT(id) FROM talk WHERE talkType = 0 and authorId = #{form.id} "
+
"<if test = '"
+
NOTBLANK
+
"(form.statisticsBeginTime)' >"
+
"<![CDATA["
+
" and publishDate >= #{form.statisticsBeginTime} "
+
"]]>"
+
"</if>"
+
"<if test = '"
+
NOTBLANK
+
"(form.statisticsEndTime)' >"
+
"<![CDATA["
+
" and publishDate <= #{form.statisticsEndTime} "
+
"]]>"
+
"</if>"
+
"</script>"
)
Integer
selectPublishNum
(
@Param
(
"form"
)
QueryMemberForm
form
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论