mirror of
https://github.com/201206030/novel-cloud.git
synced 2025-07-14 06:06:38 +00:00
小说微服务开发完成,用户微服务开发中
This commit is contained in:
@ -3,8 +3,11 @@ package com.java2nb.novel.user.api;
|
||||
|
||||
import com.java2nb.novel.user.entity.User;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户微服务API接口定义(内部)
|
||||
* @author xiongxiaoyang
|
||||
@ -19,8 +22,16 @@ public interface UserApi {
|
||||
* @param password 密码
|
||||
* @return 用户对象,不存在返回null
|
||||
* */
|
||||
@GetMapping("api/queryByUsernameAndPassword")
|
||||
@GetMapping("api/user/queryByUsernameAndPassword")
|
||||
User queryByUsernameAndPassword(@RequestParam("username") String username, @RequestParam("password") String password);
|
||||
|
||||
/**
|
||||
* 根据用户名ID集合查询用户集合信息
|
||||
* @param ids 用户ID集合
|
||||
* @return 用户集合对象
|
||||
* */
|
||||
@GetMapping("api/user/queryById")
|
||||
List<User> queryById(@RequestBody List<Long> ids);
|
||||
|
||||
|
||||
}
|
||||
|
@ -3,9 +3,10 @@ package com.java2nb.novel.user.entity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class User {
|
||||
public class User implements Serializable {
|
||||
@ApiModelProperty(value = "主键")
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long id;
|
||||
|
Reference in New Issue
Block a user