| | |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.service.business.DeviceService; |
| | | import com.doumee.service.business.impl.hksync.*; |
| | | import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.Cacheable; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService; |
| | | @Autowired |
| | | private HkSyncPushServiceImpl hkSyncPushService; |
| | | @Autowired |
| | | private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserToHKService; |
| | | @Autowired |
| | | private HkSyncNoticeServiceImpl hkSyncNoticeService; |
| | | @Autowired |
| | | private HkSyncLoginAuthServiceImpl hkSyncLoginAuthService; |
| | | |
| | |
| | | //同步广播 |
| | | result = hkSyncDeviceService.syncHkBroadcast(param); |
| | | } |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】保持海康用户绑定openid") |
| | | @PostMapping("/saveHkUserOpenid") |
| | | public ApiResponse syncHkUserOpenid( @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | String result = hkSyncOrgUserToHKService.syncHkUserOpenid(this.getLoginUser(token).getId()); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取安防平台系统免密菜单调整地址" ) |
| | | @GetMapping("/getHkMenuLink") |
| | | @PostMapping("/getHkMenuLink/{type}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type",example = "0",value = "菜单类型", required = true), |
| | | }) |
| | | public ApiResponse<String> getHkMenuLink(Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<String> getHkMenuLink(@PathVariable Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(token); |
| | | String hkToken = DESUtil.generateTokenToHk(loginUserInfo.getUsername(),Integer.valueOf( |
| | | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_TOKEN_VALIDITY).getCode() |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("【海康】代办消息数据集合对接处理接口") |
| | | @PostMapping("/notice/getList") |
| | | public ApiResponse getNoticeList( HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token ){ |
| | | String result = hkSyncNoticeService.syncHkNotices(this.getLoginUser(token).getUsername()); |
| | | return ApiResponse.success(result); |
| | | } |
| | | |
| | | |
| | | |