# markdown_file

title: 测试2
file_name: 测试2
content:
  777
  666

  123

  ![image.png](http://127.0.0.1:8084/api/images/preview/61af81aa-944f-4b17-9695-70482a6a5f16.png)

  ![image.png](/api/images/preview/fcd6213d-d969-4b8f-bf39-19e823857083.png)

  ![image.png](http://127.0.0.1:8084/api/images/preview/724d6aa4-16cf-48b6-88ba-22b33ba88b63.png)


title: 测试111
file_name: 测试111.md
content:
  12131

  # 4654654

  455

  父个是否

  ~~~sql

  -- ----------------------------
  -- 政策依据表
  -- ----------------------------
  drop table if exists tb_hf_policy_basis;
  create table tb_hf_policy_basis (
    id                   decimal(20,0)      not null,
    title                varchar(200)       not null,
    subtitle             varchar(500)       not null,
    category             varchar(100)       default null,
    remark               varchar(500)       default null,
    content              text               default null,
    audit_time           datetime year to second default null,
    is_audited           decimal(1,0)       default 0,
    attachment           varchar(500)       default null,
    unit_name            varchar(100)       default null,
    unit_code            varchar(100)       default null,
    create_time          datetime year to second not null,
    create_by_id         decimal(20,0)       not null,
    create_by_name       varchar(100)       not null,
    update_by_id         decimal(20,0)       default null,
    update_by_name       varchar(100)       default null,
    update_time          datetime year to second default null
  );

  COMMENT ON TABLE tb_hf_policy_basis IS '政策依据';
  COMMENT ON COLUMN tb_hf_policy_basis.id IS '主键ID';
  COMMENT ON COLUMN tb_hf_policy_basis.title IS '标题';
  COMMENT ON COLUMN tb_hf_policy_basis.subtitle IS '副标题';
  COMMENT ON COLUMN tb_hf_policy_basis.category IS '类别';
  COMMENT ON COLUMN tb_hf_policy_basis.remark IS '备注';
  COMMENT ON COLUMN tb_hf_policy_basis.content IS '正文(政策依据具体内容)';
  COMMENT ON COLUMN tb_hf_policy_basis.audit_time IS '审核时间';
  COMMENT ON COLUMN tb_hf_policy_basis.is_audited IS '是否审核，0是未审核，1是已审核';
  COMMENT ON COLUMN tb_hf_policy_basis.attachment IS '附件';
  COMMENT ON COLUMN tb_hf_policy_basis.unit_name IS '单位名';
  COMMENT ON COLUMN tb_hf_policy_basis.unit_code IS '单位编码';
  COMMENT ON COLUMN tb_hf_policy_basis.create_time IS '创建时间';
  COMMENT ON COLUMN tb_hf_policy_basis.create_by_id IS '创建人ID';
  COMMENT ON COLUMN tb_hf_policy_basis.create_by_name IS '创建人姓名';
  COMMENT ON COLUMN tb_hf_policy_basis.update_by_id IS '最后修改人ID';
  COMMENT ON COLUMN tb_hf_policy_basis.update_by_name IS '最后修改人姓名';
  COMMENT ON COLUMN tb_hf_policy_basis.update_time IS '最后修改时间';

  ALTER TABLE tb_hf_policy_basis ADD CONSTRAINT pk_tb_hf_policy_basis primary key (id);



  -- 修改字段名category为newstypeno
  ALTER TABLE tb_hf_policy_basis RENAME COLUMN category TO newstypeno;

  -- 修改字段备注
  COMMENT ON COLUMN tb_hf_policy_basis.newstypeno IS '新闻公告分类, 来自Base_NewsType数据表';


  ALTER TABLE tb_hf_policy_basis DROP COLUMN attachment;


  -- 1. 修改id字段精度
  ALTER TABLE tb_hf_policy_basis MODIFY id decimal(16,0);

  -- 2. 重命名字段 audited_status 为 is_audited
  ALTER TABLE tb_hf_policy_basis RENAME COLUMN is_audited TO ;

  -- 3. 更新字段注释
  COMMENT ON COLUMN tb_hf_policy_basis.audited_status IS '是否审核，0是未审核，1是已审核';


  ALTER TABLE tb_hf_policy_basis RENAME TO tb_jcpg_policy_basis;


  ~~~


title: 测试222
file_name: 测试222.md
content:
  132131

  ### 地方

  ~~~java


      @Override
      public MarkdownFile updateMarkdownContent(MarkdownFile markdownFile) {
          markdownFile.setUpdatedAt(new Date());
          // 如果ID为空或0，则视为新文件
          if (markdownFile.getId() == null || markdownFile.getId() == 0L) {
              markdownFile.setId(snowflakeIdGenerator.nextId());
              markdownFile.setCreatedAt(new Date());
              this.save(markdownFile); // 使用MyBatis-Plus的save方法
          } else {
              this.updateById(markdownFile); // 使用MyBatis-Plus的updateById方法
          }
          return markdownFile;
      }
  ~~~

  ## 哈哈哈

  哇哇哇


title: 天气
file_name: 天气.md
content:
  # 杀肖



  ~~~java
  package com.example.demo.test.shengxiao2;

      /**
       * 杀生肖
       */

  import java.util.*;

  public class analyzeLotteryData2 {
      static Map<String, String> map1 = new HashMap<>();
      static Map<String, String> map2 = new HashMap<>();
      static Map<String, String> map3 = new HashMap<>();

      static List<String> lists = new ArrayList<>();


      /**
       * 获取生肖关系
       * @param i
       * @return
       */
      public static Map<String, String> map(int i){
          switch (i){
              case 1:
                  map1.put("馬", "牛");
                  map1.put("羊", "兔");
                  map1.put("兔", "雞");
                  return map1;
              case 2:
                  map2.put("兔", "狗");
                  map2.put("馬", "羊");
                  map2.put("狗", "兔");
                  map2.put("豬", "虎");
                  map2.put("鼠", "馬");
                  map2.put("虎", "猴");
                  map2.put("雞", "蛇");
                  return map2;
              case 3:
                  map3.put("兔", "雞");
                  map3.put("馬", "鼠");
                  map3.put("狗", "馬");
                  map3.put("豬", "羊");
                  return map3;
              default:
                      return null;
          }
      }

     /**
      *获取最后一个生肖（处理可能的多余空格）
      */
      private static String getLastZodiac(String zodiacStr) {
          String[] zodiacs = zodiacStr.split(",");
          if (zodiacs.length == 0) return "";
          return zodiacs[zodiacs.length - 1].trim();
      }

      /**
       * 获取要杀掉的生肖
       * @param list
       * @return
       */
      public static List<String>  validateZodiacRelationships(String list){
          // 获取当前期的最后一个生肖
          String currentLastZodiac = getLastZodiac(list);

          for (int i = 0; i < 3; i++) {
              // 检查是否违反规则
              Map<String, String> map = map(i+1);
              String forbiddenZodiac =map.get(currentLastZodiac);
              if (forbiddenZodiac != null ) {
                  lists.add(forbiddenZodiac);
              }
          }
  //        列表去重
          lists = new ArrayList<>(new HashSet<>(lists));
          return lists;
      }

  }
  ~~~

  https://smithery.ai/server/@upstash/context7-mcp

  sequentialthinking


