Commit 2a60ba7a authored by 雍欢's avatar 雍欢

Merge branch 'mysql' into 'develop'

多数据库支持

See merge request topsunit/huigou!2
parents 4e783dfb 4d1f3fd6
......@@ -7,25 +7,24 @@ import org.springframework.data.repository.query.Param;
import com.huigou.uasp.log.domain.model.ApplicationSystem;
public interface ApplicationSystemRepository extends JpaRepository<ApplicationSystem, String> {
ApplicationSystem findByCode(String code);
@Query(countName="applicationSystem.countByCode",value="select count(*) from sa_applicationsystem t where t.code = ?1 and t.id != ?2",nativeQuery=true)
Long countByCodeAndId(String code,String id);
@Query(countName="applicationSystem.countByName",value="select count(*) from sa_applicationsystem t where t.code = ?1 and t.id != ?2",nativeQuery=true)
Long countByNameAndId(String name,String id);
@Query(countName="applicationSystem.countByName",value="select count(*) from sa_applicationsystem t where t.class_prefix = ?1 and t.id != ?2",nativeQuery=true)
Long countByClassPrefixAndId(String ClassPrefix,String id);
@Query(name = "applicationSystem.findByClassPrefix", nativeQuery = true, value = "select * from SA_ApplicationSystem where :classPrefix like class_prefix || '%'")
ApplicationSystem findByClassPrefix(@Param("classPrefix") String classPrefix);
Long countByCode(String code);
Long countByName(String name);
Long countByClassPrefix(String ClassPrefix);
ApplicationSystem findByCode(String code);
@Query(countName = "applicationSystem.countByCode", value = "select count(t) from ApplicationSystem t where t.code=?1 and t.id !=?2")
Long countByCodeAndId(String code, String id);
@Query(countName = "applicationSystem.countByName", value = "select count(t) from ApplicationSystem t where t.code=?1 and t.id !=?2")
Long countByNameAndId(String name, String id);
@Query(countName = "applicationSystem.countByName", value = "select count(t) from ApplicationSystem t where t.classPrefix = ?1 and t.id != ?2")
Long countByClassPrefixAndId(String ClassPrefix, String id);
@Query(name = "applicationSystem.findByClassPrefix", value = "from ApplicationSystem where :classPrefix like concat(classPrefix,'%')")
ApplicationSystem findByClassPrefix(@Param("classPrefix") String classPrefix);
Long countByCode(String code);
Long countByName(String name);
Long countByClassPrefix(String ClassPrefix);
}
......@@ -22,11 +22,6 @@
<property name="queryXmlManager" ref="queryXmlManager" />
</bean>
<bean id="mapperScannerConfigurer" class="com.topsunit.query.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.huigou.**.mapper"/>
<property name="sqlExecutorBeanName" value="sqlExecutorDao" />
</bean>
<bean id="generalRepository" class="com.huigou.data.repository.GeneralRepository">
</bean>
......
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