|
|
@ -3,6 +3,7 @@ package com.easy.admin.modules.huzhou.controller; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
|
|
|
import com.easy.admin.common.constant.CommonConstant; |
|
|
|
import com.easy.admin.common.core.annotation.ResponseResult; |
|
|
|
import com.easy.admin.modules.huzhou.dto.ProjectResultExportDTO; |
|
|
|
import com.easy.admin.modules.huzhou.vo.*; |
|
|
@ -12,19 +13,23 @@ import com.easy.admin.common.api.vo.Result; |
|
|
|
import com.easy.admin.modules.huzhou.entity.*; |
|
|
|
import com.easy.admin.modules.huzhou.service.*; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.shiro.util.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.IOException; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
@RestController |
|
|
|
@RequestMapping("/huzhouProject") |
|
|
|
public class HuzhouProjectController { |
|
|
@ -492,4 +497,32 @@ public class HuzhouProjectController { |
|
|
|
List<ProjectContactShouYeOV> result = projectinfoService.projectContactShouYe(); |
|
|
|
return Result.ok(result); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
private StringRedisTemplate stringRedisTemplate; |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除指定的 Redis Key |
|
|
|
*/ |
|
|
|
@DeleteMapping("/deleteRedisKey") |
|
|
|
public Result<String> deleteRedisKey() { |
|
|
|
String redisKey = CommonConstant.REDIS_KEY_PROJECT_BOARD_INFO; |
|
|
|
if (StringUtils.hasText(redisKey)) { |
|
|
|
Boolean isDeleted = stringRedisTemplate.delete(redisKey); |
|
|
|
if (Boolean.TRUE.equals(isDeleted)) { |
|
|
|
long startTime = System.currentTimeMillis(); |
|
|
|
String result = "Key [" + redisKey + "] 删除成功"; |
|
|
|
projectinfoService.queryBoardInfo(); |
|
|
|
long endTime = System.currentTimeMillis(); |
|
|
|
log.info("{},同步数据耗时{}ms",result,endTime-startTime); |
|
|
|
return Result.ok("删除缓存成功,并更新最新数据!"); |
|
|
|
} else { |
|
|
|
String result = "Key [" + redisKey + "] 不存在或删除失败"; |
|
|
|
return Result.error(result); |
|
|
|
} |
|
|
|
} |
|
|
|
String result ="Key 不能为空"; |
|
|
|
return Result.ok(result); |
|
|
|
} |
|
|
|
} |
|
|
|