| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.sxkj.common.redis.RedisOpsUtils; |
| | | import org.sxkj.gd.common.IdParam; |
| | | import org.sxkj.gd.workorder.entity.GdPatrolTaskEntity; |
| | | import org.sxkj.gd.workorder.enums.PatrolTaskStatusEnum; |
| | |
| | | import org.sxkj.system.cache.SysCache; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | |
| | | } |
| | | return gdPatrolTaskService.pushXingtuFlyTask(id); |
| | | } |
| | | |
| | | //分享页面缓存数据接口 |
| | | @PostMapping("/share-cache-data") |
| | | @ApiOperationSupport(order = 15) |
| | | @ApiOperation(value = "分享页面缓存数据接口", notes = "传入需要缓存的数据") |
| | | public R<Object> shareCacheData(@RequestBody Object requestData) { |
| | | if (requestData == null) { |
| | | return R.fail("缓存的数据不能为空"); |
| | | } |
| | | // 缓存数据 7天过过期 |
| | | String cacheKey = UUID.randomUUID().toString(); |
| | | RedisOpsUtils.setWithExpire(cacheKey, requestData, 60 * 60 * 24 * 7); |
| | | return R.data(cacheKey); |
| | | } |
| | | |
| | | @GetMapping("/get-share-cache-data") |
| | | @ApiOperationSupport(order = 16) |
| | | @ApiOperation(value = "获取分享页面缓存数据接口", notes = "传入缓存key") |
| | | public R<Object> getShareCacheData(@RequestParam String cacheKey) { |
| | | if (cacheKey == null) { |
| | | return R.fail("缓存key不能为空"); |
| | | } |
| | | Object cacheData = RedisOpsUtils.get(cacheKey); |
| | | return R.data(cacheData); |
| | | } |
| | | |
| | | } |