Commit d37b79f6 by lzxry

+1

parent a84613ac
...@@ -5,7 +5,7 @@ import javax.persistence.Entity; ...@@ -5,7 +5,7 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
@Entity //@Entity
public class AuthDic { public class AuthDic {
private Long id; private Long id;
...@@ -14,8 +14,8 @@ public class AuthDic { ...@@ -14,8 +14,8 @@ public class AuthDic {
private int type; private int type;
@Id //@Id
@GeneratedValue //@GeneratedValue
public Long getId() { public Long getId() {
return id; return id;
} }
......
package common.repository;
import common.model.BarrioCity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
public interface BarrioCityRepository extends JpaRepository<BarrioCity, Long> {
@Query(value = "select * from barrio_city where parent_id = ?1",nativeQuery = true)
List<BarrioCity> findByParentId(long parentId);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment