添加文档注释
This commit is contained in:
parent
42d05894fa
commit
00b26569ff
8
pom.xml
8
pom.xml
|
@ -122,14 +122,6 @@
|
|||
<artifactId>wechatpay-apache-httpclient</artifactId>
|
||||
<version>0.4.8</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.webjars.npm/spark-md5 -->
|
||||
<dependency>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>spark-md5</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
||||
|
|
|
@ -8,6 +8,9 @@ import com.sky.result.Result;
|
|||
import com.sky.service.EmployeeService;
|
||||
import com.sky.utils.JwtUtil;
|
||||
import com.sky.vo.EmployeeLoginVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -25,6 +28,7 @@ import java.util.Map;
|
|||
@RestController
|
||||
@RequestMapping("/admin/employee")
|
||||
@Slf4j
|
||||
@Api(tags = "员工相关接口")
|
||||
public class EmployeeController {
|
||||
|
||||
@Resource
|
||||
|
@ -38,6 +42,7 @@ public class EmployeeController {
|
|||
* @param employeeLoginDTO
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "员工登录接口")
|
||||
@PostMapping("/login")
|
||||
public Result<EmployeeLoginVO> login(@RequestBody EmployeeLoginDTO employeeLoginDTO) {
|
||||
log.info("员工登录:{}", employeeLoginDTO);
|
||||
|
@ -67,6 +72,7 @@ public class EmployeeController {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "员工退出登录")
|
||||
@PostMapping("/logout")
|
||||
public Result<String> logout() {
|
||||
return Result.success();
|
||||
|
|
|
@ -14,6 +14,8 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.util.DigestUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
@Service
|
||||
public class EmployeeServiceImpl implements EmployeeService {
|
||||
|
@ -28,6 +30,7 @@ public class EmployeeServiceImpl implements EmployeeService {
|
|||
* @return Employee
|
||||
*/
|
||||
public Employee login(EmployeeLoginDTO employeeLoginDTO) {
|
||||
|
||||
String username = employeeLoginDTO.getUsername();
|
||||
String password = employeeLoginDTO.getPassword();
|
||||
|
||||
|
@ -52,8 +55,6 @@ public class EmployeeServiceImpl implements EmployeeService {
|
|||
throw new AccountLockedException(MessageConstant.ACCOUNT_LOCKED);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 3、返回实体对象
|
||||
return employee;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue