소스 검색

上传文件至 'src/main/java/com/weavi/ahh_v2/repository'

rookies 5 년 전
부모
커밋
51d57371b7
2개의 변경된 파일46개의 추가작업 그리고 0개의 파일을 삭제
  1. 20 0
      src/main/java/com/weavi/ahh_v2/repository/LabelRepository.java
  2. 26 0
      src/main/java/com/weavi/ahh_v2/repository/UserRepository.java

+ 20 - 0
src/main/java/com/weavi/ahh_v2/repository/LabelRepository.java

@@ -0,0 +1,20 @@
+package com.weavi.ahh_v2.repository;
+
+import com.weavi.ahh_v2.domain.UserLabel;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+/**
+ * @auther jiangzuole
+ * @date 2019-05-28
+ * @time 10:14
+ */
+public interface LabelRepository extends JpaRepository<UserLabel,Integer> {
+
+    List<UserLabel> findByUserId(Integer userId);
+
+    UserLabel findByLabel(String label);
+
+
+}

+ 26 - 0
src/main/java/com/weavi/ahh_v2/repository/UserRepository.java

@@ -0,0 +1,26 @@
+package com.weavi.ahh_v2.repository;
+
+import com.weavi.ahh_v2.domain.UserInfo;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+/**
+ * @auther jiangzuole
+ * @date 2019-05-27
+ * @time 14:37
+ */
+public interface UserRepository extends JpaRepository<UserInfo,Integer> {
+
+    UserInfo findByUserName(String userName);
+
+    UserInfo findByNickName(String nickName);
+
+    UserInfo findByPhoneAndSignAddress(Integer phone,String signAddress);
+
+    UserInfo findByNickNameAndSignAddress(String nickName,String signAddress);
+
+    UserInfo findByIdAndDeleted(Integer id,Integer deleted);
+
+    List<UserInfo> findBySignAddress(String signAddress);
+}