Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nrgl
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
nrgl
Commits
f3e7de77
提交
f3e7de77
authored
4月 24, 2019
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
15e5eacf
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
8 行增加
和
19 行删除
+8
-19
ContentController.java
...zrqx/content/bg/controller/content/ContentController.java
+8
-4
ContentMapper.java
...ava/com/zrqx/content/bg/mapper/content/ContentMapper.java
+0
-6
ContentService.java
...a/com/zrqx/content/bg/service/content/ContentService.java
+0
-3
ContentServiceImpl.java
...m/zrqx/content/bg/service/content/ContentServiceImpl.java
+0
-6
没有找到文件。
com.zrqx.content/src/main/java/com/zrqx/content/bg/controller/content/ContentController.java
浏览文件 @
f3e7de77
...
...
@@ -10,6 +10,7 @@ import java.util.List;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.catalina.startup.Catalina
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -102,7 +103,7 @@ public class ContentController {
ContentColumn
column
=
contentColumnService
.
selectByPrimaryKey
(
content
.
getColumnId
());
if
(
column
!=
null
){
column
.
setContentNum
(
column
.
getContentNum
()+
1
);
contentColumnService
.
updateBy
Criteria
(
column
);
contentColumnService
.
updateBy
PrimaryKey
(
column
);
}
if
(!
service
.
insert
(
content
))
{
throw
new
BaseException
(
ResponseCodeEnum
.
FAIL
);
...
...
@@ -230,14 +231,17 @@ public class ContentController {
@PostMapping
(
value
=
ContentRequestPath
.
DELETE_ALL
)
public
CallBack
<
Integer
>
deleteAll
()
{
int
num
=
service
.
count
();
if
(
num
<
1
)
{
if
(
num
==
0
)
{
throw
new
BaseException
(
"回收站也没有余粮了"
);
}
List
<
Integer
>
list
=
service
.
selectAllId
();
if
(
service
.
deleteAll
()
!=
num
)
{
Criteria
cr
=
service
.
createCriteria
();
cr
.
andEqualTo
(
"isDelete"
,
1
);
Boolean
b
=
service
.
deleteByCriteria
();
if
(
b
)
{
throw
new
BaseException
(
ResponseCodeEnum
.
FAIL
);
}
// 删除图组
List
<
Integer
>
list
=
service
.
selectAllId
();
ContentImg
img
=
new
ContentImg
();
for
(
Integer
id
:
list
)
{
img
.
setContentId
(
id
);
...
...
com.zrqx.content/src/main/java/com/zrqx/content/bg/mapper/content/ContentMapper.java
浏览文件 @
f3e7de77
...
...
@@ -23,12 +23,6 @@ import com.zrqx.core.vo.content.content.ContentVo;
@Mapper
public
interface
ContentMapper
extends
BaseMapper
<
Content
>
{
/** 清空回收站 */
@Delete
(
"<script>"
+
"DELETE FROM con_content WHERE isDelete = 1 "
+
"</script>"
)
Integer
deleteAll
();
/** 统计回收站有多少条数据 */
@Select
(
"<script>"
+
"SELECT COUNT(*) FROM con_content WHERE isDelete = 1 "
...
...
com.zrqx.content/src/main/java/com/zrqx/content/bg/service/content/ContentService.java
浏览文件 @
f3e7de77
...
...
@@ -19,9 +19,6 @@ import com.zrqx.core.vo.content.content.ContentVo;
*/
public
interface
ContentService
extends
BaseService
<
Content
,
Integer
>
{
/** 清空回收站 */
Integer
deleteAll
();
/** 统计回收站有多少条数据 */
Integer
count
();
...
...
com.zrqx.content/src/main/java/com/zrqx/content/bg/service/content/ContentServiceImpl.java
浏览文件 @
f3e7de77
...
...
@@ -33,12 +33,6 @@ public class ContentServiceImpl extends BaseServiceImpl<Content, Integer> implem
return
mapper
;
}
/** 清空回收站 */
@Override
public
Integer
deleteAll
()
{
return
mapper
.
deleteAll
();
}
/** 统计回收站有多少条数据 */
@Override
public
Integer
count
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论