Commit a2b139af authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/develop' into develop

parents 30d025b7 42c8c96e
...@@ -23,6 +23,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle; ...@@ -23,6 +23,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.Past; import javax.validation.constraints.Past;
...@@ -484,4 +485,21 @@ public class EmployeeProjectExportParamVO extends BaseEntity { ...@@ -484,4 +485,21 @@ public class EmployeeProjectExportParamVO extends BaseEntity {
private String[] empNatureArray; private String[] empNatureArray;
private List<String> idList; private List<String> idList;
/**
* @Author fxj
* 查询数据起
**/
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
private int limitEnd;
/**
* 导出IDS
*/
@Schema(description = "导出IDS")
private String ids;
} }
...@@ -108,15 +108,27 @@ public class TEmployeeContractAreaResController { ...@@ -108,15 +108,27 @@ public class TEmployeeContractAreaResController {
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('temployeecontractareares_add')") @PreAuthorize("@pms.hasPermission('temployeecontractareares_add')")
public R<Boolean> save(@RequestBody TEmployeeContractAreaRes areaRes) { public R<Boolean> save(@RequestBody TEmployeeContractAreaRes areaRes) {
TEmployeeContractAreaRes res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda() TEmployeeContractAreaRes res = null;
if (Common.isEmpty(areaRes.getFileTown())){
res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda()
.eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince()) .eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince())
.eq(TEmployeeContractAreaRes::getFileCity,areaRes.getFileCity()) .eq(TEmployeeContractAreaRes::getFileCity,areaRes.getFileCity())
.eq(TEmployeeContractAreaRes::getFileTown,areaRes.getFileTown()) .isNull(TEmployeeContractAreaRes::getFileTown)
.eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId()) .eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isEmpty(areaRes.getFileCity())){
res = tEmployeeContractAreaResService.getOne(Wrappers.<TEmployeeContractAreaRes>query().lambda()
.eq(TEmployeeContractAreaRes::getFileProvince,areaRes.getFileProvince())
.isNull(TEmployeeContractAreaRes::getFileCity)
.eq(TEmployeeContractAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(res)){ if (Common.isNotNull(res)){
return R.failed("已存在对应审核人及地市配置!"); return R.failed("已存在对应审核人及地市配置!");
} }
// 清理缓存
tEmployeeContractAreaResService.removeAuthCache();
return R.ok(tEmployeeContractAreaResService.save(areaRes)); return R.ok(tEmployeeContractAreaResService.save(areaRes));
} }
...@@ -152,6 +164,8 @@ public class TEmployeeContractAreaResController { ...@@ -152,6 +164,8 @@ public class TEmployeeContractAreaResController {
return R.failed(CommonConstants.PARAM_INFO_ERROR); return R.failed(CommonConstants.PARAM_INFO_ERROR);
} }
areaRes.setStatus(status); areaRes.setStatus(status);
// 清理缓存
tEmployeeContractAreaResService.removeAuthCache();
return R.ok(tEmployeeContractAreaResService.updateById(areaRes)); return R.ok(tEmployeeContractAreaResService.updateById(areaRes));
} }
/** /**
...@@ -165,6 +179,8 @@ public class TEmployeeContractAreaResController { ...@@ -165,6 +179,8 @@ public class TEmployeeContractAreaResController {
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('temployeecontractareares_del')") @PreAuthorize("@pms.hasPermission('temployeecontractareares_del')")
public R<Boolean> removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
// 清理缓存
tEmployeeContractAreaResService.removeAuthCache();
return R.ok(tEmployeeContractAreaResService.removeById(id)); return R.ok(tEmployeeContractAreaResService.removeById(id));
} }
......
...@@ -59,4 +59,8 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -59,4 +59,8 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
* @return * @return
*/ */
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject); List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject);
// getTEmployeeProjectExportPage 改造
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
} }
...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContractAreaExportVo; ...@@ -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.archives.vo.TEmployeeContractAreaResSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; 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.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
...@@ -53,4 +54,6 @@ public interface TEmployeeContractAreaResService extends IService<TEmployeeContr ...@@ -53,4 +54,6 @@ public interface TEmployeeContractAreaResService extends IService<TEmployeeContr
R<List<ErrorMessage>> importDiy(InputStream inputStream); R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TEmployeeContractAreaResSearchVo searchVo); void listExport(HttpServletResponse response, TEmployeeContractAreaResSearchVo searchVo);
void removeAuthCache();
} }
...@@ -33,9 +33,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractAreaResServ ...@@ -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.TEmpContractAreaExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo; 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.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.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; 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 lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
...@@ -55,6 +58,9 @@ import java.util.List; ...@@ -55,6 +58,9 @@ import java.util.List;
@Log4j2 @Log4j2
@Service @Service
public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeContractAreaResMapper, TEmployeeContractAreaRes> implements TEmployeeContractAreaResService { public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeContractAreaResMapper, TEmployeeContractAreaRes> implements TEmployeeContractAreaResService {
@Autowired
private RedisUtil redisUtil;
/** /**
* 合同地市权限配置表简单分页查询 * 合同地市权限配置表简单分页查询
* *
...@@ -227,4 +233,21 @@ public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeCo ...@@ -227,4 +233,21 @@ public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeCo
BeanUtil.copyProperties(excel, insert); BeanUtil.copyProperties(excel, insert);
this.save(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);
}
}
} }
...@@ -2033,7 +2033,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2033,7 +2033,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
} }
}else { }else {
WriteSheet writeSheet = EasyExcel.writerSheet("不良记录"+index).build(); WriteSheet writeSheet = EasyExcel.writerSheet("人员档案批量导出"+index).build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
} }
if (Common.isNotNull(list)){ if (Common.isNotNull(list)){
......
...@@ -19,10 +19,12 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl; ...@@ -19,10 +19,12 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener; import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder; import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...@@ -62,6 +64,7 @@ import javax.servlet.ServletOutputStream; ...@@ -62,6 +64,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.lang.reflect.Field;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
...@@ -1173,38 +1176,58 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1173,38 +1176,58 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
* @Date 10:55 2022/6/23 * @Date 10:55 2022/6/23
**/ **/
@Override @Override
public void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO projectDTO, String idstr, List<String> exportFields) { public void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO searchVo, String idstr, List<String> exportFields) {
searchVo.setIdList(Common.getList(idstr));
String fileName = "项目档案批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX; String fileName = "项目档案批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
// 根据用户传入确定要导出的字段 // 根据用户传入确定要导出的字段
Set<String> includeColumnFiledNames = new HashSet<>(exportFields); Set<String> includeColumnFiledNames = new HashSet<>(exportFields);
//获取要导出的列表 gettEmpProInfoExportVos
//获取要导出的列表 List<EmployeeProjectExportVO> list = new ArrayList<>();
List<EmployeeProjectExportVO> list; long count = noPageCountDiy(searchVo);
//获取记录
list = gettEmpProInfoExportVos(idstr, projectDTO);
ServletOutputStream out = null; ServletOutputStream out = null;
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
try { try {
out = response.getOutputStream(); out = response.getOutputStream();
ExcelUtil<EmployeeProjectExportVO> util = new ExcelUtil<>(EmployeeProjectExportVO.class);
for (EmployeeProjectExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8)); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeProjectExportVO.class).includeColumnFiledNames(includeColumnFiledNames).sheet("项目档案") ExcelWriter excelWriter = EasyExcel.write(out, EmployeeProjectExportVO.class).includeColumnFieldNames(includeColumnFiledNames).build();
.doWrite(list); int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeProjectExportVO.class.getDeclaredFields();
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<EmployeeProjectExportVO> util = new ExcelUtil<>(EmployeeProjectExportVO.class);
for (EmployeeProjectExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush(); out.flush();
} catch (Exception e) { excelWriter.finish();
log.error("执行异常", e); }catch (Exception e){
} finally { log.error("执行异常" ,e);
}finally {
try { try {
if (null != out) { if (null != out) {
out.close(); out.close();
...@@ -1215,6 +1238,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1215,6 +1238,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} }
} }
private List<EmployeeProjectExportVO> noPageDiy(EmployeeProjectExportParamVO searchVo) {
return baseMapper.noPageDiy(searchVo);
}
private int noPageCountDiy(EmployeeProjectExportParamVO searchVo) {
return baseMapper.noPageCountDiy(searchVo);
}
/** /**
* @param employeeInfo * @param employeeInfo
* @Description: 新增项目档案 * @Description: 新增项目档案
......
...@@ -802,4 +802,39 @@ ...@@ -802,4 +802,39 @@
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
SELECT
<include refid="Base_Export_List"/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
<if test="tEmployeeProject != null">
<if test="tEmployeeProject.limitStart != null">
limit #{tEmployeeProject.limitStart},#{tEmployeeProject.limitEnd}
</if>
</if>
</select>
<!--tEmployeeInfo导出查询count改造 fxj 2022-11-03-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql}
</if>
</where>
</select>
</mapper> </mapper>
...@@ -107,14 +107,25 @@ public class TInsuranceAreaResController { ...@@ -107,14 +107,25 @@ public class TInsuranceAreaResController {
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('tinsuranceareares_add')") @PreAuthorize("@pms.hasPermission('tinsuranceareares_add')")
public R<Boolean> save(@RequestBody TInsuranceAreaRes areaRes) { public R<Boolean> save(@RequestBody TInsuranceAreaRes areaRes) {
TInsuranceAreaRes res = tInsuranceAreaResService.getOne(Wrappers.<TInsuranceAreaRes>query().lambda() TInsuranceAreaRes res = null;
if (Common.isEmpty(areaRes.getCity())){
res = tInsuranceAreaResService.getOne(Wrappers.<TInsuranceAreaRes>query().lambda()
.eq(TInsuranceAreaRes::getProvince,areaRes.getProvince())
.isNull(TInsuranceAreaRes::getCity)
.eq(TInsuranceAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
}else {
res = tInsuranceAreaResService.getOne(Wrappers.<TInsuranceAreaRes>query().lambda()
.eq(TInsuranceAreaRes::getProvince,areaRes.getProvince()) .eq(TInsuranceAreaRes::getProvince,areaRes.getProvince())
.eq(TInsuranceAreaRes::getCity,areaRes.getCity()) .eq(TInsuranceAreaRes::getCity,areaRes.getCity())
.eq(TInsuranceAreaRes::getUserId,areaRes.getUserId()) .eq(TInsuranceAreaRes::getUserId,areaRes.getUserId())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(res)){ if (Common.isNotNull(res)){
return R.failed("已存在对应审核人及地市配置!"); return R.failed("已存在对应审核人及地市配置!");
} }
// 清理缓存
tInsuranceAreaResService.removeAuthCache();
return R.ok(tInsuranceAreaResService.save(areaRes)); return R.ok(tInsuranceAreaResService.save(areaRes));
} }
...@@ -143,6 +154,8 @@ public class TInsuranceAreaResController { ...@@ -143,6 +154,8 @@ public class TInsuranceAreaResController {
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('tinsuranceareares_del')") @PreAuthorize("@pms.hasPermission('tinsuranceareares_del')")
public R<Boolean> removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
// 清理缓存
tInsuranceAreaResService.removeAuthCache();
return R.ok(tInsuranceAreaResService.removeById(id)); return R.ok(tInsuranceAreaResService.removeById(id));
} }
...@@ -165,6 +178,8 @@ public class TInsuranceAreaResController { ...@@ -165,6 +178,8 @@ public class TInsuranceAreaResController {
return R.failed(CommonConstants.PARAM_INFO_ERROR); return R.failed(CommonConstants.PARAM_INFO_ERROR);
} }
areaRes.setStatus(status); areaRes.setStatus(status);
// 清理缓存
tInsuranceAreaResService.removeAuthCache();
return R.ok(tInsuranceAreaResService.updateById(areaRes)); return R.ok(tInsuranceAreaResService.updateById(areaRes));
} }
......
...@@ -53,4 +53,6 @@ public interface TInsuranceAreaResService extends IService<TInsuranceAreaRes> { ...@@ -53,4 +53,6 @@ public interface TInsuranceAreaResService extends IService<TInsuranceAreaRes> {
R<List<ErrorMessage>> importDiy(InputStream inputStream); R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TInsuranceAreaResSearchVo searchVo); void listExport(HttpServletResponse response, TInsuranceAreaResSearchVo searchVo);
void removeAuthCache();
} }
...@@ -30,6 +30,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -30,6 +30,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAreaRes; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAreaRes;
...@@ -39,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAreaExportVo; ...@@ -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.TInsuranceAreaResSearchVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAreaResVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAreaResVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
...@@ -57,6 +59,9 @@ import java.util.List; ...@@ -57,6 +59,9 @@ import java.util.List;
@Log4j2 @Log4j2
@Service @Service
public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResMapper, TInsuranceAreaRes> implements TInsuranceAreaResService { public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResMapper, TInsuranceAreaRes> implements TInsuranceAreaResService {
@Autowired
private RedisUtil redisUtil;
/** /**
* 商险地市权限配置表简单分页查询 * 商险地市权限配置表简单分页查询
* @param tInsuranceAreaRes 商险地市权限配置表 * @param tInsuranceAreaRes 商险地市权限配置表
...@@ -132,6 +137,16 @@ public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResM ...@@ -132,6 +137,16 @@ public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResM
} }
} }
@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 @Override
public List<TInsuranceAreaExportVo> noPageDiy(TInsuranceAreaResSearchVo searchVo, public List<TInsuranceAreaExportVo> noPageDiy(TInsuranceAreaResSearchVo searchVo,
List<String> settleDomainIds, List<String> settleDomainIds,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment