Browse Source

check code

Caratacus 8 years ago
parent
commit
e0f57e9cb8

+ 1 - 1
src/main/java/com/baomidou/mybatisplus/toolkit/TableInfoHelper.java

@@ -88,7 +88,7 @@ public class TableInfoHelper {
      * @return
      * @return
      */
      */
     public static List<TableInfo> getTableInfos() {
     public static List<TableInfo> getTableInfos() {
-        List<TableInfo> tableInfos = new ArrayList<TableInfo>();
+        List<TableInfo> tableInfos = new ArrayList<>();
         for (Map.Entry<String, TableInfo> entry : tableInfoCache.entrySet()) {
         for (Map.Entry<String, TableInfo> entry : tableInfoCache.entrySet()) {
             tableInfos.add(entry.getValue());
             tableInfos.add(entry.getValue());
         }
         }

+ 1 - 1
src/test/java/com/baomidou/mybatisplus/test/IdWorkerTest.java

@@ -48,7 +48,7 @@ public class IdWorkerTest {
 
 
 		ExecutorService executorService = Executors.newFixedThreadPool(20);
 		ExecutorService executorService = Executors.newFixedThreadPool(20);
 		final List<Long> results = new ArrayList<>();
 		final List<Long> results = new ArrayList<>();
-		CompletionService<Long> cs = new ExecutorCompletionService<Long>(executorService);
+		CompletionService<Long> cs = new ExecutorCompletionService<>(executorService);
 		for (int i = 1; i < count; i++) {
 		for (int i = 1; i < count; i++) {
 			cs.submit(new Callable<Long>() {
 			cs.submit(new Callable<Long>() {
 				public Long call() throws Exception {
 				public Long call() throws Exception {

+ 2 - 2
src/test/java/com/baomidou/mybatisplus/test/h2/entity/mapper/H2UserMapper.java

@@ -23,12 +23,12 @@ public interface H2UserMapper extends BaseMapper<H2User> {
             "select a.addr_id as addrId, a.addr_name as addrName from h2address a" +
             "select a.addr_id as addrId, a.addr_name as addrName from h2address a" +
                     " join h2user u on u.test_id=a.test_id and u.test_id=#{userId}"
                     " join h2user u on u.test_id=a.test_id and u.test_id=#{userId}"
     )
     )
-    public List<H2Addr> getAddrListByUserId(@Param("userId") Long userId);
+     List<H2Addr> getAddrListByUserId(@Param("userId") Long userId);
 
 
     @Select(
     @Select(
             "select a.addr_id as addrId, a.addr_name as addrName from h2address a" +
             "select a.addr_id as addrId, a.addr_name as addrName from h2address a" +
                     " join h2user u on u.test_id=a.test_id and u.test_id=#{userId}"
                     " join h2user u on u.test_id=a.test_id and u.test_id=#{userId}"
     )
     )
-    public List<H2Addr> getAddrListByUserId(@Param("userId") Long userId, Page<H2Addr> page);
+     List<H2Addr> getAddrListByUserId(@Param("userId") Long userId, Page<H2Addr> page);
 
 
 }
 }