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
dd6491f9
Commit
dd6491f9
authored
Nov 04, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】政策法规管理
parent
1e8c9bec
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
294 additions
and
0 deletions
+294
-0
PolicyController.java
...io/office/modules/manage/controller/PolicyController.java
+90
-0
PolicyDao.java
src/main/java/io/office/modules/manage/dao/PolicyDao.java
+17
-0
PolicyEntity.java
...in/java/io/office/modules/manage/entity/PolicyEntity.java
+106
-0
PolicyService.java
.../java/io/office/modules/manage/service/PolicyService.java
+20
-0
PolicyServiceImpl.java
...office/modules/manage/service/impl/PolicyServiceImpl.java
+29
-0
PolicyDao.xml
src/main/resources/mapper/manage/PolicyDao.xml
+32
-0
No files found.
src/main/java/io/office/modules/manage/controller/PolicyController.java
0 → 100644
View file @
dd6491f9
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.service.PolicyService
;
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
;
/**
* ${comments}
*
* @author chenshun
* @email sunlightcs@gmail.com
* @date 2021-11-04 22:13:54
*/
@RestController
@RequestMapping
(
"generator/policy"
)
public
class
PolicyController
{
@Autowired
private
PolicyService
policyService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"generator:policy:list"
)
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
policyService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"generator:policy:info"
)
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
PolicyEntity
policy
=
policyService
.
getById
(
id
);
return
R
.
ok
().
put
(
"policy"
,
policy
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"generator:policy:save"
)
public
R
save
(
@RequestBody
PolicyEntity
policy
){
policyService
.
save
(
policy
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"generator:policy:update"
)
public
R
update
(
@RequestBody
PolicyEntity
policy
){
policyService
.
updateById
(
policy
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
@RequiresPermissions
(
"generator:policy:delete"
)
public
R
delete
(
@RequestBody
Integer
[]
ids
){
policyService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/dao/PolicyDao.java
0 → 100644
View file @
dd6491f9
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* ${comments}
*
* @author chenshun
* @email sunlightcs@gmail.com
* @date 2021-11-04 22:13:54
*/
@Mapper
public
interface
PolicyDao
extends
BaseMapper
<
PolicyEntity
>
{
}
src/main/java/io/office/modules/manage/entity/PolicyEntity.java
0 → 100644
View file @
dd6491f9
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
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 chenshun
* @email sunlightcs@gmail.com
* @date 2021-11-04 22:13:54
*/
@Data
@TableName
(
"Policy"
)
public
class
PolicyEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
@TableField
(
"class"
)
private
String
class1
;
/**
* $column.comments
*/
private
String
title
;
/**
* $column.comments
*/
private
String
titleOld
;
/**
* $column.comments
*/
private
String
keyword
;
/**
* $column.comments
*/
private
String
brief
;
/**
* $column.comments
*/
private
Date
releasedate
;
/**
* $column.comments
*/
private
Date
updatedate
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
private
String
source
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
String
directpath
;
/**
* $column.comments
*/
private
String
content
;
/**
* $column.comments
*/
private
Integer
hits
;
/**
* $column.comments
*/
private
String
editor
;
/**
* $column.comments
*/
private
String
lasteditor
;
/**
* $column.comments
*/
private
String
publicdate
;
/**
* $column.comments
*/
private
String
startdate
;
/**
* $column.comments
*/
private
String
status
;
/**
* $column.comments
*/
private
String
auditor
;
}
src/main/java/io/office/modules/manage/service/PolicyService.java
0 → 100644
View file @
dd6491f9
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.PolicyEntity
;
import
java.util.Map
;
/**
* ${comments}
*
* @author chenshun
* @email sunlightcs@gmail.com
* @date 2021-11-04 22:13:54
*/
public
interface
PolicyService
extends
IService
<
PolicyEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/PolicyServiceImpl.java
0 → 100644
View file @
dd6491f9
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.PolicyDao
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.service.PolicyService
;
import
org.springframework.stereotype.Service
;
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
;
@Service
(
"policyService"
)
public
class
PolicyServiceImpl
extends
ServiceImpl
<
PolicyDao
,
PolicyEntity
>
implements
PolicyService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
PolicyEntity
>
page
=
this
.
page
(
new
Query
<
PolicyEntity
>().
getPage
(
params
),
new
QueryWrapper
<
PolicyEntity
>()
);
return
new
PageUtils
(
page
);
}
}
\ No newline at end of file
src/main/resources/mapper/manage/PolicyDao.xml
0 → 100644
View file @
dd6491f9
<?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.PolicyDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.PolicyEntity"
id=
"policyMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"class"
column=
"class"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"titleOld"
column=
"title_old"
/>
<result
property=
"keyword"
column=
"keyword"
/>
<result
property=
"brief"
column=
"brief"
/>
<result
property=
"releasedate"
column=
"releasedate"
/>
<result
property=
"updatedate"
column=
"updatedate"
/>
<result
property=
"author"
column=
"author"
/>
<result
property=
"source"
column=
"source"
/>
<result
property=
"levels"
column=
"levels"
/>
<result
property=
"directpath"
column=
"directpath"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"hits"
column=
"hits"
/>
<result
property=
"editor"
column=
"editor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
<result
property=
"publicdate"
column=
"publicdate"
/>
<result
property=
"startdate"
column=
"startdate"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"auditor"
column=
"auditor"
/>
</resultMap>
</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