package com.fdkankan.redis.constant;

import cn.hutool.core.io.FileUtil;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import java.io.File;

/**
 * <p>
 *   分布式锁key定义
 * </p>
 *
 * @author dengsixing
 * @since 2022/1/12
 **/
public class RedisLockKey {

    /**
     * 场景浏览量
     */
    public static String LOCK_SCENE_VISIT_CNT = "lock:scene:visit:cnt:scenecode:%s";

    /**
     * 场景访问量更新锁 hash
     */
    public static String LOCK_SCENE_VISIT_UPDATE = "lock:scene:visit:update";

    /**
     *
     *
     *
     * 场景上传图片锁
     */
    public static String LOCK_UPLOAD_PIC = "lock:upload:pic:scenecode:%s";

    /**
     * 场景pro上传图片锁
     */
    public static String LOCK_UPLOAD_PRO_PIC = "lock:upload:pro:pic:scenecode:%s";

    /**
     * 场景上传音频锁
     */
    public static String LOCK_UPLOAD_VOICE = "lock:upload:voice:scenecode:%s";

    /**
     * 场景pro上传音频锁
     */
    public static String LOCK_UPLOAD_PRO_VOICE = "lock:upload:pro:voice:scenecode:%s";

    /**
     * 画墙重建模型锁
     */
    public static String LOCK_UPLOAD_FLOORJSON_REBUILD = "lock:upload:floorjson:rebuild:scenecode:%s";

    /**
     * 上传图片多媒体数据锁
     */
    public static String LOCK_UPLOAD_FLOORPLAN_PNG = "lock:upload:floorplan:png:scenecode:%s";

    /**
     * 加载场景码池锁
     */
    public static String LOCK_FDKANKAN_SCENE_NUMS = "lock:4dkankan:scene:nums";

    /**
     * 同步场景
     */
    public static String LOCK_SCENE_SYNC = "lock:scene:sync:num:%s";

    /**
     * 热点数据恢复锁
     */
    public static String LOCK_HOT_DATA_SYNC = "lock:hot:data:sync:num:%s";

    /**
     * icons数据恢复锁
     */
    public static String LOCK_HOT_ICONS_SYNC = "lock:hot:icons:sync:num:%s";

    /**
     * 场景关联数据恢复锁
     */
    public static String LOCK_LINKPAN_DATA_SYNC = "lock:linkpan:data:sync:num:%s";

    /**
     * 场景关联styles数据恢复锁
     */
    public static String LOCK_LINKPAN_STYLES_SYNC = "lock:linkpan:styles:sync:num:%s";

    /**
     * 场景关联styles数据恢复锁
     */
    public static String LOCK_BILLBOARDS_STYLES_SYNC = "lock:Billboards:styles:sync:num:%s";

    /**
     * 场景指示牌数据恢复锁
     */
    public static String LOCK_BILLBOARDS_SYNC = "lock:billboards:sync:num:%s";

    /**
     * 裁剪模型数据恢复锁
     */
    public static String LOCK_CUT_MODEL_SYNC = "lock:cutmodel:sync:num:%s";

    /**
     * 热点数据写文件锁
     */
    public static String LOCK_HOT_JSON = "lock:hot:json:num:%s";

    /**
     * 批量生成场景码锁
     */
    public static String LOCK_BATCH_CREATE_NUM = "lock:batch:create:num";

    /**
     * 加载场景中断下载列表锁
     */
    public static String LOCK_SCENE_DOWNLOAD_ING = "lock:scene:downloads:ing";


    /**
     * 加载场景中断下载列表锁
     */
    public static String LOCK_STARTUP_MODELING_SERVER = "lock:startup:modeling:server";

    /**
     * 加载场景中断下载列表锁
     */
    public static String LOCK_SCENE_UPGRADE_V4 = "lock:scene:upgrade:v4:num:%s";

    /**
     * 场景关联数据写本地文件锁
     */
    public static String LOCK_LINK_SCENE_JSON = "lock:link:scene:json:num:%s";

    /**
     * 场景关联数据写本地文件锁
     */
    public static String LOCK_SCENE_UPGRADE_FAILED_ROLLBACK = "lock:scene:upgrade:failed:rollback";

    /**
     * 马赛克数据恢复锁
     */
    public static String LOCK_MOSAIC_DATA_SYNC = "lock:mosaic:data:sync:num:%s";

    /**
     * 马赛克数据写文件锁
     */
    public static String LOCK_MOSAIC_JSON = "lock:mosaic:json:num:%s";

    /**
     * 滤镜数据写文件锁
     */
    public static String LOCK_filter_JSON = "lock:filter:json:num:%s";

    /**
     * 滤镜数据恢复锁
     */
    public static String LOCK_FILTER_DATA_SYNC = "lock:filter:data:sync:num:%s";

    /**
     * 场景资源清理定时任务锁
     */
    public static final String LOCK_SCENE_CLEAN = "lock:scene:clean";

    /**
     * 思维打包下载锁
     */
    public static final String LOCK_DOWNLOAD_SIWEI_HTML = "lock:download:siwei:html";

    /**
     * 思维打包下载锁
     */
    public static final String LOCK_GET_MATTERPRO_NUM = "lock:get:matterpro:num";

    public static final String LOCK_CLEAN_SCENE_ORIG_V3 = "lock:clean:scene:orig:v3";

    public static final String LOCK_CLEAN_SCENE_ORIG_V4 = "lock:clean:scene:orig:v4";

    public static final String LOCK_CLEAN_SCENE_DELETED_ORIG_V3 = "lock:clean:scene:deleted:orig:v3";

    public static final String LOCK_CLEAN_SCENE_DELETED_ORIG_V4 = "lock:clean:scene:deleted:orig:v4";

    public static String LOCK_SCENE_DRAW = "lock:sceneDraw:sync:num:%s";

    public static void main(String[] args) {
        FileUtil.copyContent(new File("F:\\test\\test"), new File("F:\\test\\test2"), true);
    }



}
