mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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());
        }
    }
 
}