首页>代码>基于springboot和websocket简单的聊天室>/chat-room-Strong-master/src/main/java/top/wonderheng/chatroom/service/UserService.java
package top.wonderheng.chatroom.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import top.wonderheng.chatroom.dao.UserDao; import top.wonderheng.chatroom.vo.User; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.List; @Service public class UserService { @Autowired private UserDao userDao; //登录 public User findByUsernameAndPassword(String username, String password) { return userDao.findByUsernameAndPassword(username, password); } //注册 public void save(User user1) { userDao.save(user1); } //注册时差询名字是否重复 public List<User> findByUsername(String username) { return userDao.findByUsername(username); } }
最近下载更多
Xiaobaiya11 LV2
3月4日
admin_z LV22
2023年12月21日
anninghh LV1
2023年12月4日
西瓜哥哥 LV4
2023年8月9日
gzryue LV6
2023年4月25日
天险无涯 LV15
2023年3月20日
微信网友_6393440821071872 LV2
2023年3月17日
zhaoxu123123 LV10
2022年12月4日
xiaoyuer2 LV8
2022年11月22日
万盛拓海 LV2
2022年10月20日
最近浏览更多
xiexin LV1
4月9日
黑 LV7
3月29日
Xiaobaiya11 LV2
3月4日
uni-code_0123 LV1
1月31日
YhXyHx523 LV6
2023年12月24日
admin_z LV22
2023年12月21日
微信网友_6762641760833536
2023年12月4日
暂无贡献等级
anninghh LV1
2023年12月4日
skook7 LV2
2023年11月21日
杨最代1 LV5
2023年10月31日