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
7ce1d5eb
Commit
7ce1d5eb
authored
Nov 14, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】首页接口提交
parent
ada5b913
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
475 additions
and
2 deletions
+475
-2
DocController.java
...va/io/office/modules/manage/controller/DocController.java
+109
-0
PolicyController.java
...io/office/modules/manage/controller/PolicyController.java
+24
-2
SearchgtinlogController.java
...ce/modules/manage/controller/SearchgtinlogController.java
+98
-0
DocDao.java
src/main/java/io/office/modules/manage/dao/DocDao.java
+17
-0
SearchgtinlogDao.java
...n/java/io/office/modules/manage/dao/SearchgtinlogDao.java
+17
-0
DocEntity.java
src/main/java/io/office/modules/manage/entity/DocEntity.java
+60
-0
SearchgtinlogEntity.java
.../io/office/modules/manage/entity/SearchgtinlogEntity.java
+50
-0
DocService.java
...ain/java/io/office/modules/manage/service/DocService.java
+20
-0
SearchgtinlogService.java
...o/office/modules/manage/service/SearchgtinlogService.java
+20
-0
DocServiceImpl.java
...io/office/modules/manage/service/impl/DocServiceImpl.java
+30
-0
SearchgtinlogServiceImpl.java
...modules/manage/service/impl/SearchgtinlogServiceImpl.java
+30
-0
No files found.
src/main/java/io/office/modules/manage/controller/DocController.java
0 → 100644
View file @
7ce1d5eb
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.DocEntity
;
import
io.office.modules.manage.vo.request.TopicNewsPartyRequestVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.modules.manage.service.DocService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-14 14:32:42
*/
@Slf4j
@RestController
@RequestMapping
(
"/doc"
)
public
class
DocController
{
@Autowired
private
DocService
docService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:doc:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
docService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:doc:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
DocEntity
doc
=
docService
.
getById
(
id
);
return
R
.
ok
().
put
(
"doc"
,
doc
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:doc:save")
public
R
save
(
@RequestBody
DocEntity
doc
){
docService
.
save
(
doc
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:doc:update")
public
R
update
(
@RequestBody
DocEntity
doc
){
docService
.
updateById
(
doc
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:doc:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
docService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
@Login
@PostMapping
(
"/api/downLoad"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
downLoad
()
{
try
{
QueryWrapper
<
DocEntity
>
docEntityQueryWrapper
=
new
QueryWrapper
<>();
docEntityQueryWrapper
.
select
(
"top 4 *"
);
docEntityQueryWrapper
.
eq
(
"category"
,
"1"
);
docEntityQueryWrapper
.
eq
(
"status"
,
"1"
);
docEntityQueryWrapper
.
orderByDesc
(
"id"
);
return
R
.
ok
().
put
(
"data"
,
docService
.
list
(
docEntityQueryWrapper
));
}
catch
(
Exception
e
)
{
log
.
error
(
"get4PartyTopNews error: {}"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
}
src/main/java/io/office/modules/manage/controller/PolicyController.java
View file @
7ce1d5eb
...
...
@@ -3,17 +3,17 @@ package io.office.modules.manage.controller;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.
manage.entity.NewsEntity
;
import
io.office.modules.
app.annotation.Login
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.entity.dto.PolicyParams
;
import
io.office.modules.manage.service.PolicyService
;
import
io.office.modules.sys.controller.AbstractController
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -115,4 +115,26 @@ public class PolicyController extends AbstractController {
}
}
@Login
@PostMapping
(
"/api/getTop4"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
getTop4
()
{
try
{
QueryWrapper
<
PolicyEntity
>
policyEntityQueryWrapper
=
new
QueryWrapper
<>();
policyEntityQueryWrapper
.
select
(
"top 4 *"
);
policyEntityQueryWrapper
.
eq
(
"class"
,
"法律法规"
);
policyEntityQueryWrapper
.
gt
(
"levels"
,
"0"
);
policyEntityQueryWrapper
.
gt
(
"status "
,
"0"
);
policyEntityQueryWrapper
.
orderByDesc
(
"id"
);
policyEntityQueryWrapper
.
orderByDesc
(
"releasedate "
);
return
R
.
ok
().
put
(
"data"
,
policyService
.
list
(
policyEntityQueryWrapper
));
}
catch
(
Exception
e
)
{
log
.
error
(
"get4PartyTopNews error: {}"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
}
src/main/java/io/office/modules/manage/controller/SearchgtinlogController.java
0 → 100644
View file @
7ce1d5eb
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.office.common.utils.IPUtils
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.modules.manage.entity.SearchgtinlogEntity
;
import
io.office.modules.manage.service.SearchgtinlogService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
javax.servlet.http.HttpServletRequest
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-14 15:05:03
*/
@RestController
@RequestMapping
(
"/searchgtinlog/api"
)
public
class
SearchgtinlogController
{
@Autowired
private
SearchgtinlogService
searchgtinlogService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:searchgtinlog:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
searchgtinlogService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:searchgtinlog:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
SearchgtinlogEntity
searchgtinlog
=
searchgtinlogService
.
getById
(
id
);
return
R
.
ok
().
put
(
"searchgtinlog"
,
searchgtinlog
);
}
/**
* 保存
*/
@Login
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:searchgtinlog:save")
public
R
save
(
@RequestBody
SearchgtinlogEntity
searchgtinlog
,
HttpServletRequest
request
){
String
ipAddr
=
IPUtils
.
getIpAddr
(
request
);
searchgtinlog
.
setIp
(
ipAddr
);
searchgtinlog
.
setCreatedate
(
new
Date
());
searchgtinlogService
.
save
(
searchgtinlog
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:searchgtinlog:update")
public
R
update
(
@RequestBody
SearchgtinlogEntity
searchgtinlog
){
searchgtinlogService
.
updateById
(
searchgtinlog
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:searchgtinlog:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
searchgtinlogService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/dao/DocDao.java
0 → 100644
View file @
7ce1d5eb
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.DocEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-14 14:32:42
*/
@Mapper
public
interface
DocDao
extends
BaseMapper
<
DocEntity
>
{
}
src/main/java/io/office/modules/manage/dao/SearchgtinlogDao.java
0 → 100644
View file @
7ce1d5eb
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.SearchgtinlogEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-14 15:05:03
*/
@Mapper
public
interface
SearchgtinlogDao
extends
BaseMapper
<
SearchgtinlogEntity
>
{
}
src/main/java/io/office/modules/manage/entity/DocEntity.java
0 → 100644
View file @
7ce1d5eb
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-11-14 14:32:42
*/
@Data
@TableName
(
"doc"
)
public
class
DocEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
title
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
Integer
category
;
/**
* $column.comments
*/
private
String
docfile
;
/**
* $column.comments
*/
private
String
stand
;
/**
* 0等待审核;1审核成功;2审核失败
*/
private
Integer
status
;
/**
* $column.comments
*/
private
String
auditor
;
}
src/main/java/io/office/modules/manage/entity/SearchgtinlogEntity.java
0 → 100644
View file @
7ce1d5eb
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 wudi
* @email
* @date 2021-11-14 15:05:03
*/
@Data
@TableName
(
"SearchGTINLog"
)
public
class
SearchgtinlogEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
keyword
;
/**
* $column.comments
*/
@TableField
(
"class"
)
private
String
classStr
;
/**
* $column.comments
*/
private
String
ip
;
/**
* $column.comments
*/
private
Date
createdate
;
/**
* $column.comments
*/
private
Integer
searchsource
;
}
src/main/java/io/office/modules/manage/service/DocService.java
0 → 100644
View file @
7ce1d5eb
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.DocEntity
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-14 14:32:42
*/
public
interface
DocService
extends
IService
<
DocEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/SearchgtinlogService.java
0 → 100644
View file @
7ce1d5eb
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.SearchgtinlogEntity
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-14 15:05:03
*/
public
interface
SearchgtinlogService
extends
IService
<
SearchgtinlogEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/DocServiceImpl.java
0 → 100644
View file @
7ce1d5eb
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
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
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.DocDao
;
import
io.office.modules.manage.entity.DocEntity
;
import
io.office.modules.manage.service.DocService
;
@Service
(
"docService"
)
public
class
DocServiceImpl
extends
ServiceImpl
<
DocDao
,
DocEntity
>
implements
DocService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
DocEntity
>
page
=
this
.
page
(
new
Query
<
DocEntity
>().
getPage
(
params
),
new
QueryWrapper
<
DocEntity
>()
);
return
new
PageUtils
(
page
);
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/SearchgtinlogServiceImpl.java
0 → 100644
View file @
7ce1d5eb
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
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
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.SearchgtinlogDao
;
import
io.office.modules.manage.entity.SearchgtinlogEntity
;
import
io.office.modules.manage.service.SearchgtinlogService
;
@Service
(
"searchgtinlogService"
)
public
class
SearchgtinlogServiceImpl
extends
ServiceImpl
<
SearchgtinlogDao
,
SearchgtinlogEntity
>
implements
SearchgtinlogService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
SearchgtinlogEntity
>
page
=
this
.
page
(
new
Query
<
SearchgtinlogEntity
>().
getPage
(
params
),
new
QueryWrapper
<
SearchgtinlogEntity
>()
);
return
new
PageUtils
(
page
);
}
}
\ 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