韩帛霖 1 рік тому
батько
коміт
399ce7ae19

+ 23 - 16
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -6,25 +6,32 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 
 /**
  * 启动程序
- * 
+ *
  * @author ruoyi
  */
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-public class RuoYiApplication
-{
-    public static void main(String[] args)
-    {
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
+public class RuoYiApplication {
+    public static void main(String[] args) {
         // System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(RuoYiApplication.class, args);
-        System.out.println("(♥◠‿◠)ノ゙  若依启动成功   ლ(´ڡ`ლ)゙  \n" +
-                " .-------.       ____     __        \n" +
-                " |  _ _   \\      \\   \\   /  /    \n" +
-                " | ( ' )  |       \\  _. /  '       \n" +
-                " |(_ o _) /        _( )_ .'         \n" +
-                " | (_,_).' __  ___(_ o _)'          \n" +
-                " |  |\\ \\  |  ||   |(_,_)'         \n" +
-                " |  | \\ `'   /|   `-'  /           \n" +
-                " |  |  \\    /  \\      /           \n" +
-                " ''-'   `'-'    `-..-'              ");
+        System.out.println("(♥◠‿◠)ノ゙  表单引擎启动成功!   ლ(´ڡ`ლ)゙  \n" +
+
+                "FFFFFFFFFFFFFFFFFFFFFF     OOOOOOOOO     RRRRRRRRRRRRRRRRR   MMMMMMMM               MMMMMMMM\n" +
+                "F::::::::::::::::::::F   OO:::::::::OO   R::::::::::::::::R  M:::::::M             M:::::::M\n" +
+                "F::::::::::::::::::::F OO:::::::::::::OO R::::::RRRRRR:::::R M::::::::M           M::::::::M\n" +
+                "FF::::::FFFFFFFFF::::FO:::::::OOO:::::::ORR:::::R     R:::::RM:::::::::M         M:::::::::M\n" +
+                "  F:::::F       FFFFFFO::::::O   O::::::O  R::::R     R:::::RM::::::::::M       M::::::::::M\n" +
+                "  F:::::F             O:::::O     O:::::O  R::::R     R:::::RM:::::::::::M     M:::::::::::M\n" +
+                "  F::::::FFFFFFFFFF   O:::::O     O:::::O  R::::RRRRRR:::::R M:::::::M::::M   M::::M:::::::M\n" +
+                "  F:::::::::::::::F   O:::::O     O:::::O  R:::::::::::::RR  M::::::M M::::M M::::M M::::::M\n" +
+                "  F:::::::::::::::F   O:::::O     O:::::O  R::::RRRRRR:::::R M::::::M  M::::M::::M  M::::::M\n" +
+                "  F::::::FFFFFFFFFF   O:::::O     O:::::O  R::::R     R:::::RM::::::M   M:::::::M   M::::::M\n" +
+                "  F:::::F             O:::::O     O:::::O  R::::R     R:::::RM::::::M    M:::::M    M::::::M\n" +
+                "  F:::::F             O::::::O   O::::::O  R::::R     R:::::RM::::::M     MMMMM     M::::::M\n" +
+                "FF:::::::FF           O:::::::OOO:::::::ORR:::::R     R:::::RM::::::M               M::::::M\n" +
+                "F::::::::FF            OO:::::::::::::OO R::::::R     R:::::RM::::::M               M::::::M\n" +
+                "F::::::::FF              OO:::::::::OO   R::::::R     R:::::RM::::::M               M::::::M\n" +
+                "FFFFFFFFFFF                OOOOOOOOO     RRRRRRRR     RRRRRRRMMMMMMMM               MMMMMMMM"
+        );
     }
 }

+ 8 - 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/DragTableConditionController.java

@@ -24,7 +24,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
- * 动态格条件Controller
+ * 动态格条件Controller
  * 
  * @author ruoyi
  * @date 2023-07-31
@@ -37,7 +37,7 @@ public class DragTableConditionController extends BaseController
     private IDragTableConditionService dragTableConditionService;
 
     /**
-     * 查询动态格条件列表
+     * 查询动态格条件列表
      */
     @PreAuthorize("@ss.hasPermi('system:condition:list')")
     @GetMapping("/list")
@@ -48,10 +48,10 @@ public class DragTableConditionController extends BaseController
     }
 
     /**
-     * 新增动态格条件
+     * 新增动态格条件
      */
     @PreAuthorize("@ss.hasPermi('system:condition:add')")
-    @Log(title = "动态格条件", businessType = BusinessType.INSERT)
+    @Log(title = "动态格条件", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody CommonEntity commonEntity)
     {
@@ -59,10 +59,10 @@ public class DragTableConditionController extends BaseController
     }
 
     /**
-     * 修改动态格条件
+     * 修改动态格条件
      */
     @PreAuthorize("@ss.hasPermi('system:condition:edit')")
-    @Log(title = "动态格条件", businessType = BusinessType.UPDATE)
+    @Log(title = "动态格条件", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody CommonEntity commonEntity)
     {
@@ -70,10 +70,10 @@ public class DragTableConditionController extends BaseController
     }
 
     /**
-     * 删除动态格条件
+     * 删除动态格条件
      */
     @PreAuthorize("@ss.hasPermi('system:condition:remove')")
-    @Log(title = "动态格条件", businessType = BusinessType.DELETE)
+    @Log(title = "动态格条件", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{tcIds}")
     public AjaxResult remove(@RequestBody CommonEntity commonEntity)
     {

+ 16 - 16
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/DragTableController.java

@@ -19,7 +19,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
- * 动态格Controller
+ * 动态格Controller
  *
  * @author xzz
  * @date 2023-07-31
@@ -31,7 +31,7 @@ public class DragTableController extends BaseController {
     private IDragTableService dragTableService;
 
     /**
-     * 查询动态格列表
+     * 查询动态格列表
      */
     @GetMapping("/list")
     public TableDataInfo list(DragTable dragTable) {
@@ -41,18 +41,18 @@ public class DragTableController extends BaseController {
     }
 
     /**
-     * 导出动态格列表
+     * 导出动态格列表
      */
-    @Log(title = "动态格", businessType = BusinessType.EXPORT)
+    @Log(title = "动态格", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, DragTable dragTable) {
         List<DragTable> list = dragTableService.selectDragTableList(dragTable);
         ExcelUtil<DragTable> util = new ExcelUtil<DragTable>(DragTable.class);
-        util.exportExcel(response, list, "动态格数据");
+        util.exportExcel(response, list, "动态格数据");
     }
 
     /**
-     * 获取动态格详细信息
+     * 获取动态格详细信息
      */
 //    @GetMapping(value = "/{tId}")
 //    public AjaxResult getInfo(@PathVariable("tId") Long tId) {
@@ -60,27 +60,27 @@ public class DragTableController extends BaseController {
 //    }
 
     /**
-     * 新增动态格
+     * 新增动态
      */
-    @Log(title = "动态格", businessType = BusinessType.INSERT)
+    @Log(title = "动态格", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody DragTable dragTable) {
         return toAjax(dragTableService.insertDragTable(dragTable));
     }
 
 //    /**
-//     * 修改动态格
+//     * 修改动态
 //     */
-//    @Log(title = "动态格", businessType = BusinessType.UPDATE)
+//    @Log(title = "动态格", businessType = BusinessType.UPDATE)
 //    @PutMapping
 //    public AjaxResult edit(@RequestBody DragTable dragTable) {
 //        return toAjax(dragTableService.updateDragTable(dragTable));
 //    }
 
 //    /**
-//     * 删除动态格
+//     * 删除动态
 //     */
-//    @Log(title = "动态格", businessType = BusinessType.DELETE)
+//    @Log(title = "动态格", businessType = BusinessType.DELETE)
 //    @DeleteMapping("/{tIds}")
 //    public AjaxResult remove(@PathVariable Long[] tIds) {
 //        return toAjax(dragTableService.deleteDragTableByTIds(tIds));
@@ -96,7 +96,7 @@ public class DragTableController extends BaseController {
     }
 
     /**
-     * 获取动态格详细信息
+     * 获取动态格详细信息
      */
     @GetMapping("/getInfo/{tId}")
     public AjaxResult getInfo(@PathVariable("tId") Long tId) {
@@ -104,7 +104,7 @@ public class DragTableController extends BaseController {
     }
 
     /**
-     * 修改动态格
+     * 修改动态
      */
     @PutMapping("/edit")
     public AjaxResult edit(@RequestBody DragTableVo dragTableVo) {
@@ -113,7 +113,7 @@ public class DragTableController extends BaseController {
     }
 
     /**
-     * 删除动态格
+     * 删除动态
      */
     @DeleteMapping("/remove")
     public AjaxResult remove(@RequestBody Map<String,Object> map) {
@@ -124,7 +124,7 @@ public class DragTableController extends BaseController {
     }
 
     /**
-     * 查询动态格列表
+     * 查询动态格列表
      */
     @GetMapping("/dragTableList")
     public AjaxResult dragTableList() {

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/entity/DragTable.java

@@ -6,7 +6,7 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * 动态格对象 drag_table
+ * 动态格对象 drag_table
  *
  * @author ruoyi
  * @date 2023-07-31

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/entity/DragTableCondition.java

@@ -9,7 +9,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 动态格条件对象 drag_table_condition
+ * 动态格条件对象 drag_table_condition
  *
  * @author ruoyi
  * @date 2023-07-31

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/entity/vo/DragTableVo.java

@@ -9,7 +9,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 动态格对象 drag_table
+ * 动态格对象 drag_table
  *
  * @author ruoyi
  * @date 2023-07-31

+ 10 - 10
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DragTableConditionMapper.java

@@ -9,7 +9,7 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * 动态格条件Mapper接口
+ * 动态格条件Mapper接口
  * 
  * @author ruoyi
  * @date 2023-07-31
@@ -17,27 +17,27 @@ import java.util.Set;
 public interface DragTableConditionMapper 
 {
     /**
-     * 查询动态格条件列表
+     * 查询动态格条件列表
      */
     List<CommonEntity> selectDragTableConditionList(@Param("conditions") Map<String, Object> conditions);
 
     /**
-     * 新增动态格条件
+     * 新增动态格条件
      */
     int insertDragTableCondition(@Param("fieldNames") Set<String> fieldNames,@Param("fieldValues") List<Map<String, Object>> fieldValues);
 
     /**
-     * 新增动态格条件
+     * 新增动态格条件
      */
     int insertDragTableConditionByList(List<DragTableCondition> conditionList);
 
     /**
-     * 修改动态格条件
+     * 修改动态格条件
      */
     int updateDragTableCondition(@Param("fields") Map<String, Object> fields, @Param("conditions") Map<String, Object> conditions);
 
     /**
-     * 批量删除动态格条件
+     * 批量删除动态格条件
      * 
      * @param tcIds 需要删除的数据主键集合
      * @return 结果
@@ -45,10 +45,10 @@ public interface DragTableConditionMapper
     int deleteDragTableConditionByTcIds(@Param("conditions") Map<String, Object> conditions);
 
     /**
-     * 查询动态格条件
+     * 查询动态格条件
      *
-     * @param tId 动态格条件主键
-     * @return 动态格条件
+     * @param tId 动态格条件主键
+     * @return 动态格条件
      */
     List<DragTableCondition> selectDragTableConditionByTid(Long tId);
 
@@ -58,7 +58,7 @@ public interface DragTableConditionMapper
     List<String> selectDragTableSearchField(Long tId);
 
     /**
-     * 删除动态格条件
+     * 删除动态格条件
      * @param tIds 动态表格编号
      * @return
      */

+ 16 - 16
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DragTableMapper.java

@@ -6,7 +6,7 @@ import com.ruoyi.system.entity.vo.DragTableVo;
 import java.util.List;
 
 /**
- * 动态格Mapper接口
+ * 动态格Mapper接口
  * 
  * @author ruoyi
  * @date 2023-07-31
@@ -14,47 +14,47 @@ import java.util.List;
 public interface DragTableMapper 
 {
     /**
-     * 查询动态格
+     * 查询动态
      * 
-     * @param tId 动态格主键
-     * @return 动态格
+     * @param tId 动态格主键
+     * @return 动态
      */
     DragTable selectDragTableByTId(Long tId);
 
     /**
-     * 查询动态格列表
+     * 查询动态格列表
      * 
-     * @param dragTable 动态格
-     * @return 动态格集合
+     * @param dragTable 动态
+     * @return 动态格集合
      */
     List<DragTable> selectDragTableList(DragTable dragTable);
 
     /**
-     * 新增动态格
+     * 新增动态
      * 
-     * @param dragTable 动态格
+     * @param dragTable 动态
      * @return 结果
      */
     int insertDragTable(DragTable dragTable);
 
     /**
-     * 修改动态格
+     * 修改动态
      * 
-     * @param dragTable 动态格
+     * @param dragTable 动态
      * @return 结果
      */
     int updateDragTable(DragTable dragTable);
 
     /**
-     * 删除动态格
+     * 删除动态
      * 
-     * @param tId 动态格主键
+     * @param tId 动态格主键
      * @return 结果
      */
     int deleteDragTableByTId(Long tId);
 
     /**
-     * 批量删除动态格
+     * 批量删除动态
      * 
      * @param tIds 需要删除的数据主键集合
      * @return 结果
@@ -62,10 +62,10 @@ public interface DragTableMapper
     int deleteDragTableByTIds(List<Long> tIds);
 
     /**
-     * 查询动态格
+     * 查询动态
      *
      * @param sqlKey 唯一标识
-     * @return 动态格
+     * @return 动态
      */
     DragTable selectDragTableBySqlKey(String sqlKey);
 

+ 5 - 5
ruoyi-system/src/main/java/com/ruoyi/system/service/IDragTableConditionService.java

@@ -6,7 +6,7 @@ import com.ruoyi.system.entity.DragTableCondition;
 import java.util.List;
 
 /**
- * 动态格条件Service接口
+ * 动态格条件Service接口
  * 
  * @author ruoyi
  * @date 2023-07-31
@@ -15,22 +15,22 @@ public interface IDragTableConditionService
 {
 
     /**
-     * 查询动态格条件列表
+     * 查询动态格条件列表
      */
     List<CommonEntity> selectDragTableConditionList(CommonEntity commonEntity);
 
     /**
-     * 新增动态格条件
+     * 新增动态格条件
      */
     int insertDragTableCondition(CommonEntity commonEntity);
 
     /**
-     * 修改动态格条件
+     * 修改动态格条件
      */
     int updateDragTableCondition(CommonEntity commonEntity);
 
     /**
-     * 批量删除动态格条件
+     * 批量删除动态格条件
      */
     int deleteDragTableConditionByTcIds(CommonEntity commonEntity);
 

+ 19 - 19
ruoyi-system/src/main/java/com/ruoyi/system/service/IDragTableService.java

@@ -7,7 +7,7 @@ import com.ruoyi.system.entity.vo.DragTableVo;
 import java.util.List;
 
 /**
- * 动态格Service接口
+ * 动态格Service接口
  * 
  * @author ruoyi
  * @date 2023-07-31
@@ -15,58 +15,58 @@ import java.util.List;
 public interface IDragTableService 
 {
     /**
-     * 查询动态格
+     * 查询动态
      * 
-     * @param tId 动态格主键
-     * @return 动态格
+     * @param tId 动态格主键
+     * @return 动态
      */
     public DragTable selectDragTableByTId(Long tId);
 
     /**
-     * 查询动态格列表
+     * 查询动态格列表
      * 
-     * @param dragTable 动态格
-     * @return 动态格集合
+     * @param dragTable 动态
+     * @return 动态格集合
      */
     public List<DragTable> selectDragTableList(DragTable dragTable);
 
     /**
-     * 新增动态格
+     * 新增动态
      * 
-     * @param dragTable 动态格
+     * @param dragTable 动态
      * @return 结果
      */
     public int insertDragTable(DragTable dragTable);
 
 //    /**
-//     * 修改动态格
+//     * 修改动态
 //     *
-//     * @param dragTable 动态格
+//     * @param dragTable 动态
 //     * @return 结果
 //     */
 //    public int updateDragTable(DragTable dragTable);
 
     /**
-     * 批量删除动态格
+     * 批量删除动态
      * 
-     * @param tIds 需要删除的动态格主键集合
+     * @param tIds 需要删除的动态格主键集合
      * @return 结果
      */
     public int deleteDragTableByTIds(List<Long> tIds);
 
     /**
-     * 删除动态格信息
+     * 删除动态格信息
      * 
-     * @param tId 动态格主键
+     * @param tId 动态格主键
      * @return 结果
      */
     public int deleteDragTableByTId(Long tId);
 
     /**
-     * 查询动态格
+     * 查询动态
      *
      * @param sqlKey 唯一标识
-     * @return 动态格
+     * @return 动态
      */
     CommonEntity dragTableInfo(String sqlKey);
 
@@ -81,12 +81,12 @@ public interface IDragTableService
     DragTableVo selectDragTableVoByTId(Long tId);
 
     /**
-     * 修改动态格
+     * 修改动态
      */
     void updateDragTable(DragTableVo dragTableVo);
 
     /**
-     * 删除动态格信息
+     * 删除动态格信息
      */
     void deleteDragTable(List<Long> tIds,List<String> sqlKeys);
 }

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragTableConditionServiceImpl.java

@@ -13,7 +13,7 @@ import com.ruoyi.system.mapper.DragTableConditionMapper;
 import com.ruoyi.system.service.IDragTableConditionService;
 
 /**
- * 动态格条件Service业务层处理
+ * 动态格条件Service业务层处理
  * 
  * @author ruoyi
  * @date 2023-07-31

+ 15 - 15
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragTableServiceImpl.java

@@ -34,7 +34,7 @@ import org.springframework.transaction.support.TransactionTemplate;
 import javax.annotation.Resource;
 
 /**
- * 动态格Service业务层处理
+ * 动态格Service业务层处理
  *
  * @author ruoyi
  * @date 2023-07-31
@@ -57,10 +57,10 @@ public class DragTableServiceImpl implements IDragTableService {
     private TransactionTemplate transactionTemplate;
 
     /**
-     * 查询动态格
+     * 查询动态
      *
-     * @param tId 动态格主键
-     * @return 动态格
+     * @param tId 动态格主键
+     * @return 动态
      */
     @Override
     public DragTable selectDragTableByTId(Long tId) {
@@ -68,10 +68,10 @@ public class DragTableServiceImpl implements IDragTableService {
     }
 
     /**
-     * 查询动态格列表
+     * 查询动态格列表
      *
-     * @param dragTable 动态格
-     * @return 动态格
+     * @param dragTable 动态
+     * @return 动态
      */
     @Override
     public List<DragTable> selectDragTableList(DragTable dragTable) {
@@ -79,9 +79,9 @@ public class DragTableServiceImpl implements IDragTableService {
     }
 
     /**
-     * 新增动态格
+     * 新增动态
      *
-     * @param dragTable 动态格
+     * @param dragTable 动态
      * @return 结果
      */
     @Override
@@ -91,9 +91,9 @@ public class DragTableServiceImpl implements IDragTableService {
     }
 
 //    /**
-//     * 修改动态格
+//     * 修改动态
 //     *
-//     * @param dragTable 动态格
+//     * @param dragTable 动态
 //     * @return 结果
 //     */
 //    @Override
@@ -103,9 +103,9 @@ public class DragTableServiceImpl implements IDragTableService {
 //    }
 
     /**
-     * 批量删除动态格
+     * 批量删除动态
      *
-     * @param tIds 需要删除的动态格主键
+     * @param tIds 需要删除的动态格主键
      * @return 结果
      */
     @Override
@@ -114,9 +114,9 @@ public class DragTableServiceImpl implements IDragTableService {
     }
 
     /**
-     * 删除动态格信息
+     * 删除动态格信息
      *
-     * @param tId 动态格主键
+     * @param tId 动态格主键
      * @return 结果
      */
     @Override

+ 48 - 4
ruoyi-system/src/main/java/com/ruoyi/system/test/ljj.java

@@ -6,9 +6,7 @@ import org.apache.ibatis.jdbc.SQL;
 
 import java.time.DayOfWeek;
 import java.time.LocalDate;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author hanzihang
@@ -25,7 +23,53 @@ public class ljj {
 
     public static void main(String[] args) {
 
-        System.out.println(SqlUtil.isValidOrderBySql("M_F.M_F_ID"));
+        List<String> bigList = new ArrayList<>();
+        bigList.add("1");
+        int batchSize = 2;
+//        List<String> bigList = new ArrayList<>(); // 这里假设bigList是你要插入数据库的10000条数据
+
+        for(int i = 0; i < bigList.size(); i += batchSize) {
+            int end = Math.min(bigList.size(), i + batchSize);
+            List<String> smallList = bigList.subList(i, end);
+            // 这里smallList就是你要插入数据库的1000条数据
+            // 将smallList插入数据库的代码放在这里
+            System.out.println(smallList);
+        }
+
+
+//        List<Map<String, String>> list = new ArrayList<Map<String, String>>();
+//        Map<String, String> map1 = new HashMap<>();
+//        map1.put("苹果手机", "2");//添加键值对
+//        map1.put("智能手表", "1");
+//        map1.put("java书", "1");
+//        map1.put("c语言书", "1");
+//        map1.put("西瓜", "2");
+//        Map<String, String> map2 = new HashMap<>();
+//        map2.put("苹果手机", "20");//添加键值对
+//        map2.put("智能手表", "10");
+//        map2.put("java书", "10");
+//        map2.put("c语言书", "10");
+//        map2.put("西瓜", "20");
+//        list.add(map1);
+//        list.add(map2);
+//        for (Map<String, String> map : list) {
+//            System.out.println(map);
+//        }
+//        System.out.println("--------------------------------");
+//        for (Map<String, String> map : list) {
+//            Set<String> set = map.keySet();
+//            Iterator<String> it = set.iterator();
+//            while (it.hasNext()) {
+//                String key = it.next();
+//                if (key.equals("苹果手机")) {
+//                    it.remove();
+//                }
+//            }
+//            System.out.println(map);
+//        }
+
+
+//        System.out.println(SqlUtil.isValidOrderBySql("M_F.M_F_ID"));
 //        String a = "asdjkl";
 //        System.out.println(a.replaceAll("k", "QQ"));