package com.epmet.controller; 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 { @Autowired private SsoService ssoService; /** * @Description 0、入口:得到token * @Param formDTO * @author zxc * @date 2021/1/18 下午4:59 */ @PostMapping("login") public Result ssoLogin(@RequestBody SsoLoginFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, SsoLoginFormDTO.SsoLoginForm.class); return new Result().ok(ssoService.ssoLogin(formDTO)); } }