| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.config.jwt.JwtProperties; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.BufferedReader; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | |
| | | @Autowired |
| | | private RedisTemplate<String,Object> redisTemplate; |
| | | |
| | | @Autowired |
| | | private JwtProperties jwtProperties; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】全量同步月台信息接口") |
| | |
| | | String url = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HTTPS).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HOST).getCode() |
| | | + HKService.getMenuUrl(type,hkToken); |
| | | try { |
| | | if(redisTemplate!=null&& jwtProperties!=null){ |
| | | loginUserInfo.setHkMenuToken(hkToken); |
| | | redisTemplate.opsForValue().set(Constants.REDIS_TOKEN_KEY+token, JSONObject.toJSONString(loginUserInfo),jwtProperties.getExpiration(), TimeUnit.MILLISECONDS); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return ApiResponse.success( url); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取安防平台系统免密菜单配置" ) |
| | | @GetMapping("/getHkMenuConfig") |
| | | public ApiResponse<List<Integer>> getHkMenuConfig(@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | List<Integer> menuConfigList = new ArrayList<>(); |
| | | if(Objects.nonNull(loginUserInfo) && StringUtils.isNotBlank(loginUserInfo.getUsername())){ |
| | | menuConfigList = hkSyncPlatformsService.getMenuConfig(loginUserInfo.getUsername()); |
| | | } |
| | | return ApiResponse.success(menuConfigList); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("【海康】设置LED屏文案") |
| | | @PostMapping("/setLedContent") |
| | | public ApiResponse<List<Map<String,Object>>> setLedContent(@RequestBody TransparentChannelSingleRequest body , HttpServletResponse response) { |