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.
50 lines
1.6 KiB
50 lines
1.6 KiB
5 years ago
|
package com.epmet.controller;
|
||
|
|
||
|
import com.epmet.commons.tools.utils.Result;
|
||
|
import com.epmet.commons.tools.validator.ValidatorUtils;
|
||
|
import com.epmet.dto.form.LoginFormDTO;
|
||
|
import com.epmet.dto.result.UserTokenResultDTO;
|
||
|
import com.epmet.service.ThirdLoginService;
|
||
|
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;
|
||
|
|
||
|
/**
|
||
|
* @Description 第三方-居民端、政府端登陆服务
|
||
|
* @author sun
|
||
|
*/
|
||
|
@RestController
|
||
|
@RequestMapping("thirdlogin")
|
||
|
public class ThirdLoginController {
|
||
|
|
||
|
@Autowired
|
||
|
private ThirdLoginService thirdLoginService;
|
||
|
|
||
|
/**
|
||
|
* @param formDTO
|
||
|
* @return
|
||
|
* @Author sun
|
||
|
* @Description 单客户-居民端微信小程序登录
|
||
|
**/
|
||
|
@PostMapping("resilogin")
|
||
|
public Result<UserTokenResultDTO> resiLogin(@RequestBody LoginFormDTO formDTO) {
|
||
|
ValidatorUtils.validateEntity(formDTO);
|
||
|
return new Result<UserTokenResultDTO>().ok(thirdLoginService.resiLogin(formDTO));
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param formDTO
|
||
|
* @return
|
||
|
* @Author sun
|
||
|
* @Description 单客户-政府端微信小程序登录
|
||
|
**/
|
||
|
@PostMapping("worklogin")
|
||
|
public Result<UserTokenResultDTO> workLogin(@RequestBody LoginFormDTO formDTO) {
|
||
|
ValidatorUtils.validateEntity(formDTO);
|
||
|
return new Result<UserTokenResultDTO>().ok(thirdLoginService.workLogin(formDTO));
|
||
|
}
|
||
|
|
||
|
}
|