package com.panzhihua.serviceapi.api; import javax.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.panzhihua.common.controller.BaseController; import com.panzhihua.serviceapi.biz.LcApiService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; /** * program 攀枝花智慧社区项目 description token管理API * * @author manailin Date 2021-01-22 15:30 **/ @Slf4j @Api(tags = {"token管理API"}) @RestController @RequestMapping("/") public class TokenApi extends BaseController { @Resource private LcApiService lcApiService; /** * description 生成或更新redis里面的对接浪潮所需的token信息 * * @param name * 账号 * @param password * 密码 * @author manailin * @date 2021/6/10 17:00 */ @ApiOperation(value = "生成或更新redis里面的对接浪潮所需的token信息") @GetMapping("get/token") public void getToken(String name, String password) { try { lcApiService.saveTokenFromRemoteRequest(name, password); } catch (Exception e) { log.error("对接浪潮接口——更新或生成token出现错误:{}", e.getMessage()); } } }