日照智慧社区接口服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

package com.epmet.controller;
5 years ago
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.SsoLoginFormDTO;
import com.epmet.dto.result.SsoLoginResultDTO;
import com.epmet.service.SsoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author zxc
* @DateTime 2021/1/18 下午4:33
*/
@RestController
@RequestMapping("sso/resi")
public class SsoController {
5 years ago
@Autowired
private SsoService ssoService;
/**
* @Description 0入口得到token
* @Param formDTO
* @author zxc
* @date 2021/1/18 下午4:59
*/
@PostMapping("login")
public Result<SsoLoginResultDTO> ssoLogin(@RequestBody SsoLoginFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, SsoLoginFormDTO.SsoLoginForm.class);
return new Result<SsoLoginResultDTO>().ok(ssoService.ssoLogin(formDTO));
}
}