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
be93c5c5
Commit
be93c5c5
authored
Dec 09, 2021
by
唐功亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】 案例介绍列表查询
parent
e4ea037f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
270 additions
and
1 deletions
+270
-1
CasesController.java
.../io/office/modules/manage/controller/CasesController.java
+106
-0
CasesDao.java
src/main/java/io/office/modules/manage/dao/CasesDao.java
+21
-0
CasesEntity.java
...ain/java/io/office/modules/manage/entity/CasesEntity.java
+76
-0
CasesService.java
...n/java/io/office/modules/manage/service/CasesService.java
+24
-0
CasesServiceImpl.java
.../office/modules/manage/service/impl/CasesServiceImpl.java
+42
-0
MemberServiceImpl.java
...office/modules/manage/service/impl/MemberServiceImpl.java
+1
-1
No files found.
src/main/java/io/office/modules/manage/controller/CasesController.java
0 → 100644
View file @
be93c5c5
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.CasesEntity
;
import
io.office.modules.manage.service.CasesService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* 案例介绍
*
* @author tgl
* @email
* @date 2021-12-09 10:33:11
*/
@RestController
@RequestMapping
(
"/cases"
)
public
class
CasesController
{
@Autowired
private
CasesService
casesService
;
/**
* 前台查询列表
*/
@RequestMapping
(
"/api/frontList"
)
@Login
// @RequiresPermissions("manage:partners:list")
public
R
frontList
(){
List
<
CasesEntity
>
casesList
=
this
.
casesService
.
frontList
();
return
R
.
ok
().
put
(
"casesList"
,
casesList
);
}
/**
* 列表
*/
@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
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:cases:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
CasesEntity
cases
=
casesService
.
getById
(
id
);
return
R
.
ok
().
put
(
"cases"
,
cases
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:cases:save")
public
R
save
(
@RequestBody
CasesEntity
cases
){
casesService
.
save
(
cases
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:cases:update")
public
R
update
(
@RequestBody
CasesEntity
cases
){
casesService
.
updateById
(
cases
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:cases:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
casesService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/dao/CasesDao.java
0 → 100644
View file @
be93c5c5
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.CasesEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-09 10:33:11
*/
@Mapper
public
interface
CasesDao
extends
BaseMapper
<
CasesEntity
>
{
@Select
(
"select * from Cases where status=#{status} and levels>#{levels} order by id desc"
)
List
<
CasesEntity
>
selectByStatusAndLevels
(
String
status
,
String
levels
);
}
src/main/java/io/office/modules/manage/entity/CasesEntity.java
0 → 100644
View file @
be93c5c5
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-09 10:33:11
*/
@Data
@TableName
(
"Cases"
)
public
class
CasesEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
title
;
/**
* $column.comments
*/
private
String
brief
;
/**
* $column.comments
*/
private
String
service
;
/**
* $column.comments
*/
private
Date
registerdate
;
/**
* $column.comments
*/
private
Date
updatedate
;
/**
* $column.comments
*/
private
String
showtime
;
/**
* $column.comments
*/
private
String
editor
;
/**
* $column.comments
*/
private
String
lasteditor
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
Integer
status
;
/**
* $column.comments
*/
private
String
auditor
;
/**
* $column.comments
*/
private
Date
checkdate
;
}
src/main/java/io/office/modules/manage/service/CasesService.java
0 → 100644
View file @
be93c5c5
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.CasesEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-09 10:33:11
*/
public
interface
CasesService
extends
IService
<
CasesEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
List
<
CasesEntity
>
frontList
();
}
src/main/java/io/office/modules/manage/service/impl/CasesServiceImpl.java
0 → 100644
View file @
be93c5c5
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
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
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.CasesDao
;
import
io.office.modules.manage.entity.CasesEntity
;
import
io.office.modules.manage.service.CasesService
;
@Service
(
"casesService"
)
public
class
CasesServiceImpl
extends
ServiceImpl
<
CasesDao
,
CasesEntity
>
implements
CasesService
{
@Autowired
private
CasesDao
casesDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
CasesEntity
>
page
=
this
.
page
(
new
Query
<
CasesEntity
>().
getPage
(
params
),
new
QueryWrapper
<
CasesEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
List
<
CasesEntity
>
frontList
()
{
String
status
=
"1"
;
//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String
levels
=
"0"
;
//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级
return
casesDao
.
selectByStatusAndLevels
(
status
,
levels
);
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/MemberServiceImpl.java
View file @
be93c5c5
...
@@ -55,7 +55,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
...
@@ -55,7 +55,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
String
passWord_repeat
=
params
.
get
(
"passWord_repeat"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"passWord_repeat"
));
//重复密码
String
passWord_repeat
=
params
.
get
(
"passWord_repeat"
)
==
null
?
""
:
String
.
valueOf
(
params
.
get
(
"passWord_repeat"
));
//重复密码
//判断用户名合法性
//判断用户名合法性
if
(!
checkUserName
(
userName
)){
if
(!
checkUserName
(
userName
)){
throw
new
RRException
(
"用户名
只能是数字加字母
,长度2-8位"
);
throw
new
RRException
(
"用户名
不能是纯数字
,长度2-8位"
);
}
}
//判断密码合法性
//判断密码合法性
if
(!
checkPassWord
(
passWord
)){
if
(!
checkPassWord
(
passWord
)){
...
...
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