日照智慧社区接口服务
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.

40 lines
1.1 KiB

package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.GovWebService;
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 PC工作端-登陆服务
* @author sun
*/
@RestController
@RequestMapping("govweb")
public class GovWebController {
@Autowired
private GovWebService govWebService;
/**
* @param formDTO
* @return
* @Author sun
* @Description PC工作端-工作人员登录
**/
@PostMapping("login")
public Result<UserTokenResultDTO> workLogin(@RequestBody GovWebLoginFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<UserTokenResultDTO>().ok(govWebService.login(formDTO));
}
}