小说微服务开发完成,用户微服务开发中

This commit is contained in:
xiongxiaoyang
2020-05-28 22:16:26 +08:00
parent bcd1caf7a8
commit 861e966a88
18 changed files with 583 additions and 19 deletions

View File

@ -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);
}

View File

@ -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;