修改查询子账号的sql语句

master
wujingtao 3 years ago
parent 860ce97936
commit 5952d37087

@ -1,7 +1,6 @@
package com.hchbox.repository.master; package com.hchbox.repository.master;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hchbox.entity.master.SellerAccount; import com.hchbox.entity.master.SellerAccount;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
@ -9,7 +8,6 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -82,6 +80,6 @@ public interface SellerAccountRepository extends JpaRepository<SellerAccount, Lo
* @param parentId * @param parentId
* @return * @return
*/ */
@Query(value = "select * form SellerAccount as s where s.parentId != ?1 ", nativeQuery = true) @Query(value = "select * from seller_account as s where s.parent_id != ?1 ", nativeQuery = true)
List<SellerAccount> queryChildrenSellerAccounts(Long parentId); List<SellerAccount> queryChildrenSellerAccounts(Long parentId);
} }

Loading…
Cancel
Save