完成Register && Gird

This commit is contained in:
2019-06-03 18:22:02 +08:00
parent 9b5d2ec4e5
commit 7473c0e36a
36 changed files with 2051 additions and 943 deletions
@@ -19,9 +19,9 @@ import java.util.List;
@Repository
public interface BookRepo extends JpaRepository<Book, Long> {
List<Book> findByUserId(long userId);
List<Book> findByUserIdOrderByCreateTimeDesc(long userId);
@Modifying
@Modifying(clearAutomatically = true)
@Query(value = "update t_bill_books set total_amount = (select sum(amount) from t_bill_items where book_id = ?1) where id = ?1",nativeQuery = true)
void sumAmount(long bookId);
}