Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
7dc5a3e6
Commit
7dc5a3e6
authored
Jan 14, 2022
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】案例管理
parent
bbb18f7e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
4 deletions
+50
-4
CasesController.java
.../io/office/modules/manage/controller/CasesController.java
+7
-4
CasesDao.java
src/main/java/io/office/modules/manage/dao/CasesDao.java
+3
-0
CasesService.java
...n/java/io/office/modules/manage/service/CasesService.java
+3
-0
CasesServiceImpl.java
.../office/modules/manage/service/impl/CasesServiceImpl.java
+11
-0
CasesDao.xml
src/main/resources/mapper/manage/CasesDao.xml
+26
-0
No files found.
src/main/java/io/office/modules/manage/controller/CasesController.java
View file @
7dc5a3e6
...
...
@@ -4,8 +4,10 @@ import java.util.Arrays;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -54,10 +56,11 @@ public class CasesController {
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:cases:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
casesService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
public
R
list
(
@RequestBody
NewsParams
params
){
Page
<
CasesEntity
>
page
=
this
.
casesService
.
selectCaseList
(
params
,
new
Page
(
params
.
getPage
(),
params
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
...
...
src/main/java/io/office/modules/manage/dao/CasesDao.java
View file @
7dc5a3e6
...
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.dao;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.CasesEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
...
...
@@ -20,4 +21,6 @@ import java.util.List;
public
interface
CasesDao
extends
BaseMapper
<
CasesEntity
>
{
@Select
(
"select * from Cases where status=#{status} and levels>#{levels} order by id desc"
)
List
<
CasesEntity
>
selectByStatusAndLevels
(
@Param
(
"status"
)
String
status
,
@Param
(
"levels"
)
String
levels
,
Page
page
);
List
<
CasesEntity
>
selectCaseList
(
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/CasesService.java
View file @
7dc5a3e6
...
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.CasesEntity
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -23,5 +25,6 @@ public interface CasesService extends IService<CasesEntity> {
Page
<
CasesEntity
>
getPageList
(
Map
<
String
,
Object
>
params
);
Page
<
CasesEntity
>
selectCaseList
(
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/impl/CasesServiceImpl.java
View file @
7dc5a3e6
...
...
@@ -2,9 +2,13 @@ package io.office.modules.manage.service.impl;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -53,6 +57,13 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
return
casesDao
.
selectPage
(
page
,
queryWrapper
);
}
@Override
public
Page
<
CasesEntity
>
selectCaseList
(
NewsParams
params
,
Page
page
)
{
List
<
CasesEntity
>
list
=
this
.
casesDao
.
selectCaseList
(
params
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
/* public List<CasesEntity> frontList() {
String status="1";//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String levels="0";//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级
...
...
src/main/resources/mapper/manage/CasesDao.xml
0 → 100644
View file @
7dc5a3e6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.office.modules.manage.dao.CasesDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.CasesEntity"
id=
"casesMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"brief"
column=
"brief"
/>
<result
property=
"service"
column=
"service"
/>
<result
property=
"registerdate"
column=
"registerdate"
/>
<result
property=
"updatedate"
column=
"updatedate"
/>
<result
property=
"showtime"
column=
"showtime"
/>
<result
property=
"editor"
column=
"editor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
<result
property=
"levels"
column=
"levels"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"auditor"
column=
"auditor"
/>
<result
property=
"checkdate"
column=
"checkdate"
/>
</resultMap>
<select
id=
"selectCaseList"
resultMap=
"casesMap"
>
</select>
</mapper>
\ No newline at end of file
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