Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
fangxinjiang
yifu-mvp
Commits
fa77967d
Commit
fa77967d
authored
Nov 03, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限配置页面
parent
ad6156ad
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
5 deletions
+57
-5
TEmployeeContractAreaResController.java
...chives/controller/TEmployeeContractAreaResController.java
+6
-0
TEmployeeContractAreaResService.java
...ifu/archives/service/TEmployeeContractAreaResService.java
+3
-0
TEmployeeContractAreaResServiceImpl.java
...ves/service/impl/TEmployeeContractAreaResServiceImpl.java
+23
-0
ExcelUtil.java
...m/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
+0
-3
TInsuranceAreaResController.java
...fu/insurances/controller/TInsuranceAreaResController.java
+6
-0
TInsuranceAreaResService.java
.../v1/yifu/insurances/service/TInsuranceAreaResService.java
+2
-0
TInsuranceAreaResServiceImpl.java
.../service/insurance/impl/TInsuranceAreaResServiceImpl.java
+17
-2
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractAreaResController.java
View file @
fa77967d
...
...
@@ -127,6 +127,8 @@ public class TEmployeeContractAreaResController {
if
(
Common
.
isNotNull
(
res
)){
return
R
.
failed
(
"已存在对应审核人及地市配置!"
);
}
// 清理缓存
tEmployeeContractAreaResService
.
removeAuthCache
();
return
R
.
ok
(
tEmployeeContractAreaResService
.
save
(
areaRes
));
}
...
...
@@ -162,6 +164,8 @@ public class TEmployeeContractAreaResController {
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
areaRes
.
setStatus
(
status
);
// 清理缓存
tEmployeeContractAreaResService
.
removeAuthCache
();
return
R
.
ok
(
tEmployeeContractAreaResService
.
updateById
(
areaRes
));
}
/**
...
...
@@ -175,6 +179,8 @@ public class TEmployeeContractAreaResController {
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('temployeecontractareares_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
// 清理缓存
tEmployeeContractAreaResService
.
removeAuthCache
();
return
R
.
ok
(
tEmployeeContractAreaResService
.
removeById
(
id
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeContractAreaResService.java
View file @
fa77967d
...
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
...
...
@@ -53,4 +54,6 @@ public interface TEmployeeContractAreaResService extends IService<TEmployeeContr
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
void
listExport
(
HttpServletResponse
response
,
TEmployeeContractAreaResSearchVo
searchVo
);
void
removeAuthCache
();
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractAreaResServiceImpl.java
View file @
fa77967d
...
...
@@ -33,9 +33,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractAreaResServ
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -55,6 +58,9 @@ import java.util.List;
@Log4j2
@Service
public
class
TEmployeeContractAreaResServiceImpl
extends
ServiceImpl
<
TEmployeeContractAreaResMapper
,
TEmployeeContractAreaRes
>
implements
TEmployeeContractAreaResService
{
@Autowired
private
RedisUtil
redisUtil
;
/**
* 合同地市权限配置表简单分页查询
*
...
...
@@ -227,4 +233,21 @@ public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeCo
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
}
/**
* @Author fxj
* @Description 清除项目缓存
* @Date 17:08 2022/7/11
* @Param
* @return
**/
@Override
public
void
removeAuthCache
()
{
try
{
redisUtil
.
remove
(
CacheConstants
.
DATA_AUTH_DETAILS
+
CommonConstants
.
ONE_STRING
);
redisUtil
.
remove
(
CacheConstants
.
DATA_AUTH_DETAILS
+
CommonConstants
.
ZERO_STRING
);
}
catch
(
Exception
e
)
{
log
.
error
(
"清除权限配置缓存错误:"
,
e
);
}
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
View file @
fa77967d
...
...
@@ -1100,9 +1100,6 @@ public class ExcelUtil <T> implements Serializable {
field
.
set
(
vo
,
Common
.
isNotNull
(
value
)?
value:
field
.
get
(
vo
));
}
catch
(
Exception
e
){
log
.
error
(
"字典数据解析异常"
);
}
finally
{
fields
.
clear
();
allField
.
clear
();
}
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceAreaResController.java
View file @
fa77967d
...
...
@@ -124,6 +124,8 @@ public class TInsuranceAreaResController {
if
(
Common
.
isNotNull
(
res
)){
return
R
.
failed
(
"已存在对应审核人及地市配置!"
);
}
// 清理缓存
tInsuranceAreaResService
.
removeAuthCache
();
return
R
.
ok
(
tInsuranceAreaResService
.
save
(
areaRes
));
}
...
...
@@ -152,6 +154,8 @@ public class TInsuranceAreaResController {
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('tinsuranceareares_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
// 清理缓存
tInsuranceAreaResService
.
removeAuthCache
();
return
R
.
ok
(
tInsuranceAreaResService
.
removeById
(
id
));
}
...
...
@@ -174,6 +178,8 @@ public class TInsuranceAreaResController {
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
areaRes
.
setStatus
(
status
);
// 清理缓存
tInsuranceAreaResService
.
removeAuthCache
();
return
R
.
ok
(
tInsuranceAreaResService
.
updateById
(
areaRes
));
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceAreaResService.java
View file @
fa77967d
...
...
@@ -53,4 +53,6 @@ public interface TInsuranceAreaResService extends IService<TInsuranceAreaRes> {
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
void
listExport
(
HttpServletResponse
response
,
TInsuranceAreaResSearchVo
searchVo
);
void
removeAuthCache
();
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceAreaResServiceImpl.java
View file @
fa77967d
...
...
@@ -30,6 +30,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAreaRes
;
...
...
@@ -39,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAreaExportVo;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAreaResSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAreaResVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -57,7 +59,10 @@ import java.util.List;
@Log4j2
@Service
public
class
TInsuranceAreaResServiceImpl
extends
ServiceImpl
<
TInsuranceAreaResMapper
,
TInsuranceAreaRes
>
implements
TInsuranceAreaResService
{
/**
@Autowired
private
RedisUtil
redisUtil
;
/**
* 商险地市权限配置表简单分页查询
* @param tInsuranceAreaRes 商险地市权限配置表
* @return
...
...
@@ -132,7 +137,17 @@ public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResM
}
}
@Override
@Override
public
void
removeAuthCache
()
{
try
{
redisUtil
.
remove
(
CacheConstants
.
DATA_AUTH_DETAILS
+
CommonConstants
.
ONE_STRING
);
redisUtil
.
remove
(
CacheConstants
.
DATA_AUTH_DETAILS
+
CommonConstants
.
ZERO_STRING
);
}
catch
(
Exception
e
)
{
log
.
error
(
"清除权限配置缓存错误:"
,
e
);
}
}
@Override
public
List
<
TInsuranceAreaExportVo
>
noPageDiy
(
TInsuranceAreaResSearchVo
searchVo
,
List
<
String
>
settleDomainIds
,
List
<
String
>
ids
,
...
...
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