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
df6cf3e4
Commit
df6cf3e4
authored
Jan 17, 2025
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑字段 最后编辑字段 修改提交
parent
d244b3ef
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
15 deletions
+38
-15
HomePopupController.java
...office/modules/manage/controller/HomePopupController.java
+17
-12
KnowledgeinfoController.java
...ce/modules/manage/controller/KnowledgeinfoController.java
+5
-2
KnowledgeinfoEntity.java
.../io/office/modules/manage/entity/KnowledgeinfoEntity.java
+8
-1
HomePopupForm.java
...ain/java/io/office/modules/manage/form/HomePopupForm.java
+3
-0
HomePopupServiceImpl.java
...ice/modules/manage/service/impl/HomePopupServiceImpl.java
+1
-0
KnowledgeinfoServiceImpl.java
...modules/manage/service/impl/KnowledgeinfoServiceImpl.java
+1
-0
KnowledgeinfoDao.xml
src/main/resources/mapper/manage/KnowledgeinfoDao.xml
+3
-0
No files found.
src/main/java/io/office/modules/manage/controller/HomePopupController.java
View file @
df6cf3e4
...
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
...
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
import
cn.afterturn.easypoi.excel.entity.ImportParams
;
import
cn.afterturn.easypoi.excel.entity.ImportParams
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
io.office.common.annotation.SysLog
;
import
io.office.common.annotation.SysLog
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
...
@@ -20,6 +21,7 @@ import io.office.modules.manage.service.HomePopupService;
...
@@ -20,6 +21,7 @@ import io.office.modules.manage.service.HomePopupService;
import
io.office.modules.manage.service.TokenCountService
;
import
io.office.modules.manage.service.TokenCountService
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.controller.AbstractController
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -32,7 +34,6 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -32,7 +34,6 @@ import org.springframework.web.bind.annotation.RestController;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -52,6 +53,10 @@ public class HomePopupController extends AbstractController {
...
@@ -52,6 +53,10 @@ public class HomePopupController extends AbstractController {
private
HomePopupService
homePopupService
;
private
HomePopupService
homePopupService
;
@Autowired
@Autowired
private
WebsiteHitCountDetailDao
websiteHitCountDetailDao
;
private
WebsiteHitCountDetailDao
websiteHitCountDetailDao
;
@Autowired
private
TokenCountService
tokenCountService
;
@Value
(
"${token.count}"
)
private
int
tokenCountConfig
;
/**
/**
* 列表
* 列表
...
@@ -64,7 +69,6 @@ public class HomePopupController extends AbstractController {
...
@@ -64,7 +69,6 @@ public class HomePopupController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
page
);
return
R
.
ok
().
put
(
"data"
,
page
);
}
}
/**
/**
* 信息
* 信息
*/
*/
...
@@ -115,11 +119,19 @@ public class HomePopupController extends AbstractController {
...
@@ -115,11 +119,19 @@ public class HomePopupController extends AbstractController {
@RequestMapping
(
"/delete"
)
@RequestMapping
(
"/delete"
)
//@RequiresPermissions("manage:homepopup:delete")
//@RequiresPermissions("manage:homepopup:delete")
public
R
delete
(
@RequestBody
String
[]
ids
)
{
public
R
delete
(
@RequestBody
String
[]
ids
)
{
homePopupService
.
removeByIds
(
Arrays
.
asList
(
ids
));
if
(
ArrayUtils
.
isNotEmpty
(
ids
))
{
for
(
String
id
:
ids
)
{
UpdateWrapper
<
HomePopupEntity
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
set
(
"levels"
,
0
);
updateWrapper
.
eq
(
"id"
,
id
);
homePopupService
.
update
(
updateWrapper
);
}
}
else
{
return
R
.
error
(
"请选择要删除的数据!"
);
}
return
R
.
ok
();
return
R
.
ok
();
}
}
@SysLog
(
"审核首页弹窗表"
)
@SysLog
(
"审核首页弹窗表"
)
@Transactional
@Transactional
@RequestMapping
(
"/verify"
)
@RequestMapping
(
"/verify"
)
...
@@ -131,14 +143,8 @@ public class HomePopupController extends AbstractController {
...
@@ -131,14 +143,8 @@ public class HomePopupController extends AbstractController {
}
}
@Autowired
private
TokenCountService
tokenCountService
;
@Value
(
"${token.count}"
)
private
int
tokenCountConfig
;
@RequestMapping
(
"/api/getHomePopup/{id}/{token}"
)
@RequestMapping
(
"/api/getHomePopup/{id}/{token}"
)
public
R
getHomePopup
(
@PathVariable
(
"id"
)
Long
id
,
@PathVariable
(
"token"
)
String
token
)
{
public
R
getHomePopup
(
@PathVariable
(
"id"
)
Long
id
,
@PathVariable
(
"token"
)
String
token
)
{
if
(
StringUtils
.
isNotBlank
(
token
))
{
if
(
StringUtils
.
isNotBlank
(
token
))
{
...
@@ -212,5 +218,4 @@ public class HomePopupController extends AbstractController {
...
@@ -212,5 +218,4 @@ public class HomePopupController extends AbstractController {
}
}
}
}
src/main/java/io/office/modules/manage/controller/KnowledgeinfoController.java
View file @
df6cf3e4
...
@@ -72,6 +72,7 @@ public class KnowledgeinfoController extends AbstractController {
...
@@ -72,6 +72,7 @@ public class KnowledgeinfoController extends AbstractController {
knowledgeinfo
.
setInputdate
(
new
Date
());
knowledgeinfo
.
setInputdate
(
new
Date
());
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
knowledgeinfo
.
setStatus
(
0
);
knowledgeinfo
.
setStatus
(
0
);
knowledgeinfo
.
setLasteditor
(
getUser
().
getUsername
());
knowledgeinfoService
.
save
(
knowledgeinfo
);
knowledgeinfoService
.
save
(
knowledgeinfo
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
@@ -84,7 +85,8 @@ public class KnowledgeinfoController extends AbstractController {
...
@@ -84,7 +85,8 @@ public class KnowledgeinfoController extends AbstractController {
@RequestMapping
(
"/update"
)
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"manage:knowledgeinfo:update"
)
@RequiresPermissions
(
"manage:knowledgeinfo:update"
)
public
R
update
(
@RequestBody
KnowledgeinfoEntity
knowledgeinfo
){
public
R
update
(
@RequestBody
KnowledgeinfoEntity
knowledgeinfo
){
knowledgeinfo
.
setEditor
(
getUser
().
getUsername
());
// knowledgeinfo.setEditor(getUser().getUsername());
knowledgeinfo
.
setLasteditor
(
getUser
().
getUsername
());
knowledgeinfoService
.
updateById
(
knowledgeinfo
);
knowledgeinfoService
.
updateById
(
knowledgeinfo
);
return
R
.
ok
(
"修改成功!"
);
return
R
.
ok
(
"修改成功!"
);
}
}
...
@@ -108,7 +110,7 @@ public class KnowledgeinfoController extends AbstractController {
...
@@ -108,7 +110,7 @@ public class KnowledgeinfoController extends AbstractController {
}
}
KnowledgeinfoEntity
knowledgeinfo
=
new
KnowledgeinfoEntity
();
KnowledgeinfoEntity
knowledgeinfo
=
new
KnowledgeinfoEntity
();
knowledgeinfo
.
set
E
ditor
(
getUser
().
getUsername
());
knowledgeinfo
.
set
Laste
ditor
(
getUser
().
getUsername
());
knowledgeinfo
.
setLevels
(
0
);
knowledgeinfo
.
setLevels
(
0
);
QueryWrapper
<
KnowledgeinfoEntity
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
KnowledgeinfoEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"knowledgeinfoid"
,
knowledgeinfoids
);
queryWrapper
.
in
(
"knowledgeinfoid"
,
knowledgeinfoids
);
...
@@ -127,6 +129,7 @@ public class KnowledgeinfoController extends AbstractController {
...
@@ -127,6 +129,7 @@ public class KnowledgeinfoController extends AbstractController {
//knowledgeinfo.setAuditor(getUser().getUsername());
//knowledgeinfo.setAuditor(getUser().getUsername());
QueryWrapper
<
KnowledgeinfoEntity
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
KnowledgeinfoEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"knowledgeinfoid"
,
knowledgeinfo
.
getKnowledgeinfoid
());
queryWrapper
.
eq
(
"knowledgeinfoid"
,
knowledgeinfo
.
getKnowledgeinfoid
());
knowledgeinfo
.
setChecker
(
getUser
().
getUsername
());
knowledgeinfoService
.
update
(
knowledgeinfo
,
queryWrapper
);
knowledgeinfoService
.
update
(
knowledgeinfo
,
queryWrapper
);
return
R
.
ok
(
"审核成功!"
);
return
R
.
ok
(
"审核成功!"
);
}
}
...
...
src/main/java/io/office/modules/manage/entity/KnowledgeinfoEntity.java
View file @
df6cf3e4
...
@@ -3,10 +3,10 @@ package io.office.modules.manage.entity;
...
@@ -3,10 +3,10 @@ package io.office.modules.manage.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
lombok.Data
;
/**
/**
* ${comments}
* ${comments}
...
@@ -76,4 +76,11 @@ public class KnowledgeinfoEntity implements Serializable {
...
@@ -76,4 +76,11 @@ public class KnowledgeinfoEntity implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
class2id
;
private
String
class2id
;
private
String
lasteditor
;
private
String
checker
;
private
String
showtime
;
}
}
src/main/java/io/office/modules/manage/form/HomePopupForm.java
View file @
df6cf3e4
...
@@ -76,5 +76,8 @@ public class HomePopupForm implements Serializable {
...
@@ -76,5 +76,8 @@ public class HomePopupForm implements Serializable {
*/
*/
private
String
checkTime
;
private
String
checkTime
;
private
Integer
levels
;
private
String
keyWord
;
}
}
src/main/java/io/office/modules/manage/service/impl/HomePopupServiceImpl.java
View file @
df6cf3e4
...
@@ -82,6 +82,7 @@ public class HomePopupServiceImpl extends ServiceImpl<HomePopupDao, HomePopupEnt
...
@@ -82,6 +82,7 @@ public class HomePopupServiceImpl extends ServiceImpl<HomePopupDao, HomePopupEnt
homePopupEntity
.
setId
(
idWorkService
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
homePopupEntity
.
setId
(
idWorkService
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
homePopupEntity
.
setAuthor
(
loginUser
.
getUsername
());
homePopupEntity
.
setAuthor
(
loginUser
.
getUsername
());
homePopupEntity
.
setEditor
(
loginUser
.
getUsername
());
homePopupEntity
.
setEditor
(
loginUser
.
getUsername
());
homePopupEntity
.
setLastEditor
(
loginUser
.
getUsername
());
homePopupEntity
.
setStatus
(
0
);
homePopupEntity
.
setStatus
(
0
);
homePopupEntity
.
setCreateTime
(
DateUtils
.
format
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
homePopupEntity
.
setCreateTime
(
DateUtils
.
format
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
homePopupEntity
.
setUpdateTime
(
DateUtils
.
format
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
homePopupEntity
.
setUpdateTime
(
DateUtils
.
format
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
...
...
src/main/java/io/office/modules/manage/service/impl/KnowledgeinfoServiceImpl.java
View file @
df6cf3e4
...
@@ -58,6 +58,7 @@ public class KnowledgeinfoServiceImpl extends ServiceImpl<KnowledgeinfoDao, Know
...
@@ -58,6 +58,7 @@ public class KnowledgeinfoServiceImpl extends ServiceImpl<KnowledgeinfoDao, Know
.
eq
(
"status"
,
1
);
.
eq
(
"status"
,
1
);
// 设置排序
// 设置排序
queryWrapper
.
orderByDesc
(
"levels"
);
queryWrapper
.
orderByDesc
(
"levels"
);
queryWrapper
.
orderByDesc
(
"inputDate"
);
// 执行查询并返回结果
// 执行查询并返回结果
return
baseMapper
.
selectList
(
queryWrapper
);
return
baseMapper
.
selectList
(
queryWrapper
);
}
}
...
...
src/main/resources/mapper/manage/KnowledgeinfoDao.xml
View file @
df6cf3e4
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
<result
property=
"hits"
column=
"hits"
/>
<result
property=
"hits"
column=
"hits"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"auditor"
column=
"auditor"
/>
<result
property=
"auditor"
column=
"auditor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
<result
property=
"checker"
column=
"checker"
/>
<result
property=
"showtime"
column=
"showtime"
/>
</resultMap>
</resultMap>
<select
id=
"knowledgeinfoList"
resultMap=
"knowledgeinfoMap"
>
<select
id=
"knowledgeinfoList"
resultMap=
"knowledgeinfoMap"
>
...
...
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