wzy
2022-10-20 6a07f220e8f855740eee9b9dcae75464d6266380
修复分页死循环
3 files modified
18 ■■■■■ changed files
src/main/java/com/xcong/farmer/cms/core/handler/PageDataParserHandler.java 8 ●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml 4 ●●●● patch | view | raw | blame | history
src/main/resources/application.yml 6 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/core/handler/PageDataParserHandler.java
@@ -33,14 +33,20 @@
    private ColumnMapper columnMapper = SpringContextHolder.getBean(ColumnMapper.class);
    @Override
    public void dataParser(AttrNode attrNode) {
//        log.info("分页解析");
        log.info("分页解析");
        synchronized (this) {
            Template.HAS_PAGING = true;
            String baseUrl = (String) attrNode.getSystemDataValue("baseUrl");
            Long companyId = (Long) attrNode.getSystemDataValue("companyId");
            Pagination param = (Pagination) attrNode.getParam();
            Object pageNum = attrNode.getSystemDataValue("page");
            if (pageNum != null) {
                param.setPage(pageNum.toString());
            }
            Page<ArticleEntity> page = new Page<>(Integer.parseInt(param.getPage()), Integer.parseInt(param.getLimit()));
            ArticleEntity article = new ArticleEntity();
            article.setColumnCode(param.getCode());
src/main/resources/application-test.yml
@@ -14,12 +14,12 @@
  datasource:
    dynamic:
      # 是否开启 SQL日志输出,生产环境建议关闭,有性能损耗
      p6spy: false
      p6spy: true
      # 配置默认数据源
      primary: base
      datasource:
        base:
          url: jdbc:mysql://120.27.238.55:3306/farmer_cms?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
          url: jdbc:mysql://127.0.0.1:3306/farmer_cms?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
          username: ct_test
          password: 123456
          driver-class-name: com.mysql.cj.jdbc.Driver
src/main/resources/application.yml
@@ -113,7 +113,7 @@
cms:
  api-url: http://120.27.238.55:8878
  static-url: http://120.27.238.55:8000/cms/static/
  template-path: /Users/helius/Documents/xcong/cms/test/template
  static-path: /Users/helius/Desktop/template-online/static
  output-path: /Users/helius/Documents/xcong/cms/test/output
  template-path: C:\Users\wzy19\Desktop\template
  static-path: C:\Users\wzy19\Desktop\template
  output-path: C:\Users\wzy19\Desktop\output