bug
jiangping
2023-11-07 64b432916af9c9218ab3f3eca614e26c542142ae
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
51
52
53
54
55
package doumeemes.api.common;
 
import doumeemes.api.BaseController;
import doumeemes.core.annotation.trace.Trace;
import doumeemes.core.model.ApiResponse;
import doumeemes.service.system.SystemLoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
 
/**
 * 钉钉相关接口
 */
@Api(tags = "Edgp平台相关接口")
@Trace(withRequestResult = false,withRequestParameters = false)
@RestController
@RequestMapping("/edgp")
public class EdgpController extends BaseController {
 
    @Autowired
    private SystemLoginService systemLoginService;
 
 
    /**
     * @author Eva.Caesar Liu
     * @date 2022/04/18 18:12
     */
    @ApiOperation(value = "edgp创建企业和同步登录免密登录(web对接)",httpMethod = "POST" )
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "token", value = "访问授权码", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "员工编码",example = "0",required = true),
    })
    @RequestMapping("/login")
    public ApiResponse<String> login(   @RequestParam("token") String token ,   HttpServletRequest request) throws Exception{
        return ApiResponse.success(systemLoginService.loginAutoType(token,1, request,false));
    }
 
 
    /**
     * @author Eva.Caesar Liu
     * @date 2022/04/18 18:12
     */
    @ApiOperation(value = "EDGP免密登录(体验)",httpMethod = "POST" )
    @RequestMapping("/loginDemo")
    public ApiResponse<String> loginDemo(@RequestParam("token") String token , HttpServletRequest request) throws Exception{
        return ApiResponse.success(systemLoginService.loginEdgpDemo(token, request));
    }
}