Browse Source

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

rookies 5 years ago
parent
commit
51d57371b7

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