Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qianhe-ydsj
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
qianhe-ydsj
Commits
03fa1351
Commit
03fa1351
authored
Aug 21, 2024
by
tyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经验交流代码提交
parent
8af54b76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
2 deletions
+80
-2
qianhe-ydsj/src/main/java/com/qianhe/controller/JygxWzglController.java
+32
-2
qianhe-ydsj/src/main/java/com/qianhe/service/IJygxWzglService.java
+6
-0
qianhe-ydsj/src/main/java/com/qianhe/service/impl/JygxWzglServiceImpl.java
+42
-0
No files found.
qianhe-ydsj/src/main/java/com/qianhe/controller/JygxWzglController.java
View file @
03fa1351
...
...
@@ -111,8 +111,6 @@ public class JygxWzglController extends BaseController
}
/**
* 新增经验共享-文章管理
*/
...
...
@@ -146,6 +144,27 @@ public class JygxWzglController extends BaseController
}
/**
* 修改经验共享-提交按钮
*/
@PutMapping
(
"/tj"
)
public
AjaxResult
tj
(
@RequestBody
JygxWzgl
jygxWzgl
)
{
return
toAjax
(
jygxWzglService
.
updatetj
(
jygxWzgl
));
}
/**
* 修改经验共享-文章管理(领导)
*/
@PreAuthorize
(
"@ss.hasPermi('system:wzgl:editld')"
)
@Log
(
title
=
"经验共享-文章管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/editld"
)
public
AjaxResult
editld
(
@RequestBody
JygxWzgl
jygxWzgl
)
{
return
toAjax
(
jygxWzglService
.
updateJygxWzgl
(
jygxWzgl
));
}
/**
* 文章管理审核
*/
@PreAuthorize
(
"@ss.hasPermi('system:wzgl:wzglsh')"
)
...
...
@@ -169,6 +188,17 @@ public class JygxWzglController extends BaseController
}
/**
* 删除经验共享-文章管理(领导)
*/
@PreAuthorize
(
"@ss.hasPermi('system:wzgl:removeld')"
)
@Log
(
title
=
"经验共享-文章管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/removeld/{wzids}"
)
public
AjaxResult
removeld
(
@PathVariable
Long
[]
wzids
)
{
return
toAjax
(
jygxWzglService
.
deleteJygxWzglByWzids
(
wzids
));
}
/**
*数据置顶
*/
@GetMapping
(
"/getwzzd"
)
...
...
qianhe-ydsj/src/main/java/com/qianhe/service/IJygxWzglService.java
View file @
03fa1351
...
...
@@ -68,6 +68,12 @@ public interface IJygxWzglService
*/
public
int
updateJygxWzgl
(
JygxWzgl
jygxWzgl
);
/**
* 提交
*/
public
int
updatetj
(
JygxWzgl
jygxWzgl
);
/**
* 批量删除经验共享-文章管理
*
...
...
qianhe-ydsj/src/main/java/com/qianhe/service/impl/JygxWzglServiceImpl.java
View file @
03fa1351
...
...
@@ -6,6 +6,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
com.qianhe.common.annotation.DataScope
;
import
com.qianhe.common.core.domain.entity.SysRole
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.SecurityUtils
;
import
com.qianhe.domain.*
;
...
...
@@ -97,6 +98,7 @@ public class JygxWzglServiceImpl implements IJygxWzglService
public
int
insertJygxWzgl
(
JygxWzgl
jygxWzgl
)
{
int
TARGET_LENGTH
=
20
;
SecureRandom
random
=
new
SecureRandom
();
BigInteger
bigInt
=
new
BigInteger
(
TARGET_LENGTH
*
8
,
random
);
...
...
@@ -186,6 +188,46 @@ public class JygxWzglServiceImpl implements IJygxWzglService
return
jygxWzglMapper
.
updateJygxWzgl
(
jygxWzgl
);
}
/**
* 提交
*/
@Override
public
int
updatetj
(
JygxWzgl
jygxWzgl
)
{
boolean
pd
=
false
;
if
(
SecurityUtils
.
getLoginUser
().
getUser
().
isAdmin
()){
pd
=
true
;
}
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
if
(!
pd
){
for
(
SysRole
sysRole
:
roles
){
if
(
sysRole
.
getRoleKey
().
equals
(
"sjgly"
)){
pd
=
true
;
break
;
}
}
}
if
(
pd
){
jygxWzgl
.
setShzt
(
"4"
);
}
if
(
jygxWzgl
.
getJygxWzglfjList
()
!=
null
)
{
if
(
jygxWzgl
.
getJygxWzglfjList
().
size
()>
0
)
{
//将之前上传附件删除,重新上传
jygxWzglMapper
.
deleteFileByBusinessId
(
jygxWzgl
.
getWzid
());
List
<
JygxWzglfj
>
sbmsList
=
jygxWzgl
.
getJygxWzglfjList
();
insertFileList
(
jygxWzgl
.
getWzid
(),
sbmsList
);
}
}
if
(
jygxWzgl
.
getWznr
()!=
null
){
jygxWzgl
.
setYl2
(
jygxWzgl
.
getWznr
().
replaceAll
(
"<[^>]*>"
,
""
));
}
jygxWzgl
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
jygxWzglMapper
.
updateJygxWzgl
(
jygxWzgl
);
}
/**
* 批量删除经验共享-文章管理
*
...
...
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